Trait ModelId

Source
pub trait ModelId:
    Sized
    + Display
    + From<String> {
    // Required methods
    fn has_valid_prefix(&self) -> bool;
    fn value(&self) -> &str;

    // Provided method
    fn validated(self) -> Result<ValidShardedId<Self>, ModelIdError> { ... }
}

Required Methods§

Source

fn has_valid_prefix(&self) -> bool

Source

fn value(&self) -> &str

Provided Methods§

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§