pub struct ControlDecoder<'a> { /* private fields */ }Expand description
Incremental receive-pack control decoding with one caller-owned packet
buffer. Persist each borrowed command/option before calling read again.
No pack bytes are consumed. Duplicate refs, old-value CAS, fast-forwards,
authorization and shallow-update policy are host validation responsibilities.
Implementations§
Source§impl<'a> ControlDecoder<'a>
impl<'a> ControlDecoder<'a>
pub fn new( storage: &'a mut [u8], format: ObjectFormat, offered: Capabilities, limits: Limits, ) -> Result<Self>
pub fn capabilities(&self) -> Capabilities
Sourcepub fn read(
&mut self,
input: &[u8],
end_of_input: bool,
) -> Result<ControlProgress<'_>>
pub fn read( &mut self, input: &[u8], end_of_input: bool, ) -> Result<ControlProgress<'_>>
EOF before the last control flush is a terminal error. End refers only
to the control section; the host must still require and validate the pack
or require transport EOF for a deletion-only/no-op request.
Auto Trait Implementations§
impl<'a> !UnwindSafe for ControlDecoder<'a>
impl<'a> Freeze for ControlDecoder<'a>
impl<'a> RefUnwindSafe for ControlDecoder<'a>
impl<'a> Send for ControlDecoder<'a>
impl<'a> Sync for ControlDecoder<'a>
impl<'a> Unpin for ControlDecoder<'a>
impl<'a> UnsafeUnpin for ControlDecoder<'a>
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