Skip to main content

Unparsable

Trait Unparsable 

Source
pub trait Unparsable<C: Context> {
    // Required method
    fn to_unit(&self, context: &C) -> Unit;
}
Expand description

The reverse of Parsable: emits a token Unit from a value.

Round-trip target: for a value v of type T: Parsable<C> + Unparsable<C>, parsing the unit returned by v.to_unit(context) yields a value equal to v.

Required Methods§

Source

fn to_unit(&self, context: &C) -> Unit

Produces the unit representing self in the given context.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<C: Context, T: Unparsable<C> + ?Sized> Unparsable<C> for Arc<T>

Source§

fn to_unit(&self, context: &C) -> Unit

Source§

impl<C: Context, T: Unparsable<C> + ?Sized> Unparsable<C> for Box<T>

Source§

fn to_unit(&self, context: &C) -> Unit

Source§

impl<C: Context, T: Unparsable<C> + ?Sized> Unparsable<C> for Rc<T>

Source§

fn to_unit(&self, context: &C) -> Unit

Source§

impl<C: Context, T: Unparsable<C>> Unparsable<C> for Vec<T>

Source§

fn to_unit(&self, context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for PathBuf

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for String

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for bool

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for f32

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for f64

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for i8

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for i16

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for i32

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for i64

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for i128

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for str

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for u8

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for u16

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for u32

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for u64

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for u128

Source§

fn to_unit(&self, _context: &C) -> Unit

Source§

impl<C: Context> Unparsable<C> for usize

Source§

fn to_unit(&self, _context: &C) -> Unit

Implementors§