pub struct ViewSpec {
pub view_holder_token: Option<ViewHolderToken>,
pub view_ref: Option<ViewRef>,
pub annotations: Option<Vec<Annotation>>,
pub viewport_creation_token: Option<ViewportCreationToken>,
/* private fields */
}
Expand description
A description of a view that can be presented by a GraphicalPresenter
.
Fields§
§view_holder_token: Option<ViewHolderToken>
The view holder token for the presented Gfx view. Must be unset for
Flatland views. One of view_holder_token
or viewport_creation_token
must be set.
view_ref: Option<ViewRef>
The ViewRef
of the presented Gfx view. Must be unset for Flatland
views.
annotations: Option<Vec<Annotation>>
The initial annotations associated with the presented view. Updates to
annotations are observed through the AnnotationController
passed
to PresentView()
.
Optional.
viewport_creation_token: Option<ViewportCreationToken>
The viewport creation token for the presented Flatland view. Must be
unset for Gfx views. One of view_holder_token
or viewport_creation_token
must be set.
Trait Implementations§
Source§impl Decode<ViewSpec, DefaultFuchsiaResourceDialect> for ViewSpec
impl Decode<ViewSpec, DefaultFuchsiaResourceDialect> for ViewSpec
Source§impl ResourceTypeMarker for ViewSpec
impl ResourceTypeMarker for ViewSpec
Source§type Borrowed<'a> = &'a mut ViewSpec
type Borrowed<'a> = &'a mut ViewSpec
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
Cheaply converts from
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for ViewSpec
impl TypeMarker for ViewSpec
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.impl Standalone<DefaultFuchsiaResourceDialect> for ViewSpec
impl StructuralPartialEq for ViewSpec
Auto Trait Implementations§
impl Freeze for ViewSpec
impl RefUnwindSafe for ViewSpec
impl Send for ViewSpec
impl Sync for ViewSpec
impl Unpin for ViewSpec
impl UnwindSafe for ViewSpec
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