pub struct SpriteSource {
pub image: String,
pub index: SpriteIndex,
pub attribution: Option<String>,
}Expand description
A sprite sheet: one atlas image plus a name → sub-rect index, so
icon nodes can crop named icons out of it (icons, fill-pattern).
The runtime shape is [ezu_graph::SpriteSheet]; the host builds it.
Fields§
§image: StringAtlas image src — a path (resolved against --assets-dir) or an
http(s):// URL, like FileSource::src. This doubles as the
sheet’s asset key, so icon { sprite: "@name" } resolves here.
index: SpriteIndexThe name → rect index: either a URL/path to a sprite .json, or an
inline map. Inline uses the same field names as a fetched index.
attribution: Option<String>Trait Implementations§
Source§impl Clone for SpriteSource
impl Clone for SpriteSource
Source§fn clone(&self) -> SpriteSource
fn clone(&self) -> SpriteSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpriteSource
impl Debug for SpriteSource
Source§impl<'de> Deserialize<'de> for SpriteSource
impl<'de> Deserialize<'de> for SpriteSource
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
Auto Trait Implementations§
impl Freeze for SpriteSource
impl RefUnwindSafe for SpriteSource
impl Send for SpriteSource
impl Sync for SpriteSource
impl Unpin for SpriteSource
impl UnsafeUnpin for SpriteSource
impl UnwindSafe for SpriteSource
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