pub struct MaybePartialStream<S>(pub S, pub bool);

Tuple Fields§

§0: S§1: bool

Trait Implementations§

source§

impl<S: Clone> Clone for MaybePartialStream<S>

source§

fn clone(&self) -> MaybePartialStream<S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Debug> Debug for MaybePartialStream<S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S: Ord> Ord for MaybePartialStream<S>

source§

fn cmp(&self, other: &MaybePartialStream<S>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<S: PartialEq> PartialEq for MaybePartialStream<S>

source§

fn eq(&self, other: &MaybePartialStream<S>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: PartialOrd> PartialOrd for MaybePartialStream<S>

source§

fn partial_cmp(&self, other: &MaybePartialStream<S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S> Positioned for MaybePartialStream<S>
where S: Positioned,

source§

fn position(&self) -> Self::Position

Returns the current position of the stream.
source§

impl<S> RangeStreamOnce for MaybePartialStream<S>
where S: RangeStreamOnce,

source§

fn uncons_range( &mut self, size: usize ) -> Result<Self::Range, StreamErrorFor<Self>>

Takes size elements from the stream. Fails if the length of the stream is less than size.
source§

fn uncons_while<F>(&mut self, f: F) -> Result<Self::Range, StreamErrorFor<Self>>
where F: FnMut(Self::Token) -> bool,

Takes items from stream, testing each one with predicate. returns the range of items which passed predicate.
source§

fn uncons_while1<F>( &mut self, f: F ) -> ParseResult<Self::Range, StreamErrorFor<Self>>
where F: FnMut(Self::Token) -> bool,

Takes items from stream, testing each one with predicate returns a range of at least one items which passed predicate. Read more
source§

fn distance(&self, end: &Self::Checkpoint) -> usize

Returns the distance between self and end. The returned usize must be so that Read more
source§

fn range(&self) -> Self::Range

Returns the entire range of self
source§

impl<S> ResetStream for MaybePartialStream<S>
where S: ResetStream,

§

type Checkpoint = <S as ResetStream>::Checkpoint

source§

fn checkpoint(&self) -> Self::Checkpoint

Creates a Checkpoint at the current position which can be used to reset the stream later to the current position
source§

fn reset(&mut self, checkpoint: Self::Checkpoint) -> Result<(), S::Error>

Attempts to reset the stream to an earlier position.
source§

impl<S> StreamOnce for MaybePartialStream<S>
where S: StreamOnce,

§

type Token = <S as StreamOnce>::Token

The type of items which is yielded from this stream.
§

type Range = <S as StreamOnce>::Range

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::Token for this type.
§

type Position = <S as StreamOnce>::Position

Type which represents the position in a stream. Ord is required to allow parsers to determine which of two positions are further ahead.
§

type Error = <S as StreamOnce>::Error

source§

fn uncons(&mut self) -> Result<S::Token, StreamErrorFor<Self>>

Takes a stream and removes its first token, yielding the token and the rest of the elements. Returns Err if no element could be retrieved.
source§

fn is_partial(&self) -> bool

Returns true if this stream only contains partial input. Read more
source§

impl<S: Copy> Copy for MaybePartialStream<S>

source§

impl<S: Eq> Eq for MaybePartialStream<S>

source§

impl<S> StructuralPartialEq for MaybePartialStream<S>

Auto Trait Implementations§

§

impl<S> Freeze for MaybePartialStream<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for MaybePartialStream<S>
where S: RefUnwindSafe,

§

impl<S> Send for MaybePartialStream<S>
where S: Send,

§

impl<S> Sync for MaybePartialStream<S>
where S: Sync,

§

impl<S> Unpin for MaybePartialStream<S>
where S: Unpin,

§

impl<S> UnwindSafe for MaybePartialStream<S>
where S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<Input> RangeStream for Input
where Input: RangeStreamOnce + Stream,

source§

impl<Input> Stream for Input