pub enum PlusHeader {
Length(u64),
PeriodTerminated,
UntilClose,
Error,
}Expand description
The first line of a Gopher+ reply.
The first character is + for success or - for failure, followed by a
decimal token: a byte count, -1 for a period-terminated body, or -2 for
a body that ends when the connection closes.
Variants§
Length(u64)
+<count>: the body is exactly this many bytes.
PeriodTerminated
+-1: read until a . on a line of its own.
UntilClose
+-2: read until the connection closes. Binary-safe, since no
terminator can collide with the payload.
Error
--1: the request failed. The body carries the error text and is
period-terminated.
Trait Implementations§
Source§impl Clone for PlusHeader
impl Clone for PlusHeader
Source§fn clone(&self) -> PlusHeader
fn clone(&self) -> PlusHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlusHeader
impl Debug for PlusHeader
impl Eq for PlusHeader
Source§impl PartialEq for PlusHeader
impl PartialEq for PlusHeader
impl StructuralPartialEq for PlusHeader
Auto Trait Implementations§
impl Freeze for PlusHeader
impl RefUnwindSafe for PlusHeader
impl Send for PlusHeader
impl Sync for PlusHeader
impl Unpin for PlusHeader
impl UnsafeUnpin for PlusHeader
impl UnwindSafe for PlusHeader
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