pub struct SharedSnapshot {
size: Size2D<u32>,
data: Arc<IpcSharedMemory>,
byte_range: Range<usize>,
format: SnapshotPixelFormat,
alpha_mode: SnapshotAlphaMode,
}Expand description
A version of Snapshot that can be sent across IPC channels.
Fields§
§size: Size2D<u32>The physical size of this SharedSnapshot.
data: Arc<IpcSharedMemory>The shared data of this SharedSnapshot.
byte_range: Range<usize>The byte range of the data within the shared memory segment. This is used to send individual image frames of animated images.
format: SnapshotPixelFormatThe SnapshotPixelFormat of this SharedSnapshot
alpha_mode: SnapshotAlphaModeThe SnapshotAlphaMode of this SharedSnapshot.
Implementations§
pub fn to_owned(&self) -> Snapshot
Sourcepub fn cleared(size: Size2D<u32>) -> Self
pub fn cleared(size: Size2D<u32>) -> Self
Returns snapshot with provided size that is black transparent alpha
pub const fn size(&self) -> Size2D<u32>
pub const fn format(&self) -> SnapshotPixelFormat
pub const fn alpha_mode(&self) -> SnapshotAlphaMode
pub fn data(&self) -> &[u8] ⓘ
Trait Implementations§
Source§fn clone(&self) -> SharedSnapshot
fn clone(&self) -> SharedSnapshot
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§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
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
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> 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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert