pub struct Input<'a> {
    bytes: &'a [u8],
    start_of_line: bool,
}

Fields

bytes: &'a [u8]start_of_line: bool

Trait Implementations

While it might be possible in some settings to determine that the connection has closed and no further data may arrive, it is quite irrelevant considering the particular syntax of GTP. The only use case would be determining malformed input which ends without proper termination but this is currently beyond the scope of this implementation.

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
compares self to another value for equality
compares self to another value for equality independently of the case. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
returns an iterator over the elements and their byte offsets
returns an iterator over the elements
finds the byte position of the element
get the byte offset from the element’s position in the stream
calculates the input length, as indicated by its name, and the name of the trait itself Read more
returns a slice of count bytes. panics if count > length
split the stream at the count byte offset. panics if count > length
offset between the first byte of self and the first byte of the argument

This allows us to use a default implementation for InputTakeAtPosition.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.