pub struct Asset { /* private fields */ }Expand description
A bundled asset with some options. The asset can be used in rsx! to reference the asset.
It should not be read directly with std::fs::read because the path needs to be resolved
relative to the bundle
ⓘ
const ASSET: Asset = asset!("/assets/image.png");
rsx! {
img { src: ASSET }
};Implementations§
Trait Implementations§
impl Copy for Asset
impl Send for Asset
impl StructuralPartialEq for Asset
impl Sync for Asset
Auto Trait Implementations§
impl Freeze for Asset
impl RefUnwindSafe for Asset
impl Unpin for Asset
impl UnsafeUnpin for Asset
impl UnwindSafe for Asset
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