pub enum CallPacket {
Request(CallRequest),
Reply(CallReply),
Cancel(u64),
Topology(Zeroizing<Vec<u8>>),
}Expand description
A control/body kind inside the existing sealed LinkMessage envelope.
Nothing here derives Debug over a credential, payload or contract.
Variants§
Request(CallRequest)
Execute one original request through the far admission path.
Reply(CallReply)
Return its original wire answer.
Cancel(u64)
Cancel only this exact link-local operation.
Topology(Zeroizing<Vec<u8>>)
A far exchange’s own whole topology, never a guessed station list.
Implementations§
Source§impl CallPacket
impl CallPacket
Sourcepub fn is_call(bytes: &[u8]) -> bool
pub fn is_call(bytes: &[u8]) -> bool
Whether a decrypted crossing uses this explicitly versioned body.
Sourcepub fn encode(&self, bound: usize) -> Result<Zeroizing<Vec<u8>>, CallError>
pub fn encode(&self, bound: usize) -> Result<Zeroizing<Vec<u8>>, CallError>
Encodes within the configured body bound before Noise allocation.
§Errors
The packet or nested frame exceeds the bound or is invalid.
Sourcepub fn decode(bytes: &[u8], bound: usize) -> Result<Self, CallError>
pub fn decode(bytes: &[u8], bound: usize) -> Result<Self, CallError>
Decodes exact lengths and refuses any trailing bytes.
§Errors
Unknown version/kind, malformed nested wire or a configured bound refusal.
Auto Trait Implementations§
impl Freeze for CallPacket
impl RefUnwindSafe for CallPacket
impl Send for CallPacket
impl Sync for CallPacket
impl Unpin for CallPacket
impl UnsafeUnpin for CallPacket
impl UnwindSafe for CallPacket
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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