pub trait Labels {
type Label: ToOwned + ?Sized;
type Config;
// Required methods
fn new(num_nodes: usize, config: Self::Config) -> Self;
fn insert(
&mut self,
node: NodeId,
label: <Self::Label as ToOwned>::Owned,
) -> Option<<Self::Label as ToOwned>::Owned>;
fn get(&self, node: NodeId) -> Option<&Self::Label>;
fn contains_key(&self, node: NodeId) -> bool;
fn remove(
&mut self,
node: NodeId,
) -> Option<<Self::Label as ToOwned>::Owned>;
fn is_empty(&self) -> bool;
}Required Associated Types§
Required Methods§
fn new(num_nodes: usize, config: Self::Config) -> Self
fn insert( &mut self, node: NodeId, label: <Self::Label as ToOwned>::Owned, ) -> Option<<Self::Label as ToOwned>::Owned>
fn get(&self, node: NodeId) -> Option<&Self::Label>
fn contains_key(&self, node: NodeId) -> bool
fn remove(&mut self, node: NodeId) -> Option<<Self::Label as ToOwned>::Owned>
fn is_empty(&self) -> bool
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.