pub struct Resource {
pub reference: ResourceRef,
pub meta: ResourceMeta,
}Fields§
§reference: ResourceRef§meta: ResourceMetaImplementations§
Source§impl Resource
impl Resource
pub fn new(reference: ResourceRef) -> Self
pub fn with_meta(self, meta: ResourceMeta) -> Self
pub fn inline(data: impl Into<Bytes>) -> Self
pub fn from_base64(data: impl Into<String>) -> Self
pub fn from_file(path: impl Into<Utf8PathBuf>) -> Self
pub fn from_url(url: Url) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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