Struct guestmem::ranges::PagedRanges
source · pub struct PagedRanges<'a, T> { /* private fields */ }
Expand description
A list of PagedRange
s.
Implementations§
source§impl<'a, T: Iterator<Item = PagedRange<'a>> + Clone> PagedRanges<'a, T>
impl<'a, T: Iterator<Item = PagedRange<'a>> + Clone> PagedRanges<'a, T>
sourcepub fn new<I>(ranges: I) -> Selfwhere
I: IntoIterator<IntoIter = T>,
pub fn new<I>(ranges: I) -> Selfwhere
I: IntoIterator<IntoIter = T>,
Constructs a list wrapping an iterator.
source§impl<'a, T: Iterator<Item = PagedRange<'a>>> PagedRanges<'a, T>
impl<'a, T: Iterator<Item = PagedRange<'a>>> PagedRanges<'a, T>
sourcepub fn truncate(&mut self, len: usize)
pub fn truncate(&mut self, len: usize)
Returns a new list limited to len
bytes.
Panics if len
is larger than the range’s length.
sourcepub fn paged_ranges(self) -> PagedRangesIter<'a, T> ⓘ
pub fn paged_ranges(self) -> PagedRangesIter<'a, T> ⓘ
Returns an iterator of the remaining paged ranges.
sourcepub fn reader(self, mem: &'a GuestMemory) -> PagedRangesReader<'a, T>
pub fn reader(self, mem: &'a GuestMemory) -> PagedRangesReader<'a, T>
Returns a MemoryRead
implementation for the ranges.
sourcepub fn writer(self, mem: &'a GuestMemory) -> PagedRangesWriter<'a, T>
pub fn writer(self, mem: &'a GuestMemory) -> PagedRangesWriter<'a, T>
Returns a MemoryWrite
implementation for the ranges.
Trait Implementations§
source§impl<'a, T: Clone> Clone for PagedRanges<'a, T>
impl<'a, T: Clone> Clone for PagedRanges<'a, T>
source§fn clone(&self) -> PagedRanges<'a, T>
fn clone(&self) -> PagedRanges<'a, T>
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 moreAuto Trait Implementations§
impl<'a, T> Freeze for PagedRanges<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for PagedRanges<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for PagedRanges<'a, T>where
T: Send,
impl<'a, T> Sync for PagedRanges<'a, T>where
T: Sync,
impl<'a, T> Unpin for PagedRanges<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for PagedRanges<'a, T>where
T: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)