Trait entity::PrimitiveLike[][src]

pub trait PrimitiveLike: Sized {
    fn into_primitive(self) -> Primitive;
fn try_from_primitive(primitive: Primitive) -> Result<Self, Primitive>; }

Represents some data that can be converted to and from a Primitive

Required methods

fn into_primitive(self) -> Primitive[src]

Consumes this data, converting it into an abstract Primitive

fn try_from_primitive(primitive: Primitive) -> Result<Self, Primitive>[src]

Attempts to convert an abstract Primitive into this data, returning the owned value back if unable to convert

Loading content...

Implementations on Foreign Types

impl PrimitiveLike for bool[src]

impl PrimitiveLike for char[src]

impl PrimitiveLike for ()[src]

Loading content...

Implementors

Loading content...