pub struct DecodeContext { /* private fields */ }Expand description
Context passed through every Decode::decode call.
Carries the IPC session actor address and the remote actor registry which are needed to
reconstruct RemoteAddresss during decoding.
Implementations§
Source§impl DecodeContext
impl DecodeContext
Sourcepub fn new(session: Address<Session>, registry: RemoteActorRegistry) -> Self
pub fn new(session: Address<Session>, registry: RemoteActorRegistry) -> Self
Constructs a new DecodeContext from the given remote session and the actor registry.
Sourcepub fn create_encode_context(&self) -> EncodeContext
pub fn create_encode_context(&self) -> EncodeContext
Creates a new EncodeContext from this context.
Sourcepub fn create_remote_address(
&self,
actor_id: u64,
) -> Result<RemoteAddress, DecodeError>
pub fn create_remote_address( &self, actor_id: u64, ) -> Result<RemoteAddress, DecodeError>
Creates a new RemoteAddress from the given actor ID.
Trait Implementations§
Source§impl Clone for DecodeContext
impl Clone for DecodeContext
Source§fn clone(&self) -> DecodeContext
fn clone(&self) -> DecodeContext
Returns a duplicate of the value. Read more
1.0.0 · 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 DecodeContext
impl !RefUnwindSafe for DecodeContext
impl Send for DecodeContext
impl Sync for DecodeContext
impl Unpin for DecodeContext
impl UnsafeUnpin for DecodeContext
impl !UnwindSafe for DecodeContext
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