Skip to main content

Service

Struct Service 

Source
pub struct Service<T>
where T: XrpcClient + Send + Sync,
{ /* private fields */ }
Available on crate feature namespace-toolsozone only.

Implementations§

Source§

impl<T> Service<T>
where T: XrpcClient + Send + Sync,

Source

pub async fn assign_moderator(&self, input: Input) -> Result<Output, Error>

Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.

Source

pub async fn close_reports(&self, input: Input) -> Result<Output, Error>

Close all reports on a subject matching the given criteria. Reports whose current status does not permit a transition to closed are skipped silently. Intended for automated flows that resolve reports without taking action on the subject.

Source

pub async fn create_activity(&self, input: Input) -> Result<Output, Error>

Register an activity on a report. For state-change activity types, validates the transition and updates report.status atomically.

Source

pub async fn get_assignments(&self, params: Parameters) -> Result<Output, Error>

Get assignments for reports.

Source

pub async fn get_historical_stats( &self, params: Parameters, ) -> Result<Output, Error>

Get historical daily report statistics. Returns a paginated list of daily stat snapshots, newest first. Filter by queue, moderator, or report type.

Source

pub async fn get_latest_report( &self, params: Parameters, ) -> Result<Output, Error>

Get the most recent report.

Source

pub async fn get_live_stats(&self, params: Parameters) -> Result<Output, Error>

Get live report statistics from the past 24 hours. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.

Source

pub async fn get_report(&self, params: Parameters) -> Result<Output, Error>

Get details about a single moderation report by ID.

Source

pub async fn list_activities(&self, params: Parameters) -> Result<Output, Error>

List all activities for a report, sorted most-recent-first.

Source

pub async fn query_activities( &self, params: Parameters, ) -> Result<Output, Error>

Query report activities across all reports, ordered by createdAt. Used by downstream pollers; for per-report activity history use listActivities.

Source

pub async fn query_reports(&self, params: Parameters) -> Result<Output, Error>

View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.

Source

pub async fn reassign_queue(&self, input: Input) -> Result<Output, Error>

Manually reassign a report to a different queue (or unassign it). Records a queueActivity entry on the report.

Source

pub async fn refresh_stats(&self, input: Input) -> Result<Output, Error>

Recompute report statistics for a date range. Useful for backfilling after failures or data corrections.

Source

pub async fn unassign_moderator(&self, input: Input) -> Result<Output, Error>

Remove report assignment.

Auto Trait Implementations§

§

impl<T> Freeze for Service<T>
where Arc<T>: Freeze, PhantomData<T>: Freeze,

§

impl<T> RefUnwindSafe for Service<T>

§

impl<T> Send for Service<T>
where Arc<T>: Send, PhantomData<T>: Send,

§

impl<T> Sync for Service<T>
where Arc<T>: Sync, PhantomData<T>: Sync,

§

impl<T> Unpin for Service<T>
where Arc<T>: Unpin, PhantomData<T>: Unpin,

§

impl<T> UnsafeUnpin for Service<T>

§

impl<T> UnwindSafe for Service<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, C> Cacheable<C> for T

Source§

fn cached(self, cache: C) -> Cached<T, C>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Throttleable<P> for T
where P: Default,

Source§

fn throttled(self) -> Throttled<T, P>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.