Skip to main content

Parse

Trait Parse 

Source
pub trait Parse<I: ParseInput>: Sized {
    // Required method
    fn parse(input: I) -> Result<Self>;
}
Expand description

This can be parsed by consuming the whole rest of the input.

Nothing can be parsed after this. It’s implementation’s responsibility to ensure there are no leftover bytes.

Required Methods§

Source

fn parse(input: I) -> Result<Self>

Parse consuming the whole stream.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, B: 'a + ToOwned<Owned: Parse<I>> + ?Sized, I: ParseInput> Parse<I> for Cow<'a, B>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<'a, T: 'a + FullHash, I: PointInput<Extra: Send + Sync + ExtraFor<T>>> Parse<I> for Arc<dyn SingularFetch<T = T> + 'a>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<A, O: BitOrder, __I: ParseInput> Parse<__I> for BitArray<A, O>
where PhantomData<O>: ParseInline<__I>, A: Parse<__I> + BitViewSized,

Available on crate feature bitvec only.
Source§

fn parse(input: __I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for ()

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for Bytes

Available on crate feature bytes only.
Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for BytesMut

Available on crate feature bytes only.
Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for CString

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for Infallible

Source§

fn parse(_: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<i8>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<i16>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<i32>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<i64>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<i128>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<u8>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<u16>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<u32>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<u64>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for NonZero<u128>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for Ordering

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for String

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for Ulid

Available on crate feature ulid only.
Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for bool

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for char

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for f32

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for f64

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for i8

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for i16

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for i32

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for i64

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for i128

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for u8

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for u16

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for u32

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for u64

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: ParseInput> Parse<I> for u128

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: PointInput> Parse<I> for Arc<dyn Resolve + '_>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<I: PointInput> Parse<I> for Arc<dyn Singular + '_>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: Parse<II>> Parse<II> for (A, B)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: Parse<II>> Parse<II> for (A, B, C)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: Parse<II>> Parse<II> for (A, B, C, D)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: Parse<II>> Parse<II> for (A, B, C, D, E)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: Parse<II>> Parse<II> for (A, B, C, D, E, F)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: ParseInline<II>, G: Parse<II>> Parse<II> for (A, B, C, D, E, F, G)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: ParseInline<II>, G: ParseInline<II>, H: Parse<II>> Parse<II> for (A, B, C, D, E, F, G, H)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: ParseInline<II>, G: ParseInline<II>, H: ParseInline<II>, I: Parse<II>> Parse<II> for (A, B, C, D, E, F, G, H, I)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: ParseInline<II>, G: ParseInline<II>, H: ParseInline<II>, I: ParseInline<II>, J: Parse<II>> Parse<II> for (A, B, C, D, E, F, G, H, I, J)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: ParseInline<II>, G: ParseInline<II>, H: ParseInline<II>, I: ParseInline<II>, J: ParseInline<II>, K: Parse<II>> Parse<II> for (A, B, C, D, E, F, G, H, I, J, K)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<II: ParseInput, A: ParseInline<II>, B: ParseInline<II>, C: ParseInline<II>, D: ParseInline<II>, E: ParseInline<II>, F: ParseInline<II>, G: ParseInline<II>, H: ParseInline<II>, I: ParseInline<II>, J: ParseInline<II>, K: ParseInline<II>, L: Parse<II>> Parse<II> for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

fn parse(input: II) -> Result<Self>

Source§

impl<K: ParseInline<I> + Eq + Hash, V: ParseInline<I>, I: ParseInput> Parse<I> for IndexMap<K, V>

Available on crate feature indexmap only.
Source§

fn parse(input: I) -> Result<Self>

Source§

impl<K: ParseInline<I> + Ord, V: ParseInline<I>, I: ParseInput> Parse<I> for BTreeMap<K, V>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T, I: PointInput<Extra: Send + Sync + ExtraFor<T>>> Parse<I> for Arc<dyn Send + Sync + ExtraFor<T>>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ?Sized, I: ParseInput> Parse<I> for PhantomData<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: OptionParse<I>, I: ParseInput> Parse<I> for Option<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: Parse<I>, I: ParseInput> Parse<I> for (T,)

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: Parse<I>, I: ParseInput> Parse<I> for Arc<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: Parse<I>, I: ParseInput> Parse<I> for Box<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ParseInline<I> + Eq + Hash, I: ParseInput> Parse<I> for IndexSet<T>

Available on crate feature indexmap only.
Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ParseInline<I> + Ord, I: ParseInput> Parse<I> for BTreeSet<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ParseInline<I>, I: ParseInput> Parse<I> for Vec<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ParseInline<I>, I: ParseInput> Parse<I> for VecDeque<T>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ParseInline<I>, N: ArrayLength, I: ParseInput> Parse<I> for GenericArray<T, N>

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<T: ParseInline<I>, const N: usize, I: ParseInput> Parse<I> for [T; N]

Source§

fn parse(input: I) -> Result<Self>

Source§

impl<const S: usize, I: ParseInput> Parse<I> for CidGeneric<S>

Available on crate feature cid only.
Source§

fn parse(input: I) -> Result<Self>

Implementors§

Source§

impl<A: Parse<I> + PlainCollection<Item = Ae>, B: Parse<I> + PlainCollection<Item = Be>, I: ParseInput, Ae: Size, Be: Size> Parse<I> for TupleOfArrays<A, B>

Source§

impl<A: ParseInline<I> + PartialEq + Default, B: Parse<I> + Default, I: ParseInput> Parse<I> for DefaultChain<A, B>

Source§

impl<E: 'static + Clone, F: ParseFetch<E>, X: 'static + Clone + Fetch<T = E>, I: PointInput<Extra = X>> Parse<I> for FetchExtra<F>

Source§

impl<Extra, __I: ParseInput> Parse<__I> for Extras<Extra>
where Self: ParseInline<__I>,

Source§

impl<Extra, __I: ParseInput> Parse<__I> for InlineExtra<Extra>
where Extra: Parse<__I>,

Source§

impl<K, __I: ParseInput> Parse<__I> for PartialByteTag<K>
where Self: ParseInline<__I>,

Source§

impl<M, I: ParseInput> Parse<I> for SmExtra<M>

Source§

impl<M: 'static + Send + Sync + Clone + ParseInline<I> + TryMap<X, Mapped = E>, E: 'static + Send + Sync + Clone, X: 'static + Send + Sync + Clone, T: Parse<J>, I: PointInput<Extra = X, WithExtra<E> = J>, J: ParseInput> Parse<I> for MappedExtra<T, M>

Source§

impl<T, A, __I: ParseInput> Parse<__I> for Dt<T, A>
where Self: ParseInline<__I>,

Source§

impl<T, E, __I: ParseInput> Parse<__I> for Ent<T, E>
where Extras<E>: ParseInline<__I>, Nt<T>: Parse<__I>,

Source§

impl<T, E, __I: ParseInput> Parse<__I> for ExtraArray<T, E>

Source§

impl<T, Extra, __I: ParseInput> Parse<__I> for Addressed<T, Extra>
where Extras<Extra>: ParseInline<__I>, AddressedBytes: ParseInline<__I>, ObjectMarker<T>: Parse<__I>,

Source§

impl<T, I: ParseInput> Parse<I> for AssertRefless<T>
where T: for<'r> Parse<ReflessInput<'r>>,

Source§

impl<T, __I: ParseInput> Parse<__I> for Be<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for Le<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for Local<T>
where T: Parse<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for Lp<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for LpVec<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for Nt<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for NtString<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for ParseExtra<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for RuntimeArray<T>
where Self: ParseInline<__I>,

Source§

impl<T, __I: ParseInput> Parse<__I> for Zt<T>
where Self: ParseInline<__I>,

Source§

impl<T, const MAX: usize, __I: ParseInput> Parse<__I> for EnumTag<T, MAX>
where Self: ParseInline<__I>,

Source§

impl<T: ?Sized, __I: ParseInput> Parse<__I> for ObjectMarker<T>
where PhantomData<fn() -> T>: Parse<__I>,

Source§

impl<T: IntoIterator<Item = A> + FromIterator<A>, A: ParseInline<I>, I: ParseInput> Parse<I> for Sequence<T>

Source§

impl<T: OptionParse<I>, I: PointInput> Parse<I> for ExtraOption<T, I::Extra>

Source§

impl<T: Parse<I> + ToOutput, I: ParseInput> Parse<I> for WithRepr<T>

Source§

impl<__I: ParseInput> Parse<__I> for Address
where Self: ParseInline<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for AddressedBytes
where Address: ParseInline<__I>, Arc<dyn Resolve>: Parse<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for Ff
where Self: ParseInline<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for Hash
where Self: ParseInline<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for LpBytes
where Self: ParseInline<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for LpString
where Self: ParseInline<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for NicheCut

Source§

impl<__I: ParseInput> Parse<__I> for OptionalHash
where [u8; 32]: Parse<__I>,

Source§

impl<__I: ParseInput> Parse<__I> for U63
where Self: ParseInline<__I>,