pub struct InstanceResources { /* private fields */ }Expand description
Immutable, content-addressed files owned by one Plugin Instance Generation.
Implementations§
Source§impl InstanceResources
impl InstanceResources
Sourcepub fn from_files(
files: impl IntoIterator<Item = (String, Vec<u8>)>,
) -> Result<Self, RuntimeFailure>
pub fn from_files( files: impl IntoIterator<Item = (String, Vec<u8>)>, ) -> Result<Self, RuntimeFailure>
Builds one deterministic snapshot from normalized relative paths and owned bytes.
Sourcepub fn digest(&self) -> &str
pub fn digest(&self) -> &str
Returns the deterministic identity of every path and byte in this snapshot.
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
Returns the number of snapshotted files.
Sourcepub const fn total_size(&self) -> u64
pub const fn total_size(&self) -> u64
Returns the aggregate byte size.
Sourcepub fn paths(&self) -> impl Iterator<Item = &str>
pub fn paths(&self) -> impl Iterator<Item = &str>
Lists normalized paths in deterministic order.
Trait Implementations§
Source§impl Clone for InstanceResources
impl Clone for InstanceResources
Source§fn clone(&self) -> InstanceResources
fn clone(&self) -> InstanceResources
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstanceResources
impl Debug for InstanceResources
Source§impl Default for InstanceResources
impl Default for InstanceResources
impl Eq for InstanceResources
Source§impl PartialEq for InstanceResources
impl PartialEq for InstanceResources
impl StructuralPartialEq for InstanceResources
Auto Trait Implementations§
impl Freeze for InstanceResources
impl RefUnwindSafe for InstanceResources
impl Send for InstanceResources
impl Sync for InstanceResources
impl Unpin for InstanceResources
impl UnsafeUnpin for InstanceResources
impl UnwindSafe for InstanceResources
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