Trait compose_spec::AsShort

source ·
pub trait AsShort {
    type Short: ?Sized;

    // Required method
    fn as_short(&self) -> Option<&Self::Short>;
}
Expand description

Trait for types that represent a long syntax which could also be represented in a short syntax.

Required Associated Types§

source

type Short: ?Sized

The short syntax type, returned from as_short().

Required Methods§

source

fn as_short(&self) -> Option<&Self::Short>

Returns Some if the long syntax can be represented as the short syntax.

Implementations on Foreign Types§

source§

impl<T> AsShort for &T
where T: AsShort,

§

type Short = <T as AsShort>::Short

source§

fn as_short(&self) -> Option<&Self::Short>

Implementors§