pub struct Snapshot {
pub name: String,
pub data: Vec<u8>,
pub width: u32,
pub height: u32,
}Expand description
A visual snapshot
Fields§
§name: StringSnapshot name/identifier
data: Vec<u8>Raw image data
width: u32Image width
height: u32Image height
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub const fn with_dimensions(self, width: u32, height: u32) -> Self
pub const fn with_dimensions(self, width: u32, height: u32) -> Self
Create with dimensions
Sourcepub fn diff(&self, other: &Self) -> SnapshotDiff
pub fn diff(&self, other: &Self) -> SnapshotDiff
Compare this snapshot to another
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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