pub struct Decoder { /* private fields */ }Implementations§
Source§impl Decoder
impl Decoder
pub fn buffered_payload_bytes(&self) -> usize
Sourcepub fn push(
&mut self,
bytes: &[u8],
context: Option<&Context>,
) -> Result<Vec<Frame>, &'static str>
pub fn push( &mut self, bytes: &[u8], context: Option<&Context>, ) -> Result<Vec<Frame>, &'static str>
Authorize only contexts registered by the authenticated connection owner, never a header’s own claims.
Sourcepub fn push_helper_requests(
&mut self,
bytes: &[u8],
authorize: impl Fn(&Context) -> bool,
bridge: Option<&Context>,
) -> Result<Vec<Frame>, &'static str>
pub fn push_helper_requests( &mut self, bytes: &[u8], authorize: impl Fn(&Context) -> bool, bridge: Option<&Context>, ) -> Result<Vec<Frame>, &'static str>
Helper requests: retired controls retain only the pinned bridge identity, never new-work authority.
Sourcepub fn push_replies(
&mut self,
bytes: &[u8],
owner: impl Fn(u64) -> Option<(Context, Option<String>)>,
) -> Result<Vec<Frame>, &'static str>
pub fn push_replies( &mut self, bytes: &[u8], owner: impl Fn(u64) -> Option<(Context, Option<String>)>, ) -> Result<Vec<Frame>, &'static str>
Client replies only: unknown request IDs are structurally checked and discarded, never delivered or treated as authenticated state. Request decoders do not use this.
pub fn finish(&self) -> Result<(), &'static str>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Decoder
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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