pub struct LogosSeq<T>(pub Rc<RefCell<Vec<T>>>);Expand description
Ordered sequence with reference semantics.
LogosSeq<T> wraps Rc<RefCell<Vec<T>>> to provide shared mutable access.
Cloning a LogosSeq produces a shallow copy (shared reference), not a deep copy.
Use .deep_clone() for an independent copy (LOGOS copy of).
Tuple Fields§
§0: Rc<RefCell<Vec<T>>>Implementations§
Source§impl<T> LogosSeq<T>
impl<T> LogosSeq<T>
pub fn new() -> Self
pub fn from_vec(v: Vec<T>) -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn push(&self, value: T)
pub fn pop(&self) -> Option<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn remove(&self, index: usize) -> T
pub fn borrow(&self) -> Ref<'_, Vec<T>>
pub fn borrow_mut(&self) -> RefMut<'_, Vec<T>>
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for LogosSeq<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for LogosSeq<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Clone> IntoIterator for LogosSeq<T>
impl<T: Clone> IntoIterator for LogosSeq<T>
Source§impl<T: PartialEq> LogosContains<T> for LogosSeq<T>
impl<T: PartialEq> LogosContains<T> for LogosSeq<T>
Source§fn logos_contains(&self, value: &T) -> bool
fn logos_contains(&self, value: &T) -> bool
Check if this collection contains the given value.
Auto Trait Implementations§
impl<T> Freeze for LogosSeq<T>
impl<T> !RefUnwindSafe for LogosSeq<T>
impl<T> !Send for LogosSeq<T>
impl<T> !Sync for LogosSeq<T>
impl<T> Unpin for LogosSeq<T>
impl<T> UnsafeUnpin for LogosSeq<T>
impl<T> !UnwindSafe for LogosSeq<T>
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