pub trait ECGHeader {
type HeaderId: Ord + Copy + Debug;
// Required methods
fn get_parent_ids(&self) -> &[Self::HeaderId];
fn get_header_id(&self) -> Self::HeaderId;
fn validate_header(&self, header_id: Self::HeaderId) -> bool;
}Expand description
Trait that ECG headers (nodes?) must implement.
Required Associated Types§
Required Methods§
Sourcefn get_parent_ids(&self) -> &[Self::HeaderId]
fn get_parent_ids(&self) -> &[Self::HeaderId]
Return the parents ids of a node. If an empty slice is returned, the root node is the parent.
Sourcefn get_header_id(&self) -> Self::HeaderId
fn get_header_id(&self) -> Self::HeaderId
Computes the identifier of the header.
fn validate_header(&self, header_id: Self::HeaderId) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".