Enum git_packetline::decode::Stream
source · [−]pub enum Stream<'a> {
Complete {
line: PacketLineRef<'a>,
bytes_consumed: usize,
},
Incomplete {
bytes_needed: usize,
},
}
Expand description
A utility return type to support incremental parsing of packet lines.
Variants
Complete
Fields
line: PacketLineRef<'a>
The parsed packet line
bytes_consumed: usize
The amount of bytes consumed from input
Indicate a single packet line was parsed completely
Incomplete
Fields
bytes_needed: usize
The amount of additional bytes needed for the parsing to complete
A packet line could not yet be parsed to to missing bytes
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Stream<'a>
impl<'a> Send for Stream<'a>
impl<'a> Sync for Stream<'a>
impl<'a> Unpin for Stream<'a>
impl<'a> UnwindSafe for Stream<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more