Skip to main content

Or

Struct Or 

Source
pub struct Or<T1: ?Sized, T2: ?Sized>(/* private fields */);

Trait Implementations§

Source§

impl<T, As1, As2> BorshDeserializeAs<T> for Or<As1, As2>
where As1: BorshDeserializeAs<T> + ?Sized, As2: BorshDeserializeAs<T> + ?Sized,

Source§

fn deserialize_as<R>(reader: &mut R) -> Result<T>
where R: Read,

Auto Trait Implementations§

§

impl<T1, T2> Freeze for Or<T1, T2>
where T1: ?Sized, T2: ?Sized,

§

impl<T1, T2> RefUnwindSafe for Or<T1, T2>
where T1: RefUnwindSafe + ?Sized, T2: RefUnwindSafe + ?Sized,

§

impl<T1, T2> Send for Or<T1, T2>
where T1: Send + ?Sized, T2: Send + ?Sized,

§

impl<T1, T2> Sync for Or<T1, T2>
where T1: Sync + ?Sized, T2: Sync + ?Sized,

§

impl<T1, T2> Unpin for Or<T1, T2>
where T1: Unpin + ?Sized, T2: Unpin + ?Sized,

§

impl<T1, T2> UnsafeUnpin for Or<T1, T2>
where T1: ?Sized, T2: ?Sized,

§

impl<T1, T2> UnwindSafe for Or<T1, T2>
where T1: UnwindSafe + ?Sized, T2: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.