Skip to main content

OutRef

Struct OutRef 

pub struct OutRef<'a, T: Type<T>>(/* private fields */);
Expand description

A borrowed ABI-compatible out parameter.

Implementations§

§

impl<T: Type<T>> OutRef<'_, T>

pub fn is_null(&self) -> bool

Returns true if the argument is null.

pub fn write(self, value: T::Default) -> Result<()>

Writes a value without reading or dropping the previous contents.

Trait Implementations§

§

impl<T: Type<T>> Default for OutRef<'_, T>

§

fn default() -> Self

Returns the “default value” for a type. Read more
§

impl<'a, T: Type<T>> From<&'a mut <T as Type<T>>::Default> for OutRef<'a, T>

§

fn from(from: &'a mut T::Default) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a, T> !Send for OutRef<'a, T>

§

impl<'a, T> !Sync for OutRef<'a, T>

§

impl<'a, T> Freeze for OutRef<'a, T>
where *mut <T as Type<T>>::Abi: Freeze, PhantomData<&'a T>: Freeze,

§

impl<'a, T> RefUnwindSafe for OutRef<'a, T>
where *mut <T as Type<T>>::Abi: RefUnwindSafe, PhantomData<&'a T>: RefUnwindSafe,

§

impl<'a, T> Unpin for OutRef<'a, T>
where *mut <T as Type<T>>::Abi: Unpin, PhantomData<&'a T>: Unpin,

§

impl<'a, T> UnsafeUnpin for OutRef<'a, T>
where *mut <T as Type<T>>::Abi: UnsafeUnpin, PhantomData<&'a T>: UnsafeUnpin,

§

impl<'a, T> UnwindSafe for OutRef<'a, T>
where *mut <T as Type<T>>::Abi: UnwindSafe, PhantomData<&'a T>: UnwindSafe,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.