[−][src]Struct voladdress::VolSeries
A series of evenly strided addresses.
- The
COUNT
parameter is the element count of the series. - The
STRIDE
parameter is the stride (in bytes) from one element to the next.
This is for when you have something like "a series of 128 u16
values every
16 bytes starting at 0x700_0000
".
Methods
impl<T, const COUNT: usize, const STRIDE: usize> VolSeries<T, COUNT, STRIDE>
[src]
pub const unsafe fn new(address: usize) -> Self
[src]
Constructs a new VolSeries
.
Safety
The given address must be a valid VolAddress
at each position in the
series for COUNT slots with stride STRIDE.
pub const fn len(self) -> usize
[src]
The length of this series (in elements)
ⓘImportant traits for VolStridingIter<T, STRIDE>pub const fn iter(self) -> VolStridingIter<T, STRIDE>
[src]
ⓘImportant traits for VolStridingIter<T, STRIDE>
Gives an iterator over the slots of this series.
pub const unsafe fn index_unchecked(self, slot: usize) -> VolAddress<T>
[src]
pub fn index(self, slot: usize) -> VolAddress<T>
[src]
Checked "indexing" style access into the series, giving either a VolAddress
or a panic.
pub fn get(self, slot: usize) -> Option<VolAddress<T>>
[src]
Checked "getting" style access into the series, giving an Option value.
Trait Implementations
impl<T, const COUNT: usize, const STRIDE: usize> Clone for VolSeries<T, COUNT, STRIDE>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T, const COUNT: usize, const STRIDE: usize> Copy for VolSeries<T, COUNT, STRIDE>
[src]
impl<T, const COUNT: usize, const STRIDE: usize> Debug for VolSeries<T, COUNT, STRIDE>
[src]
impl<T, const COUNT: usize, const STRIDE: usize> Eq for VolSeries<T, COUNT, STRIDE>
[src]
impl<T, const COUNT: usize, const STRIDE: usize> PartialEq<VolSeries<T, COUNT, STRIDE>> for VolSeries<T, COUNT, STRIDE>
[src]
Auto Trait Implementations
impl<const COUNT: usize, const STRIDE: usize, T> !Send for VolSeries<T, COUNT, STRIDE>
impl<const COUNT: usize, const STRIDE: usize, T> !Sync for VolSeries<T, COUNT, STRIDE>
impl<const COUNT: usize, const STRIDE: usize, T> Unpin for VolSeries<T, COUNT, STRIDE>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,