pub struct Array<B, T, Item> { /* private fields */ }Implementations§
Source§impl<B, T, Item> Array<B, T, Item>
impl<B, T, Item> Array<B, T, Item>
Sourcepub unsafe fn from_raw_parts(data: B, len: usize) -> Array<B, T, Item>
pub unsafe fn from_raw_parts(data: B, len: usize) -> Array<B, T, Item>
Creates an array from raw parts. This function assumes that data has the number of items specified by len.
§Arguments
data: the data buffer.len: the number of items to be read from the buffer.
§Safety
A wrong length could result in UB where the array iterator, getter or setter attempts to slice out of bounds with a future optimization in release builds, currently it will only result in a panic.
Source§impl<B: AsRef<[u8]>, T, Item: Size> Array<B, T, Item>
impl<B: AsRef<[u8]>, T, Item: Size> Array<B, T, Item>
pub fn from_parts(data: B, len: usize) -> Option<Array<B, T, Item>>
Trait Implementations§
Source§impl<'a, T: FromBytes<'a, Output: ToUsize>, Item: Size> FromBytes<'a> for Array<&'a [u8], T, Item>
impl<'a, T: FromBytes<'a, Output: ToUsize>, Item: Size> FromBytes<'a> for Array<&'a [u8], T, Item>
Source§impl<B: AsRef<[u8]>, T: WriteTo<Input<'static>: ToUsize>, Item> WriteTo for Array<B, T, Item>
impl<B: AsRef<[u8]>, T: WriteTo<Input<'static>: ToUsize>, Item> WriteTo for Array<B, T, Item>
impl<B: Copy, T: Copy, Item: Copy> Copy for Array<B, T, Item>
Auto Trait Implementations§
impl<B, T, Item> Freeze for Array<B, T, Item>where
B: Freeze,
impl<B, T, Item> RefUnwindSafe for Array<B, T, Item>
impl<B, T, Item> Send for Array<B, T, Item>
impl<B, T, Item> Sync for Array<B, T, Item>
impl<B, T, Item> Unpin for Array<B, T, Item>
impl<B, T, Item> UnwindSafe for Array<B, T, Item>
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