pub struct GraphicalPresenterProxy { /* private fields */ }
Implementations§
source§impl GraphicalPresenterProxy
impl GraphicalPresenterProxy
sourcepub fn take_event_stream(&self) -> GraphicalPresenterEventStream
pub fn take_event_stream(&self) -> GraphicalPresenterEventStream
Get a Stream of events from the remote end of the GraphicalPresenter protocol
Panics
Panics if the event stream was already taken.
sourcepub fn present_view(
&self,
view_spec: ViewSpec,
annotation_controller: Option<ClientEnd<AnnotationControllerMarker>>,
view_controller_request: Option<ServerEnd<ViewControllerMarker>>
) -> QueryResponseFut<GraphicalPresenterPresentViewResult>
pub fn present_view( &self, view_spec: ViewSpec, annotation_controller: Option<ClientEnd<AnnotationControllerMarker>>, view_controller_request: Option<ServerEnd<ViewControllerMarker>> ) -> QueryResponseFut<GraphicalPresenterPresentViewResult>
Presents the view described by view_spec
.
If view_controller_request
is provided, it will be connected to a ViewController
implemented by the GraphicalPresenter
server. When the view is dismissed,
the ViewController
channel is closed with a ZX_OK
, at which point it is safe
to clean up resources backing the view. To dismiss the view, the client should
call ViewController.Dismiss()
and wait for the ZX_OK
epitaph.
Not providing a view_controller_request
handle will make it impossible for the
client to observe the view’s lifecycle.
view_spec
describes the view to presentannotation_controller
a handle to anAnnotationController
, allowing theGraphicalPresenter
server to observe and update the view’s annotations.view_controller_request
an optional request for a controller for the view
- error
view_spec
must containview_holder_token
andview_ref
for Gfx views, ORviewport_creation_token
for Flatland views, but never both. If both are set, errorPresentViewError.INVALID_ARGS
is returned. - error
PresentViewError.INVALID_ARGS
ifspec.view_holder_token
orspec.view_ref
are missing or invalid.
Trait Implementations§
source§impl Clone for GraphicalPresenterProxy
impl Clone for GraphicalPresenterProxy
source§fn clone(&self) -> GraphicalPresenterProxy
fn clone(&self) -> GraphicalPresenterProxy
Returns a copy 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§impl Debug for GraphicalPresenterProxy
impl Debug for GraphicalPresenterProxy
source§impl GraphicalPresenterProxyInterface for GraphicalPresenterProxy
impl GraphicalPresenterProxyInterface for GraphicalPresenterProxy
type PresentViewResponseFut = QueryResponseFut<Result<(), PresentViewError>>
fn present_view( &self, view_spec: ViewSpec, annotation_controller: Option<ClientEnd<AnnotationControllerMarker>>, view_controller_request: Option<ServerEnd<ViewControllerMarker>> ) -> Self::PresentViewResponseFut
source§impl Proxy for GraphicalPresenterProxy
impl Proxy for GraphicalPresenterProxy
§type Protocol = GraphicalPresenterMarker
type Protocol = GraphicalPresenterMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more