pub struct AssetSpec {
pub name: String,
pub asset_type: &'static str,
pub fields: Vec<(String, ArgValue)>,
}Expand description
A named asset entry: the {name, type, args} of one world.jsonl line, as data.
Fields§
§name: StringThe readable asset name (the world-line key). Ignored when a spec is materialized straight into a live component, which carries no name field.
asset_type: &'static strThe registered asset type string ("Sprite", "DirectionalLight", …).
fields: Vec<(String, ArgValue)>The args object, in insertion order.
Implementations§
Source§impl AssetSpec
impl AssetSpec
Sourcepub fn new(name: impl Into<String>, asset_type: &'static str) -> Self
pub fn new(name: impl Into<String>, asset_type: &'static str) -> Self
An entry of asset_type named name, with no args set yet (each unset
field takes the type’s serde default when materialized).
Trait Implementations§
impl StructuralPartialEq for AssetSpec
Auto Trait Implementations§
impl Freeze for AssetSpec
impl RefUnwindSafe for AssetSpec
impl Send for AssetSpec
impl Sync for AssetSpec
impl Unpin for AssetSpec
impl UnsafeUnpin for AssetSpec
impl UnwindSafe for AssetSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more