Skip to main content

MappedBuffer

Struct MappedBuffer 

Source
pub struct MappedBuffer<'a, T: DeviceRepr> { /* private fields */ }

Implementations§

Source§

impl<T: DeviceRepr> MappedBuffer<'_, T>

Source

pub const fn as_ptr(&self) -> *const T

Source

pub const fn as_mut_ptr(&mut self) -> *mut T

Source

pub const fn len(&self) -> usize

Source

pub const fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl<'a, T: Debug + DeviceRepr> Debug for MappedBuffer<'a, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: DeviceRepr> DeviceSlice<T> for MappedBuffer<'_, T>

Source§

impl<T: DeviceRepr> DeviceSliceMut<T> for MappedBuffer<'_, T>

Source§

impl<T: DeviceRepr> Drop for MappedBuffer<'_, T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<T: DeviceRepr> PushKernelArg for &MappedBuffer<'_, T>

Source§

fn push_to<'a>(self, params: &mut KernelParameters<'a>)

Source§

impl<T: DeviceRepr> PushKernelArg for &mut MappedBuffer<'_, T>

Source§

fn push_to<'a>(self, params: &mut KernelParameters<'a>)

Source§

impl<T: DeviceRepr + Send> Send for MappedBuffer<'_, T>

Source§

impl<T: DeviceRepr + Sync> Sync for MappedBuffer<'_, T>

Auto Trait Implementations§

§

impl<'a, T> Freeze for MappedBuffer<'a, T>

§

impl<'a, T> RefUnwindSafe for MappedBuffer<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Unpin for MappedBuffer<'a, T>

§

impl<'a, T> UnsafeUnpin for MappedBuffer<'a, T>

§

impl<'a, T> UnwindSafe for MappedBuffer<'a, T>
where T: RefUnwindSafe,

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<B> ByteBuffer for B
where B: DeviceSlice<u8> + ?Sized,

Source§

impl<B> ByteBufferMut for B
where B: DeviceSliceMut<u8> + ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T, B> DeviceBuffer<T> for B
where T: DeviceRepr, B: DeviceSlice<T> + ?Sized,

Source§

impl<T, B> DeviceBufferMut<T> for B
where T: DeviceRepr, B: DeviceBuffer<T> + DeviceSliceMut<T> + ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

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.