Skip to main content

OutRef

Struct OutRef 

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

A borrowed ABI-compatible out parameter.

Implementations§

§

impl<T: Type> 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> Default for OutRef<'_, T>

§

fn default() -> Self

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

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

§

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

Releases the previous owned value before borrowing the output storage.

Auto Trait Implementations§

§

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

§

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

§

impl<'a, T> Forget for OutRef<'a, T>

§

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

§

impl<'a, T> Move for OutRef<'a, T>

§

impl<'a, T> RefUnwindSafe for OutRef<'a, T>
where <T as Type<<T as TypeKind>::TypeKind>>::Abi: RefUnwindSafe, T: RefUnwindSafe,

§

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

§

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

§

impl<'a, T> UnwindSafe for OutRef<'a, T>
where *mut <T as Type<<T as TypeKind>::TypeKind>>::Abi: UnwindSafe, &'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.