Trait acter_core::models::ActerModel
source · 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
Object Safety§
This trait is not object safe.