Enum Trivial

pub enum Trivial

A type with trivial move constructor and no destructor, which can therefore be owned and moved around in Rust code without requiring indirection.

Trait Implementations

impl Kind for Trivial

Auto Trait Implementations

impl Freeze for Trivial

impl RefUnwindSafe for Trivial

impl Send for Trivial

impl Sync for Trivial

impl Unpin for Trivial

impl UnsafeUnpin for Trivial

impl UnwindSafe for Trivial

Blanket Implementations

impl<T> Any for Trivial where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Trivial where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Trivial where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Trivial

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for Trivial where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Trivial where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Trivial where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>