Skip to main content

ActivityExt

Trait ActivityExt 

Source
pub trait ActivityExt {
    // Required methods
    fn activity_enabled(&self) -> bool;
    async fn log_activity(
        &self,
        event: &str,
        subject_type: &str,
        subject_id: impl ToString,
        properties: Value,
    );
    async fn log_activity_as(
        &self,
        actor_id: Option<i64>,
        event: &str,
        subject_type: &str,
        subject_id: impl ToString,
        properties: Value,
    );
}
Expand description

Request helper for activity logging.

Required Methods§

Source

fn activity_enabled(&self) -> bool

Source

async fn log_activity( &self, event: &str, subject_type: &str, subject_id: impl ToString, properties: Value, )

Source

async fn log_activity_as( &self, actor_id: Option<i64>, event: &str, subject_type: &str, subject_id: impl ToString, properties: Value, )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ActivityExt for Request

Source§

fn activity_enabled(&self) -> bool

Source§

async fn log_activity( &self, event: &str, subject_type: &str, subject_id: impl ToString, properties: Value, )

Source§

async fn log_activity_as( &self, actor_id: Option<i64>, event: &str, subject_type: &str, subject_id: impl ToString, properties: Value, )

Implementors§