pub enum SvgSource {
Static(&'static [u8]),
Owned(Arc<[u8]>),
Str(Arc<str>),
}Expand description
SVG bytes for GPU rasterization.
Equality and hashing use pointer identity, not byte content (for cache keys).
§Examples
use std::sync::Arc;
use ailloli_ui_core::SvgSource;
let bytes: Arc<[u8]> = Arc::from(&b"<svg/>"[..]);
assert_eq!(SvgSource::Owned(bytes.clone()), SvgSource::Owned(bytes));Variants§
Static(&'static [u8])
Compile-time embedded SVG.
Owned(Arc<[u8]>)
Heap-owned SVG bytes.
Str(Arc<str>)
SVG stored as UTF-8 string.
Implementations§
Trait Implementations§
impl Eq for SvgSource
Auto Trait Implementations§
impl Freeze for SvgSource
impl RefUnwindSafe for SvgSource
impl Send for SvgSource
impl Sync for SvgSource
impl Unpin for SvgSource
impl UnwindSafe for SvgSource
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