pub struct BindingMap<V> { /* private fields */ }Expand description
Each entry releases its name and node when removed. Values retain their own immutable metadata owners.
Implementations§
Source§impl<V> BindingMap<V>
impl<V> BindingMap<V>
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn get(&self, name: &str) -> Option<&V>
Sourcepub fn get_name(&self, name: RelationName<'_>) -> Option<&V>
pub fn get_name(&self, name: RelationName<'_>) -> Option<&V>
Compare a borrowed decoded SQL name directly with ordered keys, including escaped quoted references.
pub fn get_mut(&mut self, name: &str) -> Option<&mut V>
pub fn contains_key(&self, name: &str) -> bool
pub fn remove(&mut self, name: &str) -> Option<V>
pub fn extract(&mut self, name: &str) -> Self
pub fn append(&mut self, entries: Self)
pub fn retain(&mut self, keep: impl FnMut(&String, &mut V) -> bool)
pub fn iter(&self) -> BindingIter<'_, V> ⓘ
pub fn keys(&self) -> impl ExactSizeIterator<Item = &String>
pub fn values(&self) -> impl ExactSizeIterator<Item = &V>
pub fn insert(&mut self, name: String, value: V) -> Option<V>
pub fn insert_with_control( &mut self, name: &str, value: V, control: &ProductionControl<'_>, ) -> Result<Option<V>, SQLError>
Sourcepub fn copy_with_control(
&self,
control: &ProductionControl<'_>,
value: impl FnMut(&V) -> Result<V, SQLError>,
) -> Result<Self, SQLError>
pub fn copy_with_control( &self, control: &ProductionControl<'_>, value: impl FnMut(&V) -> Result<V, SQLError>, ) -> Result<Self, SQLError>
The callback decides how each value shares or independently produces its own payload; this map never assumes Clone admits an allocating value.
Trait Implementations§
Source§impl<V: Clone> Clone for BindingMap<V>
impl<V: Clone> Clone for BindingMap<V>
Source§impl<V> Default for BindingMap<V>
impl<V> Default for BindingMap<V>
Source§impl<V> FromIterator<(String, V)> for BindingMap<V>
impl<V> FromIterator<(String, V)> for BindingMap<V>
Source§impl<V> Index<&str> for BindingMap<V>
impl<V> Index<&str> for BindingMap<V>
Source§impl<'a, V> IntoIterator for &'a BindingMap<V>
impl<'a, V> IntoIterator for &'a BindingMap<V>
Auto Trait Implementations§
impl<V> Freeze for BindingMap<V>
impl<V> RefUnwindSafe for BindingMap<V>where
OwnedMap<BindingName, V>: RefUnwindSafe,
impl<V> Send for BindingMap<V>
impl<V> Sync for BindingMap<V>
impl<V> Unpin for BindingMap<V>
impl<V> UnsafeUnpin for BindingMap<V>where
OwnedMap<BindingName, V>: UnsafeUnpin,
impl<V> UnwindSafe for BindingMap<V>where
OwnedMap<BindingName, 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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