Skip to main content

Module moderation

Module moderation 

Source
Expand description

Suspensions and locks a foreign database records.

Some databases keep suspension and lock state in columns of their own, with a richer value. tuwunel keeps only the forensic when and by, with a row’s presence as the flag, and copies each active foreign entry over on every boot.

Re-exportsΒ§

use std::borrow::Cow; πŸ”’
use std::fmt; πŸ”’
use std::sync::Arc; πŸ”’
use futures::FutureExt; πŸ”’
use futures::Stream; πŸ”’
use futures::StreamExt; πŸ”’
use futures::future::BoxFuture; πŸ”’
use ruma::MilliSecondsSinceUnixEpoch; πŸ”’
use ruma::UserId; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::arrayvec::ArrayVec; πŸ”’
use tuwunel_core::result::NotFound; πŸ”’
use tuwunel_core::utils::BoolExt; πŸ”’
use tuwunel_core::utils::IterStream; πŸ”’
use tuwunel_core::utils::TryReadyExt; πŸ”’
use tuwunel_core::utils::stream::TryBroadbandExt; πŸ”’
use tuwunel_database::Json; πŸ”’
use tuwunel_database::KeyBuf; πŸ”’
use tuwunel_database::Map; πŸ”’
use tuwunel_database::serialize_val; πŸ”’
use super::Check; πŸ”’
use super::Report; πŸ”’
use super::ScanExt; πŸ”’
use super::Summary; πŸ”’
use super::tally; πŸ”’
use crate::Services; πŸ”’
use crate::users::Moderation; πŸ”’

StructsΒ§

Foreign πŸ”’
A foreign entry, of which tuwunel keeps the time and the actor.
Source
A foreign moderation column the database holds, opened.

EnumsΒ§

Entry πŸ”’
One foreign entry as the copy reads it.
Finding
A foreign entry the copy has yet to carry over, or cannot.

ConstantsΒ§

COLUMNS πŸ”’
Each foreign column, with the column its entries copy into.

StaticsΒ§

CHECK πŸ”’

FunctionsΒ§

entries πŸ”’
Streams every active entry of a foreign column, and every entry that does not decode.
entry πŸ”’
Reads one foreign row as the copy and the check do.
finding πŸ”’
Judges one foreign entry against its target row as scan does.
scan
Streams each active entry of a foreign column that its target lacks or holds otherwise, and each entry that does not decode.
sources
Opens each foreign moderation column the database holds.
to_moderation πŸ”’
Maps a foreign entry to tuwunel’s own record.
walk πŸ”’

Type AliasesΒ§

Sources πŸ”’