Struct krnl_core::buffer::BufferBase
source · pub struct BufferBase<S> { /* private fields */ }Expand description
A buffer.
Slice implements Index and UnsafeSlice implements UnsafeIndex.
Implementations§
source§impl<S: DataBase> BufferBase<S>
impl<S: DataBase> BufferBase<S>
sourcepub fn scalar_type(&self) -> ScalarType
pub fn scalar_type(&self) -> ScalarType
The scalar type.
source§impl<'a, T: Scalar> BufferBase<SliceRepr<'a, T>>
impl<'a, T: Scalar> BufferBase<SliceRepr<'a, T>>
source§impl<'a, T: Scalar> BufferBase<UnsafeSliceRepr<'a, T>>
impl<'a, T: Scalar> BufferBase<UnsafeSliceRepr<'a, T>>
sourcepub fn as_mut_ptr(&self) -> *mut T
pub fn as_mut_ptr(&self) -> *mut T
A mutable pointer to the buffer’s data.
Trait Implementations§
source§impl<S: Clone> Clone for BufferBase<S>
impl<S: Clone> Clone for BufferBase<S>
source§fn clone(&self) -> BufferBase<S>
fn clone(&self) -> BufferBase<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<S: UnsafeData> UnsafeIndex<usize> for BufferBase<S>
impl<S: UnsafeData> UnsafeIndex<usize> for BufferBase<S>
source§unsafe fn unsafe_index(&self, index: usize) -> &Self::Output
unsafe fn unsafe_index(&self, index: usize) -> &Self::Output
Safety
The caller must ensure that the returned reference is not aliased by a mutable borrow, ie by a call to .unsafe_index_mut() with the same index.
impl<S: Copy> Copy for BufferBase<S>
Auto Trait Implementations§
impl<S> RefUnwindSafe for BufferBase<S>where
S: RefUnwindSafe,
impl<S> Send for BufferBase<S>where
S: Send,
impl<S> Sync for BufferBase<S>where
S: Sync,
impl<S> Unpin for BufferBase<S>where
S: Unpin,
impl<S> UnwindSafe for BufferBase<S>where
S: UnwindSafe,
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