Skip to main content

Module create

Module create 

Source
Expand description

Constructs and signs local room events without persisting them.

The builder derives authorization events, depth, predecessor hashes, and unsigned prior-state data from the current room. Room-version rules then govern canonical hashing, signing, event IDs, and room IDs.

Re-exportsยง

use std::cmp; ๐Ÿ”’
use futures::StreamExt; ๐Ÿ”’
use futures::TryStreamExt; ๐Ÿ”’
use ruma::CanonicalJsonObject; ๐Ÿ”’
use ruma::CanonicalJsonValue; ๐Ÿ”’
use ruma::MilliSecondsSinceUnixEpoch; ๐Ÿ”’
use ruma::OwnedRoomId; ๐Ÿ”’
use ruma::RoomId; ๐Ÿ”’
use ruma::UserId; ๐Ÿ”’
use ruma::events::TimelineEventType; ๐Ÿ”’
use ruma::events::room::create::RoomCreateEventContent; ๐Ÿ”’
use ruma::room_version_rules::RoomIdFormatVersion; ๐Ÿ”’
use ruma::uint; ๐Ÿ”’
use serde_json::value::to_raw_value; ๐Ÿ”’
use tuwunel_core::Err; ๐Ÿ”’
use tuwunel_core::Error; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::err; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::utils::IterStream; ๐Ÿ”’
use tuwunel_core::utils::ReadyExt; ๐Ÿ”’
use tuwunel_core::utils::TryReadyExt; ๐Ÿ”’
use tuwunel_core::utils::millis_since_unix_epoch; ๐Ÿ”’
use tuwunel_core::utils::stream::TryIgnore; ๐Ÿ”’
use tuwunel_core::utils::to_canonical_object; ๐Ÿ”’
use tuwunel_matrix::event::Event; ๐Ÿ”’
use tuwunel_matrix::pdu::EventHash; ๐Ÿ”’
use tuwunel_matrix::pdu::PduBuilder; ๐Ÿ”’
use tuwunel_matrix::pdu::PduEvent; ๐Ÿ”’
use tuwunel_matrix::pdu::PrevEvents; ๐Ÿ”’
use tuwunel_matrix::pdu::check_rules; ๐Ÿ”’
use tuwunel_matrix::room::state::resolution::auth_check; ๐Ÿ”’
use tuwunel_matrix::room_version; ๐Ÿ”’
use super::RoomMutexGuard; ๐Ÿ”’