pub struct SvgProvider;Expand description
Reads static SVG documents.
Trait Implementations§
Source§impl VisualProvider for SvgProvider
impl VisualProvider for SvgProvider
Source§fn probe(&self, bytes: &[u8]) -> Option<Result<ProbeReport, ExtensionError>>
fn probe(&self, bytes: &[u8]) -> Option<Result<ProbeReport, ExtensionError>>
Source§fn open(
&self,
bytes: Arc<[u8]>,
_source: &ProviderSource,
resolver: &dyn ResourceResolver,
) -> Result<Box<dyn VisualSource>, ExtensionError>
fn open( &self, bytes: Arc<[u8]>, _source: &ProviderSource, resolver: &dyn ResourceResolver, ) -> Result<Box<dyn VisualSource>, ExtensionError>
Opens
bytes as the project’s source, whose settings (such as
which item of a package it shows) the provider applies. Bytes that
are not this provider’s, those Self::probe answers None for,
are told apart here, from the same signature checks: opening never
probes first, so a file is read once. Read moreAuto Trait Implementations§
impl Freeze for SvgProvider
impl RefUnwindSafe for SvgProvider
impl Send for SvgProvider
impl Sync for SvgProvider
impl Unpin for SvgProvider
impl UnsafeUnpin for SvgProvider
impl UnwindSafe for SvgProvider
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