pub struct ResourceDef {
pub name: String,
pub declared: SourceLocation,
pub picture: Option<SvgPicture>,
}Expand description
A file the application ships with its build, declared in the
[resources] table of Bern.toml. Engines resolve it by name at run
time; each target decides where it lives in the product. Neither the
contents nor a build machine path are part of the IR.
Fields§
§name: StringThe file’s /-separated path relative to Bern.toml, for example
media/aurora.mp4.
declared: SourceLocationThe [resources] entry that declared the file.
picture: Option<SvgPicture>How an SVG document shows as a picture of it, with no document
engine; None for one that moves or runs, and for other files.
Trait Implementations§
Source§impl Clone for ResourceDef
impl Clone for ResourceDef
Source§impl Debug for ResourceDef
impl Debug for ResourceDef
Source§impl<'de> Deserialize<'de> for ResourceDef
impl<'de> Deserialize<'de> for ResourceDef
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
impl Eq for ResourceDef
Source§impl PartialEq for ResourceDef
impl PartialEq for ResourceDef
Source§impl Serialize for ResourceDef
impl Serialize for ResourceDef
impl StructuralPartialEq for ResourceDef
Auto Trait Implementations§
impl Freeze for ResourceDef
impl RefUnwindSafe for ResourceDef
impl Send for ResourceDef
impl Sync for ResourceDef
impl Unpin for ResourceDef
impl UnsafeUnpin for ResourceDef
impl UnwindSafe for ResourceDef
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