pub struct ContextHeader { /* private fields */ }Expand description
Header carrying serialized context bytes for wire transport.
Attached by ContextOutboundInterceptor
on the sender side. Deserialized on the receiver side by
ContextInboundInterceptor or
the handler via extract_context.
For remote transport, register the deserializer with
register_context_headers at startup.
Implementations§
Source§impl ContextHeader
impl ContextHeader
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn from_bytes(bytes: Vec<u8>) -> Self
Create a ContextHeader from raw wire bytes.
Used by the HeaderRegistry deserializer to reconstruct this header
from bytes received over the wire.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContextHeader
impl RefUnwindSafe for ContextHeader
impl Send for ContextHeader
impl Sync for ContextHeader
impl Unpin for ContextHeader
impl UnsafeUnpin for ContextHeader
impl UnwindSafe for ContextHeader
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