pub trait ObjectBehavior {
// Required methods
fn remove<T>(&mut self, key: &T) -> Option<Value>
where T: ValueKeyBehavior;
fn contains_key<T>(&self, key: &T) -> bool
where T: ValueKeyBehavior;
fn keys(&self) -> Vec<&ValueKey>;
fn values(&self) -> Vec<&Value>;
}Required Methods§
Sourcefn remove<T>(&mut self, key: &T) -> Option<Value>where
T: ValueKeyBehavior,
fn remove<T>(&mut self, key: &T) -> Option<Value>where
T: ValueKeyBehavior,
Removes a key-value pair from the object and returns the associated value. If the key is not present, returns None.
Sourcefn contains_key<T>(&self, key: &T) -> boolwhere
T: ValueKeyBehavior,
fn contains_key<T>(&self, key: &T) -> boolwhere
T: ValueKeyBehavior,
Returns true if the object contains a value for the specified key, otherwise false.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.