pub trait Actor: 'static {
// Required methods
async fn invoke(&self, req: &[u8]) -> Result<Vec<u8>, Global>;
async fn size(&self) -> Result<u64, Global>;
// Provided methods
async fn metadata(&self) -> Result<Arc<Metadata>, Global> { ... }
fn id(&self) -> Option<ActorId> { ... }
async fn instance_count(&self) -> Result<u8, Global> { ... }
}
Required Methods§
async fn invoke(&self, req: &[u8]) -> Result<Vec<u8>, Global>
async fn size(&self) -> Result<u64, Global>
Provided Methods§
async fn metadata(&self) -> Result<Arc<Metadata>, Global>
fn id(&self) -> Option<ActorId>
async fn instance_count(&self) -> Result<u8, Global>
Object Safety§
This trait is not object safe.