Struct metal::ArrayRef

source ·
pub struct ArrayRef<T>(/* private fields */)
where
    T: ForeignType + 'static,
    T::Ref: Message + 'static;

Trait Implementations§

source§

impl<T> Borrow<ArrayRef<T>> for Array<T>
where T: ForeignType + 'static, T::Ref: Message + 'static,

source§

fn borrow(&self) -> &ArrayRef<T>

Immutably borrows from an owned value. Read more
source§

impl<T> ForeignTypeRef for ArrayRef<T>
where T: ForeignType + 'static, T::Ref: Message + 'static,

§

type CType = NSArray<T>

The raw C type.
source§

unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self

Constructs a shared instance of this type from its raw type. Read more
source§

unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self

Constructs a mutable reference of this type from its raw type. Read more
source§

fn as_ptr(&self) -> *mut Self::CType

Returns a raw pointer to the wrapped value.
source§

impl<T> Message for ArrayRef<T>
where T: ForeignType + 'static, T::Ref: Message + 'static,

source§

unsafe fn send_message<A, R>( &self, sel: Sel, args: A, ) -> Result<R, MessageError>
where Self: Sized, A: MessageArguments, R: Any,

Sends a message to self with the given selector and arguments. Read more
source§

fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
where Self: Sized, A: EncodeArguments, R: Encode,

Verifies that the argument and return types match the encoding of the method for the given selector. Read more
source§

impl<T> ToOwned for ArrayRef<T>
where T: ForeignType + 'static, T::Ref: Message + 'static,

§

type Owned = Array<T>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Array<T>

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more

Auto Trait Implementations§

§

impl<T> Freeze for ArrayRef<T>

§

impl<T> !RefUnwindSafe for ArrayRef<T>

§

impl<T> !Send for ArrayRef<T>

§

impl<T> !Sync for ArrayRef<T>

§

impl<T> Unpin for ArrayRef<T>
where T: Unpin,

§

impl<T> UnwindSafe for ArrayRef<T>
where 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>,

§

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>,

§

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.