pub struct Assignments { /* private fields */ }Implementations§
Source§impl Assignments
impl Assignments
pub fn with_capacity(capacity: usize) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn contains<Q>(&self, key: &Q) -> bool
pub fn get<Q>(&self, key: &Q) -> Option<&Assignment>
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Assignment>
pub fn set<Q>(&mut self, key: Q, expr: impl Into<Expr>)where
Q: Into<Projection>,
pub fn unset<Q>(&mut self, key: &Q)
Sourcepub fn insert<Q>(&mut self, key: Q, expr: impl Into<Expr>)where
Q: Into<Projection>,
pub fn insert<Q>(&mut self, key: Q, expr: impl Into<Expr>)where
Q: Into<Projection>,
Insert a value into a set. The expression should evaluate to a single value that is inserted into the set.
pub fn remove<Q>(&mut self, key: Q, expr: impl Into<Expr>)where
Q: Into<Projection>,
pub fn take<Q>(&mut self, key: &Q) -> Option<Assignment>
pub fn keys(&self) -> impl Iterator<Item = &Projection> + '_
pub fn exprs(&self) -> impl Iterator<Item = &Expr> + '_
pub fn iter(&self) -> impl Iterator<Item = (&Projection, &Assignment)> + '_
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = (&Projection, &mut Assignment)> + '_
Trait Implementations§
Source§impl Clone for Assignments
impl Clone for Assignments
Source§fn clone(&self) -> Assignments
fn clone(&self) -> Assignments
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Assignments
impl Debug for Assignments
Source§impl Default for Assignments
impl Default for Assignments
Source§impl<Q> Index<Q> for Assignmentswhere
Q: Hash + Equivalent<Projection>,
impl<Q> Index<Q> for Assignmentswhere
Q: Hash + Equivalent<Projection>,
Source§impl<Q> IndexMut<Q> for Assignmentswhere
Q: Hash + Equivalent<Projection>,
impl<Q> IndexMut<Q> for Assignmentswhere
Q: Hash + Equivalent<Projection>,
Source§impl<'a> IntoIterator for &'a Assignments
impl<'a> IntoIterator for &'a Assignments
Source§type Item = (&'a Projection, &'a Assignment)
type Item = (&'a Projection, &'a Assignment)
The type of the elements being iterated over.
Source§type IntoIter = Iter<'a, Projection, Assignment>
type IntoIter = Iter<'a, Projection, Assignment>
Which kind of iterator are we turning this into?
Source§impl IntoIterator for Assignments
impl IntoIterator for Assignments
Source§type Item = (Projection, Assignment)
type Item = (Projection, Assignment)
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<Projection, Assignment>
type IntoIter = IntoIter<Projection, Assignment>
Which kind of iterator are we turning this into?
Source§impl PartialEq for Assignments
impl PartialEq for Assignments
impl StructuralPartialEq for Assignments
Auto Trait Implementations§
impl Freeze for Assignments
impl RefUnwindSafe for Assignments
impl Send for Assignments
impl Sync for Assignments
impl Unpin for Assignments
impl UnwindSafe for Assignments
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