mmap_vecdeque

Struct MmapVecDeque

Source
pub struct MmapVecDeque<T: Copy> { /* private fields */ }

Implementations§

Source§

impl<T: Copy> MmapVecDeque<T>

Source

pub fn open_or_create( dir: &Path, chunk_size: Option<usize>, ) -> Result<Self, MmapVecDequeError>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn push_back(&mut self, value: T) -> Result<(), MmapVecDequeError>

Source

pub fn push_front(&mut self, value: T) -> Result<(), MmapVecDequeError>

Source

pub fn pop_back(&mut self) -> Result<Option<T>, MmapVecDequeError>

Source

pub fn pop_front(&mut self) -> Result<Option<T>, MmapVecDequeError>

Source

pub fn front(&self) -> Option<T>
where T: Clone,

Source

pub fn back(&self) -> Option<T>
where T: Clone,

Source

pub fn clear(&mut self) -> Result<(), MmapVecDequeError>

Source

pub fn get(&self, index: usize) -> Option<T>
where T: Clone,

Source

pub fn get_mut(&mut self, index: usize) -> Result<Option<T>, MmapVecDequeError>
where T: Clone,

Source

pub fn commit(&self) -> Result<(), MmapVecDequeError>

Source

pub fn iter(&self) -> Iter<'_, T>

Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Auto Trait Implementations§

§

impl<T> !Freeze for MmapVecDeque<T>

§

impl<T> !RefUnwindSafe for MmapVecDeque<T>

§

impl<T> Send for MmapVecDeque<T>
where T: Send,

§

impl<T> Sync for MmapVecDeque<T>
where T: Sync,

§

impl<T> Unpin for MmapVecDeque<T>
where T: Unpin,

§

impl<T> UnwindSafe for MmapVecDeque<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.