#[repr(C)]pub struct ViewRefControl {
pub reference: EventPair,
}Expand description
A ViewRefControl is the peer to a ViewRef. Their references are linked.
Like ViewRef, a ViewRefControl is a typed handle to an eventpair. Unlike
ViewRef, a ViewRefControl’s handle is unique. Scenic uses this property
when it ties a ViewRefControl to a View, arranged to share fate. When a
View is destroyed, the associated destruction of its ViewRefControl
triggers an automatic ZX_EVENTPAIR_PEER_CLOSED signal sent to all ViewRef
holders; hence ViewRef holders may track View lifetime.
As part of View creation, the client creates a linked ViewRef/ViewRefControl pair and hands the pair to Scenic (ViewRef is described above). The client must not clone the ViewRefControl. It must not remove or modify the ViewRefControl’s capabilities; otherwise the View is not created.
Fields§
§reference: EventPairTrait Implementations§
Source§impl Debug for ViewRefControl
impl Debug for ViewRefControl
Source§impl<___E> Encode<ViewRefControl, ___E> for ViewRefControlwhere
___E: InternalHandleEncoder + ?Sized + HandleEncoder,
impl<___E> Encode<ViewRefControl, ___E> for ViewRefControlwhere
___E: InternalHandleEncoder + ?Sized + HandleEncoder,
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, ViewRefControl>
const COPY_OPTIMIZATION: CopyOptimization<Self, ViewRefControl>
Source§fn encode(
self,
encoder_: &mut ___E,
out_: &mut MaybeUninit<ViewRefControl>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder_: &mut ___E, out_: &mut MaybeUninit<ViewRefControl>, _: (), ) -> Result<(), EncodeError>
Source§impl<___E> EncodeOption<Box<'static, ViewRefControl>, ___E> for ViewRefControl
impl<___E> EncodeOption<Box<'static, ViewRefControl>, ___E> for ViewRefControl
Source§fn encode_option(
this: Option<Self>,
encoder: &mut ___E,
out: &mut MaybeUninit<Box<'static, ViewRefControl>>,
_: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Self>, encoder: &mut ___E, out: &mut MaybeUninit<Box<'static, ViewRefControl>>, _: (), ) -> Result<(), EncodeError>
Source§impl FromWire<ViewRefControl> for ViewRefControl
impl FromWire<ViewRefControl> for ViewRefControl
Source§const COPY_OPTIMIZATION: CopyOptimization<ViewRefControl, Self>
const COPY_OPTIMIZATION: CopyOptimization<ViewRefControl, Self>
Source§fn from_wire(wire: ViewRefControl) -> Self
fn from_wire(wire: ViewRefControl) -> Self
Source§impl PartialEq for ViewRefControl
impl PartialEq for ViewRefControl
impl StructuralPartialEq for ViewRefControl
Auto Trait Implementations§
impl Freeze for ViewRefControl
impl RefUnwindSafe for ViewRefControl
impl Send for ViewRefControl
impl Sync for ViewRefControl
impl Unpin for ViewRefControl
impl UnsafeUnpin for ViewRefControl
impl UnwindSafe for ViewRefControl
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
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]