pub struct ActorHandle {
tx: Sender<Command>,
}Expand description
Cheap, cloneable handle used by HTTP handlers to talk to the actor.
Fields§
§tx: Sender<Command>Implementations§
Source§impl ActorHandle
impl ActorHandle
Sourcepub async fn receipt(
&self,
body: Vec<u8>,
attachments: String,
) -> Result<ReceiptOutcome, ActorError>
pub async fn receipt( &self, body: Vec<u8>, attachments: String, ) -> Result<ReceiptOutcome, ActorError>
Submit an event for receipting (body JSON + CESR attachments).
Sourcepub async fn ingest(&self, msg: Vec<u8>) -> Result<(), ActorError>
pub async fn ingest(&self, msg: Vec<u8>) -> Result<(), ActorError>
Ingest a CESR stream from a peer (receipts, events) as a non-local source.
Sourcepub async fn oobi(
&self,
aid: String,
role: Option<String>,
) -> Result<Vec<u8>, ActorError>
pub async fn oobi( &self, aid: String, role: Option<String>, ) -> Result<Vec<u8>, ActorError>
The OOBI response stream for aid (only this witness’s own AID).
async fn request<T>( &self, make: impl FnOnce(Sender<Result<T, ActorError>>) -> Command, ) -> Result<T, ActorError>
Trait Implementations§
Source§impl Clone for ActorHandle
impl Clone for ActorHandle
Source§fn clone(&self) -> ActorHandle
fn clone(&self) -> ActorHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActorHandle
impl RefUnwindSafe for ActorHandle
impl Send for ActorHandle
impl Sync for ActorHandle
impl Unpin for ActorHandle
impl UnsafeUnpin for ActorHandle
impl UnwindSafe for ActorHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more