Struct combine::stream::SliceStream [−][src]
pub struct SliceStream<'a, T: 'a>(pub &'a [T]);
Newtype for constructing a stream from a slice where the items in the slice are not copyable.
Trait Implementations
impl<'a, T> DefaultPositioned for SliceStream<'a, T>[src]
impl<'a, T> DefaultPositioned for SliceStream<'a, T>type Positioner = IndexPositioner
impl<'a, T> Resetable for SliceStream<'a, T>[src]
impl<'a, T> Resetable for SliceStream<'a, T>impl<'a, T: Copy + 'a> Copy for SliceStream<'a, T>[src]
impl<'a, T: Copy + 'a> Copy for SliceStream<'a, T>impl<'a, T: Eq + 'a> Eq for SliceStream<'a, T>[src]
impl<'a, T: Eq + 'a> Eq for SliceStream<'a, T>impl<'a, T: PartialEq + 'a> PartialEq for SliceStream<'a, T>[src]
impl<'a, T: PartialEq + 'a> PartialEq for SliceStream<'a, T>fn eq(&self, other: &SliceStream<'a, T>) -> bool[src]
fn eq(&self, other: &SliceStream<'a, T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &SliceStream<'a, T>) -> bool[src]
fn ne(&self, other: &SliceStream<'a, T>) -> boolThis method tests for !=.
impl<'a, T: Ord + 'a> Ord for SliceStream<'a, T>[src]
impl<'a, T: Ord + 'a> Ord for SliceStream<'a, T>fn cmp(&self, other: &SliceStream<'a, T>) -> Ordering[src]
fn cmp(&self, other: &SliceStream<'a, T>) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl<'a, T: PartialOrd + 'a> PartialOrd for SliceStream<'a, T>[src]
impl<'a, T: PartialOrd + 'a> PartialOrd for SliceStream<'a, T>fn partial_cmp(&self, other: &SliceStream<'a, T>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &SliceStream<'a, T>) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &SliceStream<'a, T>) -> bool[src]
fn lt(&self, other: &SliceStream<'a, T>) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &SliceStream<'a, T>) -> bool[src]
fn le(&self, other: &SliceStream<'a, T>) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &SliceStream<'a, T>) -> bool[src]
fn gt(&self, other: &SliceStream<'a, T>) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &SliceStream<'a, T>) -> bool[src]
fn ge(&self, other: &SliceStream<'a, T>) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<'a, T: Debug + 'a> Debug for SliceStream<'a, T>[src]
impl<'a, T: Debug + 'a> Debug for SliceStream<'a, T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, T> Clone for SliceStream<'a, T>[src]
impl<'a, T> Clone for SliceStream<'a, T>fn clone(&self) -> SliceStream<'a, T>[src]
fn clone(&self) -> SliceStream<'a, T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'a, T> Positioned for SliceStream<'a, T> where
T: PartialEq + 'a, [src]
impl<'a, T> Positioned for SliceStream<'a, T> where
T: PartialEq + 'a, impl<'a, T> StreamOnce for SliceStream<'a, T> where
T: PartialEq + 'a, [src]
impl<'a, T> StreamOnce for SliceStream<'a, T> where
T: PartialEq + 'a, type Item = &'a T
The type of items which is yielded from this stream.
type Range = &'a [T]
The type of a range of items yielded from this stream. Types which do not a have a way of yielding ranges of items should just use the Self::Item for this type. Read more
type Position = PointerOffset
Type which represents the position in a stream. Ord is required to allow parsers to determine which of two positions are further ahead. Read more
type Error = UnexpectedParse
fn uncons(&mut self) -> Result<&'a T, StreamErrorFor<Self>>[src]
fn uncons(&mut self) -> Result<&'a T, StreamErrorFor<Self>>Takes a stream and removes its first item, yielding the item and the rest of the elements. Returns Err if no element could be retrieved. Read more
fn is_partial(&self) -> bool[src]
fn is_partial(&self) -> boolReturns true if this stream only contains partial input. Read more
impl<'a, T> RangeStreamOnce for SliceStream<'a, T> where
T: PartialEq + 'a, [src]
impl<'a, T> RangeStreamOnce for SliceStream<'a, T> where
T: PartialEq + 'a, fn uncons_range(&mut self, size: usize) -> Result<&'a [T], StreamErrorFor<Self>>[src]
fn uncons_range(&mut self, size: usize) -> Result<&'a [T], StreamErrorFor<Self>>Takes size elements from the stream. Fails if the length of the stream is less than size. Read more
fn uncons_while<F>(&mut self, f: F) -> Result<&'a [T], StreamErrorFor<Self>> where
F: FnMut(Self::Item) -> bool, [src]
fn uncons_while<F>(&mut self, f: F) -> Result<&'a [T], StreamErrorFor<Self>> where
F: FnMut(Self::Item) -> bool, Takes items from stream, testing each one with predicate. returns the range of items which passed predicate. Read more
fn uncons_while1<F>(
&mut self,
f: F
) -> FastResult<Self::Range, StreamErrorFor<Self>> where
F: FnMut(Self::Item) -> bool, [src]
fn uncons_while1<F>(
&mut self,
f: F
) -> FastResult<Self::Range, StreamErrorFor<Self>> where
F: FnMut(Self::Item) -> bool, Takes items from stream, testing each one with predicate returns a range of at least one items which passed predicate. Read more
fn distance(&self, end: &Self) -> usize[src]
fn distance(&self, end: &Self) -> usizeReturns the distance between self and end. The returned usize must be so that Read more
impl<'a, T> FullRangeStream for SliceStream<'a, T> where
T: PartialEq + 'a, [src]
impl<'a, T> FullRangeStream for SliceStream<'a, T> where
T: PartialEq + 'a, Auto Trait Implementations
impl<'a, T> Send for SliceStream<'a, T> where
T: Sync,
impl<'a, T> Send for SliceStream<'a, T> where
T: Sync, impl<'a, T> Sync for SliceStream<'a, T> where
T: Sync,
impl<'a, T> Sync for SliceStream<'a, T> where
T: Sync,