Skip to main content

Module utils

Module utils 

Source

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::time::Duration; πŸ”’
use ruma::EventId; πŸ”’
use ruma::MilliSecondsSinceUnixEpoch; πŸ”’
use ruma::OwnedEventId; πŸ”’
use ruma::RoomId; πŸ”’
use ruma::TransactionId; πŸ”’
use ruma::UserId; πŸ”’
use ruma::api::client::filter::FilterDefinition; πŸ”’
use ruma::profile::ProfileFieldName; πŸ”’
use ruma::thirdparty::Medium; πŸ”’
use serde_json::Value as JsonValue; πŸ”’
use tokio::time::Instant; πŸ”’
use tuwunel_core::Err; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::err; πŸ”’
use tuwunel_core::utils::string::str_from_bytes; πŸ”’
use tuwunel_core::utils::time::millis; πŸ”’
use tuwunel_core::warn; πŸ”’
use tuwunel_matrix::Event; πŸ”’
use tuwunel_service::Services; πŸ”’
use crate::Ruma; πŸ”’

FunctionsΒ§

bind_new_account_email πŸ”’
Bind a new account’s canonical email address unless another account holds it.
check_email_domain πŸ”’
Rejects a canonical email address whose domain is forbidden for new bindings.
invite_check πŸ”’
is_self_redaction πŸ”’
may_set_profile_field πŸ”’
Whether the caller may change a profile field under profile.enable_set_displayname and profile.enable_set_avatar_url.
normalize_profile_fields πŸ”’
poll_deadline πŸ”’
When a long poll of timeout milliseconds starting now gives up.
sender_is_guest πŸ”’
Whether the sender of a request is a guest.
sync_deadline πŸ”’
When the long poll of a sync-like request gives up.
txnid_event_id πŸ”’
Decodes the event ID a room transaction stored as its response.
txnid_unsigned πŸ”’
The unsigned fields carrying a client’s transaction ID on the event it sent.