Trait FromId

Source
pub trait FromId<T> {
    // Required method
    fn from_id(id: T) -> Option<&'static Self>;
}
Expand description

A convenience trait for retrieving a top-level entity (like a Vendor) from the PCI database by its unique ID.

Required Methods§

Source

fn from_id(id: T) -> Option<&'static Self>

Returns the entity corresponding to id, or None if none exists.

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§