pub struct Component<'a> { /* private fields */ }Expand description
A single component within a Registry.
Implementations§
Source§impl Component<'_>
impl Component<'_>
Sourcepub fn hash(&self) -> Result<String, Error>
pub fn hash(&self) -> Result<String, Error>
Computes the component’s content hash by reading and hashing its source
(see content_hash).
§Errors
Returns an error if the component’s source file cannot be read.
Sourcepub fn read_source(&self) -> Result<String, Error>
pub fn read_source(&self) -> Result<String, Error>
Reads the component’s Rust source from the registry.
§Errors
Returns an error if the source file cannot be read.
Sourcepub fn dependencies(&self) -> &[Dependency]
pub fn dependencies(&self) -> &[Dependency]
The other components this component depends on.
Auto Trait Implementations§
impl<'a> Freeze for Component<'a>
impl<'a> RefUnwindSafe for Component<'a>
impl<'a> Send for Component<'a>
impl<'a> Sync for Component<'a>
impl<'a> Unpin for Component<'a>
impl<'a> UnsafeUnpin for Component<'a>
impl<'a> UnwindSafe for Component<'a>
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