pub struct ComponentRegistry { /* private fields */ }Expand description
Read-only component registry.
Implementations§
Source§impl ComponentRegistry
impl ComponentRegistry
pub const fn new(components: &'static [ComponentManifest]) -> ComponentRegistry
pub const fn components(&self) -> &'static [ComponentManifest]
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub fn find(&self, id: &str) -> Option<&'static ComponentManifest>
pub fn validate_dependencies(&self) -> Result<(), ComponentRegistryError>
Sourcepub fn render_sysfs_listing(&self) -> Vec<u8> ⓘ
pub fn render_sysfs_listing(&self) -> Vec<u8> ⓘ
Render a compact ASCII listing suitable for /sys/fs/ahrightos/components.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ComponentRegistry
impl Freeze for ComponentRegistry
impl RefUnwindSafe for ComponentRegistry
impl Send for ComponentRegistry
impl Sync for ComponentRegistry
impl Unpin for ComponentRegistry
impl UnsafeUnpin for ComponentRegistry
impl UnwindSafe for ComponentRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more