pub struct Asset<'content, 'path> { /* private fields */ }Expand description
An asset to be certified and served by an AssetRouter.
Use the new associated function to create instances of this struct.
§Examples
§With owned values
use ic_asset_certification::Asset;
let path = String::from("foo");
let content = vec![1, 2, 3];
let asset = Asset::new(path, content);§With borrowed values
use ic_asset_certification::Asset;
let path = "foo";
let content = [1, 2, 3].as_slice();
let asset = Asset::new(path, content);Implementations§
Trait Implementations§
impl<'content, 'path> Eq for Asset<'content, 'path>
impl<'content, 'path> StructuralPartialEq for Asset<'content, 'path>
Auto Trait Implementations§
impl<'content, 'path> Freeze for Asset<'content, 'path>
impl<'content, 'path> RefUnwindSafe for Asset<'content, 'path>
impl<'content, 'path> Send for Asset<'content, 'path>
impl<'content, 'path> Sync for Asset<'content, 'path>
impl<'content, 'path> Unpin for Asset<'content, 'path>
impl<'content, 'path> UnwindSafe for Asset<'content, 'path>
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