Struct fidl_fuchsia_ui_views::ViewProxy
source · pub struct ViewProxy { /* private fields */ }
Implementations§
source§impl ViewProxy
impl ViewProxy
sourcepub fn take_event_stream(&self) -> ViewEventStream
pub fn take_event_stream(&self) -> ViewEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn present(&self, view_token: ViewToken) -> Result<(), Error>
pub fn present(&self, view_token: ViewToken) -> Result<(), Error>
Provides the View with an attachment point to Scenic’s scene graph.
When Present()
is called the View’s implementation should create a
View resource within Scenic by providing it with the view_token
(using
a fuchsia.ui.gfx.CreateResourceCmd
and fuchsia.ui.gfx.ViewArgs
).
Then the implementation should attach its graphical content to the
newly-created View resource using a fuchsia.ui.gfx.AddChildCmd
.
If the implementation already owns a View resource (because Present()
had already been called before), then it should terminate the connection
with an error.
TODO(https://fxbug.dev/42098670): Allow re-parenting View
s with a new Present()
call.
Trait Implementations§
source§impl Proxy for ViewProxy
impl Proxy for ViewProxy
§type Protocol = ViewMarker
type Protocol = ViewMarker
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
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ViewProxy
impl Send for ViewProxy
impl Sync for ViewProxy
impl Unpin for ViewProxy
impl !UnwindSafe for ViewProxy
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