pub struct AttributesMut<'a> { /* private fields */ }Expand description
Checked mutable attribute components for destructive update simplification.
Implementations§
Source§impl<'a> AttributesMut<'a>
impl<'a> AttributesMut<'a>
Sourcepub fn from_interleaved(
data: &'a mut [f32],
count: usize,
width: usize,
stride: usize,
offset: usize,
) -> Result<Self, Error>
pub fn from_interleaved( data: &'a mut [f32], count: usize, width: usize, stride: usize, offset: usize, ) -> Result<Self, Error>
Borrow up to 32 components per interleaved float record.
§Errors
InvalidLayout for an unsupported width, stride, offset or buffer length;
SizeOverflow if view size arithmetic overflows.
Sourcepub fn from_bytes(
data: &'a mut [u8],
count: usize,
width: usize,
stride: usize,
offset: usize,
order: ByteOrder,
) -> Result<Self, Error>
pub fn from_bytes( data: &'a mut [u8], count: usize, width: usize, stride: usize, offset: usize, order: ByteOrder, ) -> Result<Self, Error>
Borrow initialized byte attributes with explicit byte order.
§Errors
InvalidLayout for an unsupported width, stride, offset or buffer length;
SizeOverflow if view size arithmetic overflows.
Sourcepub const fn components(&self) -> usize
pub const fn components(&self) -> usize
Number of components per record.
Sourcepub fn as_view(&self) -> Attributes<'_>
pub fn as_view(&self) -> Attributes<'_>
Borrow the same attributes read-only.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for AttributesMut<'a>
impl<'a> Forget for AttributesMut<'a>
impl<'a> Freeze for AttributesMut<'a>
impl<'a> Move for AttributesMut<'a>
impl<'a> RefUnwindSafe for AttributesMut<'a>
impl<'a> Send for AttributesMut<'a>
impl<'a> Sync for AttributesMut<'a>
impl<'a> Unpin for AttributesMut<'a>
impl<'a> UnsafeUnpin for AttributesMut<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more