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", so this trait is not object safe.

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, 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 Ordering

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 i8

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 ()

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 String

Source§

fn parse(input: 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<u8>

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: PointInput> Parse<I> for Arc<dyn Resolve>

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> + 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: Parse<I> + MaybeHasNiche<MnArray: MnArray<MaybeNiche: Niche<NeedsTag = B>>>, B: OptionParseBit<T, 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 Box<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: 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 VecDeque<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>, 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<T: ?Sized, I: ParseInput> Parse<I> for PhantomData<T>

Source§

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

Implementors§

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: 'static + Send + Sync + Clone + ParseInline<I> + MapExtra<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, __I: ParseInput> Parse<__I> for Lp<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 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<__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 Address
where Self: ParseInline<__I>,

Source§

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

Source§

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

Source§

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

Source§

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