Trait Parsable

Source
pub trait Parsable<'a, F>: Sized {
    type Error;

    // Required method
    fn parse(st: View<'a, F>) -> Result<(Self, View<'a, F>), Self::Error>;
}
Expand description

Trait for parsable objects, which can be built from a string.

Required Associated Types§

Source

type Error

Error type.

Required Methods§

Source

fn parse(st: View<'a, F>) -> Result<(Self, View<'a, F>), Self::Error>

Parses the object from a string.

§Errors

If match doesn’t happen then Self::Error is returned.

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.

Implementors§