BiVec

Struct BiVec 

Source
pub struct BiVec<F, S> { /* private fields */ }

Implementations§

Source§

impl<F, S> BiVec<F, S>

Source

pub fn into_vecs(self) -> (Vec<F>, Vec<S>)

Source§

impl<F, S> BiVec<F, S>

Source

pub fn new() -> Self

Source

pub fn with_capacity(capacity: usize) -> Self

Source§

impl<F, S> BiVec<F, S>

Source

pub fn reserve(&mut self, additional: usize)

Source

pub fn reserve_exact(&mut self, additional: usize)

Source§

impl<F, S> BiVec<F, S>

Source

pub fn append(&mut self, other: &mut BiVec<F, S>)

Appends the contents of other to self.

§UNIMPLEMENTED
Source§

impl<F, S> BiVec<F, S>

Source

pub fn len(&self) -> usize

Source

pub fn capacity(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source§

impl<F, S> BiVec<F, S>

Source

pub fn split_at(&mut self, at: usize) -> !

§Unimplement
Source

pub fn split_off(&mut self, at: usize) -> !

§Unimplement
Source§

impl<F, S> BiVec<F, S>

Source

pub fn dedup_first_elements(&mut self)

§Unimplemented
Source

pub fn dedup_second_elements(&mut self)

§Unimplemented
Source§

impl<F, S> BiVec<F, S>

Source

pub fn splice( &mut self, range: impl RangeBounds<usize>, replace_with: impl IntoIterator<Item = (F, S)>, ) -> !

§Unimplemented
Source§

impl<F, S> BiVec<F, S>

Source

pub fn drain(&mut self, range: impl RangeBounds<usize>) -> !

§Unimplemented
Source§

impl<F, S> BiVec<F, S>

Source

pub fn clear(&mut self)

Source

pub fn trim(&mut self)

Source§

impl<F, S> BiVec<F, S>

Source

pub fn leak(self) -> (&'static mut [F], &'static mut [S])

Source§

impl<F, S> BiVec<F, S>

Source

pub fn spare_capacity_mut( &mut self, ) -> (&mut [MaybeUninit<F>], &mut [MaybeUninit<S>])

Returns the remaining spare capacity of the vector as two slices of MaybeUninit<F> and MaybeUninit<S>.

The returned slices can be used to fill the BiVec with data (e.g. by reading from a file) before marking the data as initialized using the set_len method.

Source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the BiVec to new_len.

This is a low-level operation that maintains none of the normal invariants of the type. Normally changing the length of a vector is done using other safe operations instead.

§Safety
  • new_len must be less than or equal to capacity().
  • The elements at old_len..new_len must be initialized.
Source§

impl<F, S> BiVec<F, S>

Source

pub fn swap_remove(&mut self, first_index: usize, second_index: usize) -> (F, S)

Removes the element at the given index, and returns it.

The removed element is replaced by the last element of the vector.

Source

pub fn swap_remove_same(&mut self, index: usize) -> (F, S)

Source

pub fn remove(&mut self, index: usize) -> (F, S)

Source

pub fn retain_mut(&mut self, f: impl FnMut(&mut F, &mut S) -> bool)

Source

pub fn retain(&mut self, f: impl FnMut(&F, &S) -> bool)

Source

pub fn truncate(&mut self, new_len: usize)

Source§

impl<F: Clone, S: Clone> BiVec<F, S>

Source

pub fn resize(&mut self, new_len: usize, value: (F, S))

Source

pub fn resize_with(&mut self, new_len: usize, f: impl FnMut() -> (F, S))

Source

pub fn extend_from_slice(&mut self, other: &[(F, S)])

Source

pub fn extend_from_within(&mut self, src: impl RangeBounds<usize>)

Source§

impl<F, S> BiVec<F, S>

Source

pub unsafe fn from_raw_parts( ptr1: *mut F, ptr2: *mut S, length: usize, capacity: usize, ) -> BiVec<F, S>

Source§

impl<F, S> BiVec<F, S>

Source

pub fn push(&mut self, f: F, s: S)

Source

pub fn insert(&mut self, index: usize, f: F, s: S)

Source

pub fn push_within_capacity(&mut self, f: F, s: S) -> Result<(), (F, S)>

Source§

impl<F, S> BiVec<F, S>

Source

pub fn as_slice(&self) -> (&[F], &[S])

Source

pub fn as_slice_mut(&mut self) -> (&mut [F], &mut [S])

Source§

impl<F, S> BiVec<F, S>

Source

pub fn as_ptr(&self) -> (*const F, *const S)

Source

pub fn as_mut_ptr(&mut self) -> (*mut F, *mut S)

Source§

impl<F, S> BiVec<F, S>

Source

pub fn into_boxed_slice(self) -> (Box<[F]>, Box<[S]>)

Trait Implementations§

Source§

impl<F, S> Drop for BiVec<F, S>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<F, S> Freeze for BiVec<F, S>

§

impl<F, S> RefUnwindSafe for BiVec<F, S>

§

impl<F, S> !Send for BiVec<F, S>

§

impl<F, S> !Sync for BiVec<F, S>

§

impl<F, S> Unpin for BiVec<F, S>

§

impl<F, S> UnwindSafe for BiVec<F, S>

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.