Struct fidl_fuchsia_element::ViewSpec
source · 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.
Implementations§
Trait Implementations§
source§impl Decode<ViewSpec> for ViewSpec
impl Decode<ViewSpec> for ViewSpec
source§impl PartialEq<ViewSpec> for ViewSpec
impl PartialEq<ViewSpec> for ViewSpec
source§impl ResourceTypeMarker for ViewSpec
impl ResourceTypeMarker for ViewSpec
§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.