pub trait ActerModel: Debug {
// Required methods
fn indizes(&self, user_id: &UserId) -> Vec<String>;
fn event_id(&self) -> &EventId;
fn room_id(&self) -> &RoomId;
async fn execute(self, store: &Store) -> Result<Vec<String>>;
// Provided methods
fn belongs_to(&self) -> Option<Vec<String>> { ... }
fn capabilities(&self) -> &[Capability] { ... }
fn transition(&mut self, model: &AnyActerModel) -> Result<bool> { ... }
async fn redact(
&self,
store: &Store,
redaction_model: RedactedActerModel,
) -> Result<Vec<String>> { ... }
}
Required Methods§
Provided Methods§
Sourcefn belongs_to(&self) -> Option<Vec<String>>
fn belongs_to(&self) -> Option<Vec<String>>
The models to inform about this model as it belongs to that
Sourcefn capabilities(&self) -> &[Capability]
fn capabilities(&self) -> &[Capability]
activate to enable commenting support for this type of model
Sourcefn transition(&mut self, model: &AnyActerModel) -> Result<bool>
fn transition(&mut self, model: &AnyActerModel) -> Result<bool>
handle transition from an external Item upon us
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.