pub struct GraphicalPresenterSynchronousProxy { /* private fields */ }Implementations§
Source§impl GraphicalPresenterSynchronousProxy
impl GraphicalPresenterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<GraphicalPresenterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<GraphicalPresenterEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn present_view(
&self,
view_spec: ViewSpec,
annotation_controller: Option<ClientEnd<AnnotationControllerMarker>>,
view_controller_request: Option<ServerEnd<ViewControllerMarker>>,
___deadline: MonotonicInstant,
) -> Result<GraphicalPresenterPresentViewResult, Error>
pub fn present_view( &self, view_spec: ViewSpec, annotation_controller: Option<ClientEnd<AnnotationControllerMarker>>, view_controller_request: Option<ServerEnd<ViewControllerMarker>>, ___deadline: MonotonicInstant, ) -> Result<GraphicalPresenterPresentViewResult, Error>
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_specdescribes the view to presentannotation_controllera handle to anAnnotationController, allowing theGraphicalPresenterserver to observe and update the view’s annotations.view_controller_requestan optional request for a controller for the view
- error
view_specmust containview_holder_tokenandview_reffor Gfx views, ORviewport_creation_tokenfor Flatland views, but never both. If both are set, errorPresentViewError.INVALID_ARGSis returned. - error
PresentViewError.INVALID_ARGSifspec.view_holder_tokenorspec.view_refare missing or invalid.
Trait Implementations§
Source§impl From<Channel> for GraphicalPresenterSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for GraphicalPresenterSynchronousProxy
Available on Fuchsia only.
Source§impl From<GraphicalPresenterSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<GraphicalPresenterSynchronousProxy> for Handle
Available on Fuchsia only.
Source§fn from(value: GraphicalPresenterSynchronousProxy) -> Self
fn from(value: GraphicalPresenterSynchronousProxy) -> Self
Converts to this type from the input type.
Source§impl FromClient for GraphicalPresenterSynchronousProxy
Available on Fuchsia only.
impl FromClient for GraphicalPresenterSynchronousProxy
Available on Fuchsia only.
Source§type Protocol = GraphicalPresenterMarker
type Protocol = GraphicalPresenterMarker
The protocol.
Source§fn from_client(value: ClientEnd<GraphicalPresenterMarker>) -> Self
fn from_client(value: ClientEnd<GraphicalPresenterMarker>) -> Self
Converts from a client.
Source§impl SynchronousProxy for GraphicalPresenterSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for GraphicalPresenterSynchronousProxy
Available on Fuchsia only.
Source§type Proxy = GraphicalPresenterProxy
type Proxy = GraphicalPresenterProxy
The async proxy for the same protocol.
Source§type Protocol = GraphicalPresenterMarker
type Protocol = GraphicalPresenterMarker
The protocol which this
Proxy controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for GraphicalPresenterSynchronousProxy
impl RefUnwindSafe for GraphicalPresenterSynchronousProxy
impl Send for GraphicalPresenterSynchronousProxy
impl Sync for GraphicalPresenterSynchronousProxy
impl Unpin for GraphicalPresenterSynchronousProxy
impl UnwindSafe for GraphicalPresenterSynchronousProxy
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