Skip to main content

Module read_receipt

Module read_receipt 

Source

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::sync::Arc; πŸ”’
use futures::Stream; πŸ”’
use futures::StreamExt; πŸ”’
use futures::TryStreamExt; πŸ”’
use ruma::EventId; πŸ”’
use ruma::MilliSecondsSinceUnixEpoch; πŸ”’
use ruma::OwnedEventId; πŸ”’
use ruma::OwnedUserId; πŸ”’
use ruma::RoomId; πŸ”’
use ruma::UInt; πŸ”’
use ruma::UserId; πŸ”’
use ruma::api::appservice::event::push_events::v1::EphemeralData; πŸ”’
use ruma::events::AnySyncEphemeralRoomEvent; πŸ”’
use ruma::events::SyncEphemeralRoomEvent; πŸ”’
use ruma::events::receipt::Receipt; πŸ”’
use ruma::events::receipt::ReceiptEvent; πŸ”’
use ruma::events::receipt::ReceiptEventContent; πŸ”’
use ruma::events::receipt::ReceiptThread; πŸ”’
use ruma::events::receipt::ReceiptType; πŸ”’
use ruma::events::receipt::Receipts; πŸ”’
use ruma::serde::Raw; πŸ”’
use serde_json::value::to_raw_value; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::debug::INFO_SPAN_LEVEL; πŸ”’
use tuwunel_core::err; πŸ”’
use tuwunel_core::result::NotFound; πŸ”’
use tuwunel_core::smallstr::SmallString; πŸ”’
use tuwunel_core::smallvec::SmallVec; πŸ”’
use tuwunel_core::utils::BoolExt; πŸ”’
use tuwunel_core::utils::IterStream; πŸ”’
use tuwunel_core::warn; πŸ”’
use tuwunel_matrix::Event; πŸ”’
use tuwunel_matrix::pdu::PduCount; πŸ”’
use tuwunel_matrix::pdu::PduId; πŸ”’
use tuwunel_matrix::pdu::RawPduId; πŸ”’
use self::data::Data; πŸ”’
use self::data::ReceiptItem; πŸ”’

ModulesΒ§

data πŸ”’

StructsΒ§

PrivateRead
A private read marker write for one (room, user, thread) context.
Service

FunctionsΒ§

merge_receipts πŸ”’
pack_receipts_fallible
Packs read receipts into one sync event without suppressing malformed input.
thread_kind_to_receipt πŸ”’
Reverse of ReceiptThread::as_str: parse a stored thread tag into the enum. Empty string maps to Unthreaded; "main" to Main; all other values must be valid event IDs.

Type AliasesΒ§

PrivateReadEvents
Private read receipts surfaced by private_read_get. One legacy unthreaded row plus zero or more per-thread rows; inline-1 catches the dominant case (a single unthreaded marker) without a heap alloc.
ThreadKind πŸ”’
Stored thread-kind tag: "" for Unthreaded, "main" for Main, or the event-id string for Thread(...). v3+ event ids are 44 bytes including the leading $; 48 bytes inline matches the project’s StateKey budget and stays inline for every realistic thread root.