pub struct SvgLoader;Expand description
Parses an SVG into a SvgData.
Parsing happens once, at load time, on the asset worker; the renderer paints the parsed tree and caches the drawing where its backend can. The source file length is recorded as the payload’s byte cost, because usvg does not expose the size of a parsed tree.
Trait Implementations§
Source§impl AssetLoader for SvgLoader
impl AssetLoader for SvgLoader
Source§fn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
File extensions this loader claims, lowercase and without the dot.
Registering a loader claims every extension it names; a later
registration wins over an earlier one for the same extension.
Source§fn kind(&self) -> AssetKind
fn kind(&self) -> AssetKind
The family this loader produces. The object-safe stand-in for Bevy’s
associated
type Asset.Source§fn load(&self, ctx: &LoadContext<'_>) -> Result<LoadedAsset, LoadErrorKind>
fn load(&self, ctx: &LoadContext<'_>) -> Result<LoadedAsset, LoadErrorKind>
Loads one asset. Returning
Err caches the failure against the path
and attaches a failure component to every entity waiting on it.Auto Trait Implementations§
impl Freeze for SvgLoader
impl RefUnwindSafe for SvgLoader
impl Send for SvgLoader
impl Sync for SvgLoader
impl Unpin for SvgLoader
impl UnsafeUnpin for SvgLoader
impl UnwindSafe for SvgLoader
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.