pub struct ScreenshotProxy { /* private fields */ }
Implementations§
Source§impl ScreenshotProxy
impl ScreenshotProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.ui.composition/Screenshot.
Sourcepub fn take_event_stream(&self) -> ScreenshotEventStream
pub fn take_event_stream(&self) -> ScreenshotEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn take(
&self,
payload: ScreenshotTakeRequest,
) -> QueryResponseFut<ScreenshotTakeResponse, DefaultFuchsiaResourceDialect>
pub fn take( &self, payload: ScreenshotTakeRequest, ) -> QueryResponseFut<ScreenshotTakeResponse, DefaultFuchsiaResourceDialect>
Collects the current graphical content of a display in a specified buffer format
in the
sRGB color space. Note that the sRGB color space is non-linear, meaning that unit tests
doing pixel equality checks making use of non-fully saturated colors should convert to a
linear color space.
See https://fuchsia.dev/fuchsia-src/concepts/ui/scenic/color_spaces for more information.
Screenshot is taken immediately, populated with the display’s content from the most recent VSYNC.
If the client calls [Take
] a second time before a first [Take
] call returns, the server
will close the Screenshot connection with a ZX_ERR_SHOULD_WAIT epitaph.
If capture fails due to an internal error, the server will close the Screenshot connection with a ZX_ERR_INTERNAL epitaph.
Sourcepub fn take_file(
&self,
payload: ScreenshotTakeFileRequest,
) -> QueryResponseFut<ScreenshotTakeFileResponse, DefaultFuchsiaResourceDialect>
pub fn take_file( &self, payload: ScreenshotTakeFileRequest, ) -> QueryResponseFut<ScreenshotTakeFileResponse, DefaultFuchsiaResourceDialect>
Collects the current graphical content of a display in a specified buffer format
in the
sRGB color space. Note that the sRGB color space is non-linear, meaning that unit tests
doing pixel equality checks making use of non-fully saturated colors should convert to a
linear color space.
TODO(https://fxbug.dev/42065844): Link to fuchsia.dev documentation when it’s up.
Screenshot is taken immediately, populated with the display’s content from the most recent VSYNC.
If the client calls [TakeFile
] a second time before a first [TakeFile
] call returns,
the server will close the Screenshot connection with a ZX_ERR_SHOULD_WAIT epitaph.
If capture fails due to an internal error, the server will close the Screenshot connection with a ZX_ERR_INTERNAL epitaph.
This call should be used if the client is on the host and does not support VMOs, as is the case for ffx tools.
Trait Implementations§
Source§impl Clone for ScreenshotProxy
impl Clone for ScreenshotProxy
Source§fn clone(&self) -> ScreenshotProxy
fn clone(&self) -> ScreenshotProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ScreenshotProxy
impl Debug for ScreenshotProxy
Source§impl Proxy for ScreenshotProxy
impl Proxy for ScreenshotProxy
Source§type Protocol = ScreenshotMarker
type Protocol = ScreenshotMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl ScreenshotProxyInterface for ScreenshotProxy
impl ScreenshotProxyInterface for ScreenshotProxy
type TakeResponseFut = QueryResponseFut<ScreenshotTakeResponse>
type TakeFileResponseFut = QueryResponseFut<ScreenshotTakeFileResponse>
fn take(&self, payload: ScreenshotTakeRequest) -> Self::TakeResponseFut
fn take_file( &self, payload: ScreenshotTakeFileRequest, ) -> Self::TakeFileResponseFut
Auto Trait Implementations§
impl Freeze for ScreenshotProxy
impl !RefUnwindSafe for ScreenshotProxy
impl Send for ScreenshotProxy
impl Sync for ScreenshotProxy
impl Unpin for ScreenshotProxy
impl !UnwindSafe for ScreenshotProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)