pub struct SyncVec<V> { /* private fields */ }
Implementations§
source§impl<V> SyncVec<V>
impl<V> SyncVec<V>
pub fn new_arc() -> Arc<Self>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn with_vec(vec: Vec<V>) -> Self
pub fn insert(&self, index: usize, v: V) -> Option<V>
pub fn set(&self, index: usize, v: V) -> Option<V>
pub fn push(&self, v: V) -> Option<V>
pub fn pushes(&self, arr: Vec<V>) -> Option<V>
pub fn push_mut(&mut self, v: V) -> Option<V>
pub fn pop(&self) -> Option<V>
pub fn pop_mut(&mut self) -> Option<V>
pub fn remove(&self, index: usize) -> Option<V>
pub fn remove_mut(&mut self, index: usize) -> Option<V>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&self)
pub fn shrink_to_fit(&self)
pub fn from(vec: Vec<V>) -> Self
pub fn get(&self, index: usize) -> Option<&V>
pub fn get_uncheck(&self, index: usize) -> &V
pub fn get_mut(&self, index: usize) -> Option<VecRefMut<'_, V>>
pub fn contains(&self, x: &V) -> boolwhere
V: PartialEq,
pub fn iter(&self) -> Iter<'_, V>
pub fn iter_mut(&self) -> VecIterMut<'_, V> ⓘ
pub fn into_iter(self) -> IntoIter<V>
pub fn dirty_ref(&self) -> &Vec<V>
pub fn into_inner(self) -> Vec<V>
Trait Implementations§
source§impl<'de, V> Deserialize<'de> for SyncVec<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for SyncVec<V>where
V: Deserialize<'de>,
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, V> IntoIterator for &'a SyncVec<V>
impl<'a, V> IntoIterator for &'a SyncVec<V>
source§impl<V> IntoIterator for SyncVec<V>
impl<V> IntoIterator for SyncVec<V>
source§impl<V: PartialEq> PartialEq for SyncVec<V>
impl<V: PartialEq> PartialEq for SyncVec<V>
impl<V> Send for SyncVec<V>
this is safety, dirty mutex ensure
impl<V> Sync for SyncVec<V>
this is safety, dirty mutex ensure
Auto Trait Implementations§
impl<V> !Freeze for SyncVec<V>
impl<V> !RefUnwindSafe for SyncVec<V>
impl<V> Unpin for SyncVec<V>where
V: Unpin,
impl<V> UnwindSafe for SyncVec<V>where
V: 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