pub struct List(/* private fields */);Expand description
Represents a PartiQL List value, e.g. [1, 2, ‘one’]
Implementations§
Source§impl List
impl List
pub fn push(&mut self, value: Value)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, idx: i64) -> Option<&Value>
pub fn get_mut(&mut self, idx: i64) -> Option<&mut Value>
pub fn take_val(self, idx: i64) -> Option<Value>
pub fn iter(&self) -> ListIter<'_> ⓘ
pub fn reserve(&mut self, additional: usize)
pub fn to_vec(self) -> Vec<Value>
Trait Implementations§
Source§impl Extend<Value> for List
impl Extend<Value> for List
Source§fn extend<Iter: IntoIterator<Item = Value>>(&mut self, iter: Iter)
fn extend<Iter: IntoIterator<Item = Value>>(&mut self, iter: Iter)
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> FromIterator<T> for List
impl<T> FromIterator<T> for List
Source§impl<'a> IntoIterator for &'a List
impl<'a> IntoIterator for &'a List
Source§impl IntoIterator for List
impl IntoIterator for List
Source§impl Ord for List
impl Ord for List
Source§impl PartialOrd for List
impl PartialOrd for List
Source§impl PrettyDoc for List
impl PrettyDoc for List
fn pretty_doc<'b, D, A>(&'b self, arena: &'b D) -> DocBuilder<'b, D, A>
impl Eq for List
Auto Trait Implementations§
impl Freeze for List
impl !RefUnwindSafe for List
impl !Send for List
impl !Sync for List
impl Unpin for List
impl !UnwindSafe for List
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more