pub struct IdArray<T: RawDeviceId, U: 'static, const N: usize> { /* private fields */ }Expand description
A zero-terminated device id array, followed by context data.
Implementations§
Source§impl<T: RawDeviceId + RawDeviceIdIndex, U: 'static, const N: usize> IdArray<T, U, N>
impl<T: RawDeviceId + RawDeviceIdIndex, U: 'static, const N: usize> IdArray<T, U, N>
Sourcepub const fn new(ids: [(T, &'static U); N]) -> Self
pub const fn new(ids: [(T, &'static U); N]) -> Self
Creates a new instance of the array.
The contents are derived from the given identifiers and context information.
Source§impl<T: RawDeviceId, const N: usize> IdArray<T, (), N>
impl<T: RawDeviceId, const N: usize> IdArray<T, (), N>
Sourcepub const fn new_without_index(ids: [T; N]) -> Self
pub const fn new_without_index(ids: [T; N]) -> Self
Creates a new instance of the array without writing index values.
The contents are derived from the given identifiers and context information.
If the device implements RawDeviceIdIndex, consider using IdArray::new instead.
Trait Implementations§
impl<T: RawDeviceId, U: Sync + 'static, const N: usize> Send for IdArray<T, U, N>
impl<T: RawDeviceId, U: Sync + 'static, const N: usize> Sync for IdArray<T, U, N>
Auto Trait Implementations§
impl<T, U, const N: usize> Freeze for IdArray<T, U, N>
impl<T, U, const N: usize> RefUnwindSafe for IdArray<T, U, N>
impl<T, U, const N: usize> Unpin for IdArray<T, U, N>
impl<T, U, const N: usize> UnsafeUnpin for IdArray<T, U, N>
impl<T, U, const N: usize> UnwindSafe for IdArray<T, U, N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.