pub struct ImageMetadataStore { /* private fields */ }Expand description
Optional, policy-owned image metadata used by ecosystem components.
This is intentionally not a UiServices capability:
- the mechanism layer (
fret-ui) must remain backend-agnostic, and - ADR 0124 explicitly discourages implicit layout dependence on intrinsic image size.
Instead, apps/components that already know image dimensions (e.g. decoders, caches, streaming sources) can record them here to enable ergonomic recipes like “aspect-ratio wrappers”.
Implementations§
Source§impl ImageMetadataStore
impl ImageMetadataStore
pub fn set_intrinsic_size_px(&mut self, image: ImageId, size_px: (u32, u32))
pub fn clear_intrinsic_size_px(&mut self, image: ImageId)
pub fn intrinsic_size_px(&self, image: ImageId) -> Option<(u32, u32)>
pub fn aspect_ratio(&self, image: ImageId) -> Option<f32>
Trait Implementations§
Source§impl Clone for ImageMetadataStore
impl Clone for ImageMetadataStore
Source§fn clone(&self) -> ImageMetadataStore
fn clone(&self) -> ImageMetadataStore
Returns a duplicate of the value. Read more
1.0.0 · 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 ImageMetadataStore
impl Debug for ImageMetadataStore
Source§impl Default for ImageMetadataStore
impl Default for ImageMetadataStore
Source§fn default() -> ImageMetadataStore
fn default() -> ImageMetadataStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ImageMetadataStore
impl RefUnwindSafe for ImageMetadataStore
impl Send for ImageMetadataStore
impl Sync for ImageMetadataStore
impl Unpin for ImageMetadataStore
impl UnsafeUnpin for ImageMetadataStore
impl UnwindSafe for ImageMetadataStore
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