pub struct LinkedList<T, A: Allocator = Global> { /* private fields */ }
Implementations§
Source§impl<T> LinkedList<T>
impl<T> LinkedList<T>
Source§impl<T, A: Allocator> LinkedList<T, A>
impl<T, A: Allocator> LinkedList<T, A>
pub fn new_in(alloc: A) -> Self
pub fn push_front(&mut self, elem: T)
pub fn push_back(&mut self, elem: T)
pub fn pop_front(&mut self) -> Option<T>
pub fn pop_back(&mut self) -> Option<T>
pub fn front(&self) -> Option<&T>
pub fn front_mut(&mut self) -> Option<&mut T>
pub fn back(&self) -> Option<&T>
pub fn back_mut(&mut self) -> Option<&mut T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn iter(&self) -> Iter<'_, T> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
pub fn cursor_mut(&mut self) -> CursorMut<'_, T, A>
Trait Implementations§
Source§impl<T, A: Allocator + Default> BorshDeserialize for LinkedList<T, A>where
T: BorshDeserialize,
impl<T, A: Allocator + Default> BorshDeserialize for LinkedList<T, A>where
T: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<T, A: Allocator> BorshSerialize for LinkedList<T, A>where
T: BorshSerialize,
impl<T, A: Allocator> BorshSerialize for LinkedList<T, A>where
T: BorshSerialize,
Source§impl<T> DeBin for LinkedList<T>where
T: DeBin,
impl<T> DeBin for LinkedList<T>where
T: DeBin,
Source§impl<T> DeJson for LinkedList<T>where
T: DeJson,
impl<T> DeJson for LinkedList<T>where
T: DeJson,
Source§impl<T> DeRon for LinkedList<T>where
T: DeRon,
impl<T> DeRon for LinkedList<T>where
T: DeRon,
Source§impl<'de, T, A> Deserialize<'de> for LinkedList<T, A>
impl<'de, T, A> Deserialize<'de> for LinkedList<T, A>
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<T: Deserialize, A: Allocator + Default> Deserialize for LinkedList<T, A>
impl<T: Deserialize, A: Allocator + Default> Deserialize for LinkedList<T, A>
Source§impl<T, A: Allocator> Drop for LinkedList<T, A>
impl<T, A: Allocator> Drop for LinkedList<T, A>
Source§impl<T, A: Allocator> Extend<T> for LinkedList<T, A>
impl<T, A: Allocator> Extend<T> for LinkedList<T, A>
Source§fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<T, A: Allocator + Default> FromIterator<T> for LinkedList<T, A>
impl<T, A: Allocator + Default> FromIterator<T> for LinkedList<T, A>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, T, A: Allocator> IntoIterator for &'a LinkedList<T, A>
impl<'a, T, A: Allocator> IntoIterator for &'a LinkedList<T, A>
Source§impl<'a, T, A: Allocator> IntoIterator for &'a mut LinkedList<T, A>
impl<'a, T, A: Allocator> IntoIterator for &'a mut LinkedList<T, A>
Source§impl<T, A: Allocator> IntoIterator for LinkedList<T, A>
impl<T, A: Allocator> IntoIterator for LinkedList<T, A>
Source§impl<T: Ord, A: Allocator> Ord for LinkedList<T, A>
impl<T: Ord, A: Allocator> Ord for LinkedList<T, A>
Source§impl<T, U, A1, A2> PartialEq<LinkedList<U, A2>> for LinkedList<T, A1>
impl<T, U, A1, A2> PartialEq<LinkedList<U, A2>> for LinkedList<T, A1>
Source§impl<T, A1, A2> PartialOrd<LinkedList<T, A2>> for LinkedList<T, A1>
impl<T, A1, A2> PartialOrd<LinkedList<T, A2>> for LinkedList<T, A1>
Source§impl<T> SerBin for LinkedList<T>where
T: SerBin,
impl<T> SerBin for LinkedList<T>where
T: SerBin,
Source§impl<T> SerJson for LinkedList<T>where
T: SerJson,
impl<T> SerJson for LinkedList<T>where
T: SerJson,
Source§impl<T> SerRon for LinkedList<T>where
T: SerRon,
impl<T> SerRon for LinkedList<T>where
T: SerRon,
Source§impl<T, A> Serialize for LinkedList<T, A>
impl<T, A> Serialize for LinkedList<T, A>
impl<T: Eq, A: Allocator> Eq for LinkedList<T, A>
impl<T: Send> Send for LinkedList<T>
impl<T: Sync> Sync for LinkedList<T>
Auto Trait Implementations§
impl<T, A> Freeze for LinkedList<T, A>where
A: Freeze,
impl<T, A> RefUnwindSafe for LinkedList<T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A = Global> !Send for LinkedList<T, A>
impl<T, A = Global> !Sync for LinkedList<T, A>
impl<T, A> Unpin for LinkedList<T, A>
impl<T, A> UnwindSafe for LinkedList<T, A>
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