pub trait InteractsWithData {
type Value;
type Item;
// Required method
fn data(&self) -> &Self::Value;
// Provided methods
fn all(&self) -> Self::Value
where Self::Value: Clone { ... }
fn exists(&self, key: &Self::Item) -> bool
where Self::Value: Contains<Self::Item> { ... }
fn has(&self, key: &Self::Item) -> bool
where Self::Value: Contains<Self::Item> { ... }
fn when_has<F>(&mut self, key: &Self::Item, closure: F)
where Self::Value: Contains<Self::Item>,
F: FnMut(&mut Self) { ... }
fn filled(&self, key: &Self::Item) -> bool { ... }
fn is_not_filled(&self, key: &Self::Item) -> bool { ... }
fn any_filled(&self, keys: Vec<&Self::Item>) -> bool { ... }
}Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn when_has<F>(&mut self, key: &Self::Item, closure: F)
fn when_has<F>(&mut self, key: &Self::Item, closure: F)
Execute the closure when the instnce contains the given key.
Sourcefn filled(&self, key: &Self::Item) -> bool
fn filled(&self, key: &Self::Item) -> bool
Determine if the instance contains a non-empty value for the key.
Sourcefn is_not_filled(&self, key: &Self::Item) -> bool
fn is_not_filled(&self, key: &Self::Item) -> bool
Determine if the instance contains an empty value for the key.
Sourcefn any_filled(&self, keys: Vec<&Self::Item>) -> bool
fn any_filled(&self, keys: Vec<&Self::Item>) -> bool
Do any of the given keys contain a non-empty value?
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".