Enum hotdrink_rs::builders::method_builder::MethodArg[][src]

pub enum MethodArg<'a, T> {
    Ref(&'a T),
    MutRef(&'a mut T),
}

An argument passed in to a method. This should match the corresponding parameter type.

Variants

Ref(&'a T)

An immutable reference.

MutRef(&'a mut T)

A mutable reference.

Implementations

impl<'a, T> MethodArg<'a, T>[src]

pub fn try_into_ref<U>(self) -> Result<&'a U, ConversionError> where
    &'a T: TryInto<&'a U>, 
[src]

Try to convert his MethorArg<'a, T> to a &'a T.

pub fn try_into_mut<U>(self) -> Result<&'a mut U, ConversionError> where
    &'a mut T: TryInto<&'a mut U>, 
[src]

Try to convert his MethorArg<'a, T> to a &'a mut T.

Trait Implementations

impl<'a, T: Debug> Debug for MethodArg<'a, T>[src]

impl<'a, T: Eq> Eq for MethodArg<'a, T>[src]

impl<'a, T> From<&'a T> for MethodArg<'a, T>[src]

impl<'a, T> From<&'a mut T> for MethodArg<'a, T>[src]

impl<'a, T: PartialEq> PartialEq<MethodArg<'a, T>> for MethodArg<'a, T>[src]

impl<'a, T> StructuralEq for MethodArg<'a, T>[src]

impl<'a, T> StructuralPartialEq for MethodArg<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for MethodArg<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for MethodArg<'a, T> where
    T: Send + Sync

impl<'a, T> Sync for MethodArg<'a, T> where
    T: Sync

impl<'a, T> Unpin for MethodArg<'a, T>

impl<'a, T> !UnwindSafe for MethodArg<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.