pub struct AssetIndex { /* private fields */ }Expand description
The integrity index for every participant-readable asset.
Implementations§
Source§impl AssetIndex
impl AssetIndex
Sourcepub fn from_bytes(
assets: &BTreeMap<AssetId, Vec<u8>>,
) -> Result<Self, DocumentError>
pub fn from_bytes( assets: &BTreeMap<AssetId, Vec<u8>>, ) -> Result<Self, DocumentError>
Build an index for compiled logical assets. The writer places each
logical id below assets/ and records its byte length and digest.
Sourcepub fn entries(&self) -> &[AssetRecord]
pub fn entries(&self) -> &[AssetRecord]
Every indexed participant-readable asset, in deterministic order.
Trait Implementations§
Source§impl Clone for AssetIndex
impl Clone for AssetIndex
Source§fn clone(&self) -> AssetIndex
fn clone(&self) -> AssetIndex
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 AssetIndex
impl Debug for AssetIndex
Source§impl Default for AssetIndex
impl Default for AssetIndex
Source§fn default() -> AssetIndex
fn default() -> AssetIndex
Returns the “default value” for a type. Read more
Source§impl DescribeWire for AssetIndex
impl DescribeWire for AssetIndex
Source§fn wire_schema() -> WireSchema
fn wire_schema() -> WireSchema
The shape a value of this type puts on the wire.
Source§impl<'de> Deserialize<'de> for AssetIndex
impl<'de> Deserialize<'de> for AssetIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AssetIndex
impl RefUnwindSafe for AssetIndex
impl Send for AssetIndex
impl Sync for AssetIndex
impl Unpin for AssetIndex
impl UnsafeUnpin for AssetIndex
impl UnwindSafe for AssetIndex
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