Trait Actor

Source
pub trait Actor {
    // Required method
    fn to_subject(&self) -> SubjectReference;
}
Expand description

Implement the Actor trait for any struct that will represent someone/something taking action in your system. it could for example be an enum wrapping User/Organization/Service if those are entities that can take action.

pub enum SystemActor {
    User(Uuid),
    Organization(String),
    Service(Uuid),
}

Required Methods§

Implementors§