[−][src]Struct c_bridge::GenericArray
An interface to work with FfiObjects
containing an array
Important: You should not specialize this trait by yourself; use the predefined types instead
(DataArray
and ObjectArray
)
Methods
impl<T: 'static> GenericArray<T>
[src]
pub fn as_slice(&self) -> &[T]
[src]
The underlying elements as slice
pub fn as_slice_mut(&mut self) -> &mut [T]
[src]
The underlying elements as mutable slice
pub fn move_into_vec(self) -> Result<Vec<T>, Self>
[src]
Moves the underlying memory from the array-payload out of the underlying FfiObject
and
creates a Vec<_>
from it
Note: this only works if the array was created using from_vec
Trait Implementations
impl<T: 'static> From<GenericArray<T>> for FfiObject
[src]
fn from(array: GenericArray<T>) -> Self
[src]
impl From<Vec<u8>> for GenericArray<u8>
[src]
fn from(vec: Vec<u8>) -> Self
[src]
Creates a new array from vec
and wraps it into a wrapped and owned FfiObject
impl From<Vec<FfiObject>> for GenericArray<FfiObject>
[src]
fn from(vec: Vec<FfiObject>) -> Self
[src]
Creates a new array from vec
and wraps it into a wrapped and owned FfiObject
impl<T: 'static> TryFrom<FfiObject> for GenericArray<T>
[src]
Auto Trait Implementations
impl<T> !Send for GenericArray<T>
impl<T> Unpin for GenericArray<T> where
T: Unpin,
T: Unpin,
impl<T> !Sync for GenericArray<T>
impl<T> RefUnwindSafe for GenericArray<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for GenericArray<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,