#[non_exhaustive]pub enum Scalar<'a, T> {
Host(&'a T),
Device(DeviceScalar<T>),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Host(&'a T)
Device(DeviceScalar<T>)
Implementations§
Trait Implementations§
impl<'a, T: Copy> Copy for Scalar<'a, T>
Source§impl<T> From<DeviceScalar<T>> for Scalar<'_, T>
impl<T> From<DeviceScalar<T>> for Scalar<'_, T>
Source§fn from(value: DeviceScalar<T>) -> Self
fn from(value: DeviceScalar<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, T> !Send for Scalar<'a, T>
impl<'a, T> !Sync for Scalar<'a, T>
impl<'a, T> Freeze for Scalar<'a, T>
impl<'a, T> RefUnwindSafe for Scalar<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for Scalar<'a, T>
impl<'a, T> UnsafeUnpin for Scalar<'a, T>
impl<'a, T> UnwindSafe for Scalar<'a, T>where
T: RefUnwindSafe,
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