pub struct ScreenCaptureProxy { /* private fields */ }
Implementations§
Source§impl ScreenCaptureProxy
impl ScreenCaptureProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.ui.composition.internal/ScreenCapture.
Sourcepub fn take_event_stream(&self) -> ScreenCaptureEventStream
pub fn take_event_stream(&self) -> ScreenCaptureEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn configure(
&self,
payload: ScreenCaptureConfig,
) -> QueryResponseFut<ScreenCaptureConfigureResult, DefaultFuchsiaResourceDialect>
pub fn configure( &self, payload: ScreenCaptureConfig, ) -> QueryResponseFut<ScreenCaptureConfigureResult, DefaultFuchsiaResourceDialect>
Clients should first use the [‘fuchsia.ui.composition/Allocator’] protocol to register a BufferCollection.
Similarly, the clients are responsible for specifying a buffer big enough for the image. If the buffer is too small, an attempt will be made to render the image, however, it will not be guaranteed to contain the complete image.
Sourcepub fn get_next_frame(
&self,
) -> QueryResponseFut<ScreenCaptureGetNextFrameResult, DefaultFuchsiaResourceDialect>
pub fn get_next_frame( &self, ) -> QueryResponseFut<ScreenCaptureGetNextFrameResult, DefaultFuchsiaResourceDialect>
[GetNextFrame
] returns the latest unseen-by-the-client frame as soon
as possible. On the first call to [GetNextFrame
] and any subsequent
calls that have not recieved the previous expected requested frame,
[GetNextFrame
] will return immediately with the last frame to be
rendered. If the client had requested the previous frame, the server
will wait until the next frame is produced to return.
After the client finishes processing the returned buffer, they should drop the eventpair to signal to the server that the buffer can be re-used.
It is invalid to call [GetNextFrame
] while a previous call is still
pending. Doing so will return a BAD_HANGING_GET error and cause the
channel to close.
Trait Implementations§
Source§impl Clone for ScreenCaptureProxy
impl Clone for ScreenCaptureProxy
Source§fn clone(&self) -> ScreenCaptureProxy
fn clone(&self) -> ScreenCaptureProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ScreenCaptureProxy
impl Debug for ScreenCaptureProxy
Source§impl Proxy for ScreenCaptureProxy
impl Proxy for ScreenCaptureProxy
Source§type Protocol = ScreenCaptureMarker
type Protocol = ScreenCaptureMarker
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 ScreenCaptureProxyInterface for ScreenCaptureProxy
impl ScreenCaptureProxyInterface for ScreenCaptureProxy
type ConfigureResponseFut = QueryResponseFut<Result<(), ScreenCaptureError>>
type GetNextFrameResponseFut = QueryResponseFut<Result<FrameInfo, ScreenCaptureError>>
fn configure(&self, payload: ScreenCaptureConfig) -> Self::ConfigureResponseFut
fn get_next_frame(&self) -> Self::GetNextFrameResponseFut
Auto Trait Implementations§
impl Freeze for ScreenCaptureProxy
impl !RefUnwindSafe for ScreenCaptureProxy
impl Send for ScreenCaptureProxy
impl Sync for ScreenCaptureProxy
impl Unpin for ScreenCaptureProxy
impl !UnwindSafe for ScreenCaptureProxy
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
)