pub struct Frame<K = String> {
pub key: K,
pub frame: Rect,
pub rotated: bool,
pub trimmed: bool,
pub source: Rect,
pub source_size: (u32, u32),
}Expand description
A placed frame within a page.
Fields§
§key: KUser-specified key (e.g., filename or asset path).
frame: RectPlaced rectangle within the page (post-rotation width/height).
rotated: boolTrue if the frame was rotated 90° when placed.
trimmed: boolTrue if the source was trimmed.
source: RectSource sub-rect within the original image after trimming.
source_size: (u32, u32)Original (untrimmed) image size.
Trait Implementations§
Source§impl<'de, K> Deserialize<'de> for Frame<K>where
K: Deserialize<'de>,
impl<'de, K> Deserialize<'de> for Frame<K>where
K: Deserialize<'de>,
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<K> Freeze for Frame<K>where
K: Freeze,
impl<K> RefUnwindSafe for Frame<K>where
K: RefUnwindSafe,
impl<K> Send for Frame<K>where
K: Send,
impl<K> Sync for Frame<K>where
K: Sync,
impl<K> Unpin for Frame<K>where
K: Unpin,
impl<K> UnwindSafe for Frame<K>where
K: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more