pub enum Packet {
Data(Vec<u8>),
Flush,
Delim,
ResponseEnd,
}Expand description
One pkt-line.
Flush, Delim, and ResponseEnd are length fields (0000, 0001, 0002),
not data payloads. Data is pkt-len + payload, with payload.len() == pkt-len - 4.
Variants§
Data(Vec<u8>)
Binary data pkt-line (8-bit clean). Payload does not include the 4 length bytes.
Flush
flush-pkt 0000 (gitprotocol-common). Distinct from an empty data line 0004.
Delim
delim-pkt 0001 (gitprotocol-v2). Separates sections of a message.
ResponseEnd
response-end-pkt 0002 (gitprotocol-v2). Ends a response on a stateless connection.
Trait Implementations§
impl Eq for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl Forget for Packet
impl Freeze for Packet
impl Move for Packet
impl RefUnwindSafe for Packet
impl Send for Packetwhere
RawVecInner: Send,
impl Sync for Packetwhere
RawVecInner: Sync,
impl Unpin for Packet
impl UnsafeUnpin for Packet
impl UnwindSafe for Packetwhere
RawVecInner: UnwindSafe,
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