Skip to main content

StructureIdentifier

Trait StructureIdentifier 

Source
pub trait StructureIdentifier:
    Copy
    + Clone
    + Debug
    + TryFrom<isize>
    + Into<isize> {
    // Required methods
    fn known_variants() -> &'static [Self];
    fn allowed_values(no_catchall: bool) -> Option<HashSet<isize>>;
    fn as_str(&self) -> Option<&'static str>;
}
Expand description

Trait for the structures represented by samples, identified by an integer.

Required Methods§

Source

fn known_variants() -> &'static [Self]

List all the variants which are not catch-alls.

Source

fn allowed_values(no_catchall: bool) -> Option<HashSet<isize>>

If the structure field allows for any value, return None; otherwise, return Some(HashSet<allowed_values>). no_catchall, if true, ignores the “catch-all” variant in determining what is allowed, if present.

Source

fn as_str(&self) -> Option<&'static str>

Get a static string description of the structure; None if this is the catch-all variant.

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.

Implementors§