Skip to main content

Module evaluate

Module evaluate 

Source

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::collections::VecDeque; πŸ”’
use std::iter::empty; πŸ”’
use std::pin::pin; πŸ”’
use futures::StreamExt; πŸ”’
use futures::TryFutureExt; πŸ”’
use futures::TryStreamExt; πŸ”’
use futures::future::join; πŸ”’
use futures::future::try_join; πŸ”’
use ruma::OwnedRoomId; πŸ”’
use ruma::RoomId; πŸ”’
use ruma::UserId; πŸ”’
use ruma::api::client::push::EmailPusherData; πŸ”’
use ruma::api::client::push::Pusher; πŸ”’
use ruma::api::client::push::PusherKind; πŸ”’
use ruma::events::room::member::MembershipState; πŸ”’
use ruma::push::Action; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use serde_json::Value as JsonValue; πŸ”’
use tuwunel_core::Error; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::is_not_equal_to; πŸ”’
use tuwunel_core::result::NotFound; πŸ”’
use tuwunel_core::utils::BoolExt; πŸ”’
use tuwunel_core::utils::future::OptionFutureExt; πŸ”’
use tuwunel_core::utils::stream::BroadbandExt; πŸ”’
use tuwunel_core::utils::stream::IterStream; πŸ”’
use tuwunel_core::utils::stream::ReadyExt; πŸ”’
use tuwunel_core::utils::stream::TryReadyExt; πŸ”’
use tuwunel_core::utils::stream::TryWidebandExt; πŸ”’
use tuwunel_core::warn; πŸ”’
use tuwunel_database::Cbor; πŸ”’
use tuwunel_database::Deserialized; πŸ”’
use tuwunel_matrix::Event; πŸ”’
use tuwunel_matrix::pdu::Pdu; πŸ”’
use tuwunel_matrix::pdu::PduId; πŸ”’
use tuwunel_matrix::pdu::RawPduId; πŸ”’
use super::render::SHOWN; πŸ”’
use crate::pusher::Notified; πŸ”’
use crate::rooms::short::ShortRoomId; πŸ”’
use crate::sendmail::Address; πŸ”’
use crate::threepid::canonicalize_email; πŸ”’

StructsΒ§

Pending πŸ”’
Scan πŸ”’
What a scan of a pusher’s notification rows gathered.
Throttle πŸ”’
One room’s mail throttle for one email pusher.

EnumsΒ§

Outcome
What one evaluation of an email pusher found.

ConstantsΒ§

REVISIT_MIN_MS πŸ”’
The soonest a pusher is evaluated again for a notification still being written, in milliseconds.
THROTTLE_MAX_MS πŸ”’
The longest a room’s throttle grows, one day in milliseconds.
THROTTLE_MULTIPLIER πŸ”’
Factor a room’s throttle grows by with each mail naming it.

FunctionsΒ§

deliverable πŸ”’
The address a pushkey is mailed at: its canonical form, the one the binding was verified under.
due_at πŸ”’
The earliest a notification that arrived at ts may be mailed.
effective_throttle πŸ”’
A stored throttle as it applies now.
email_data πŸ”’
gather πŸ”’
Folds one scanned row, and the notification it leaves to mail, into the scan.
invites πŸ”’
keep πŸ”’
readable πŸ”’
A notification row or key read past after, or its error when a retry may read it.
sent_throttle πŸ”’
A room’s throttle once a mail naming it has gone out.
transient_or_none πŸ”’
The error when a retry may succeed, else None, which skips what failed.

Type AliasesΒ§

PendingRooms πŸ”’
RoomThrottle πŸ”’
StoredRow πŸ”’
Throttles πŸ”’