Struct gorrosion_gtp::input::engine::Input
source · Fields
bytes: &'a [u8]
start_of_line: bool
Trait Implementations
sourceimpl<'a> AtEof for Input<'a>
impl<'a> AtEof for Input<'a>
sourcefn at_eof(&self) -> bool
fn at_eof(&self) -> bool
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.
sourceimpl<'a, S> Compare<S> for Input<'a>where
&'a [u8]: Compare<S>,
impl<'a, S> Compare<S> for Input<'a>where
&'a [u8]: Compare<S>,
sourcefn compare(&self, t: S) -> CompareResult
fn compare(&self, t: S) -> CompareResult
compares self to another value for equality
sourcefn compare_no_case(&self, t: S) -> CompareResult
fn compare_no_case(&self, t: S) -> CompareResult
compares self to another value for equality
independently of the case. Read more
sourceimpl<'a> InputIter for Input<'a>
impl<'a> InputIter for Input<'a>
type Item = u8
type RawItem = u8
type Iter = Enumerator<'a>
type IterElem = Iterator<'a>
sourcefn iter_indices(&self) -> Self::Iter
fn iter_indices(&self) -> Self::Iter
returns an iterator over the elements and their byte offsets
sourcefn iter_elements(&self) -> Self::IterElem
fn iter_elements(&self) -> Self::IterElem
returns an iterator over the elements
sourcefn position<P>(&self, predicate: P) -> Option<usize>where
P: Fn(Self::RawItem) -> bool,
fn position<P>(&self, predicate: P) -> Option<usize>where
P: Fn(Self::RawItem) -> bool,
finds the byte position of the element
sourcefn slice_index(&self, count: usize) -> Option<usize>
fn slice_index(&self, count: usize) -> Option<usize>
get the byte offset from the element’s position in the stream
sourceimpl<'a> InputLength for Input<'a>
impl<'a> InputLength for Input<'a>
sourceimpl<'a> InputTake for Input<'a>
impl<'a> InputTake for Input<'a>
sourcefn take_split(&self, count: usize) -> (Self, Self)
fn take_split(&self, count: usize) -> (Self, Self)
split the stream at the
count
byte offset. panics if count > lengthimpl<'a> ParseTo for Input<'a>
impl<'a> Slice for Input<'a>
impl<'a> UnspecializedInput for Input<'a>
This allows us to use a default implementation
for InputTakeAtPosition
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Input<'a>
impl<'a> Send for Input<'a>
impl<'a> Sync for Input<'a>
impl<'a> Unpin for Input<'a>
impl<'a> UnwindSafe for Input<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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