pub struct ScreenshotTakeResponse {
pub vmo: Option<Vmo>,
pub size: Option<SizeU>,
/* private fields */
}
Fields§
§vmo: Option<Vmo>
CPU mappable read-only VMO that contains screenshot data. The server owns the VMO and
may reuse for the next [Take
]. The VMO is guaranteed to be accessible after mapping.
In some allocations, VMO::read() might not be available, i.e. on emulator.
Basic usage: After the client receives a VMO handle, to ensure data stability, it should
finish reading the VMO before calling [Take
] again. When finished reading, the client
should drop the VMO handle.
Advanced usage: To edit the data, or to persist it beyond the next [Take
] call, the
client should copy the data to a private VMO.
size: Option<SizeU>
Size of the screenshot in pixels.
Trait Implementations§
Source§impl Debug for ScreenshotTakeResponse
impl Debug for ScreenshotTakeResponse
Source§impl Decode<ScreenshotTakeResponse, DefaultFuchsiaResourceDialect> for ScreenshotTakeResponse
impl Decode<ScreenshotTakeResponse, DefaultFuchsiaResourceDialect> for ScreenshotTakeResponse
Source§impl Default for ScreenshotTakeResponse
impl Default for ScreenshotTakeResponse
Source§fn default() -> ScreenshotTakeResponse
fn default() -> ScreenshotTakeResponse
Returns the “default value” for a type. Read more
Source§impl Encode<ScreenshotTakeResponse, DefaultFuchsiaResourceDialect> for &mut ScreenshotTakeResponse
impl Encode<ScreenshotTakeResponse, DefaultFuchsiaResourceDialect> for &mut ScreenshotTakeResponse
Source§impl PartialEq for ScreenshotTakeResponse
impl PartialEq for ScreenshotTakeResponse
Source§impl ResourceTypeMarker for ScreenshotTakeResponse
impl ResourceTypeMarker for ScreenshotTakeResponse
Source§type Borrowed<'a> = &'a mut ScreenshotTakeResponse
type Borrowed<'a> = &'a mut ScreenshotTakeResponse
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
Cheaply converts from
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for ScreenshotTakeResponse
impl TypeMarker for ScreenshotTakeResponse
Source§type Owned = ScreenshotTakeResponse
type Owned = ScreenshotTakeResponse
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.impl Standalone<DefaultFuchsiaResourceDialect> for ScreenshotTakeResponse
impl StructuralPartialEq for ScreenshotTakeResponse
Auto Trait Implementations§
impl Freeze for ScreenshotTakeResponse
impl RefUnwindSafe for ScreenshotTakeResponse
impl Send for ScreenshotTakeResponse
impl Sync for ScreenshotTakeResponse
impl Unpin for ScreenshotTakeResponse
impl UnwindSafe for ScreenshotTakeResponse
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