pub struct ViewDescriptor {
pub view_ref_koid: Option<u64>,
pub layout: Option<Layout>,
pub extent_in_context: Option<RotatableExtent>,
pub extent_in_parent: Option<RotatableExtent>,
pub children: Option<Vec<u32>>,
/* private fields */
}
Expand description
Data for a particular view: identifier, position, and children.
Fields§
§view_ref_koid: Option<u64>
This view’s fuchsia.ui.views.ViewRef koid.
layout: Option<Layout>
This view’s origin, logical size, pixel scale, and inset data, in the view’s own coordinate system.
Limitations. Data consistency between server and client depend on the specific graphics API. Some APIs provide weak consistency, where the server-side data (this data) and the client-side data (in the view’s UI client) are allowed to diverge for some time.
extent_in_context: Option<RotatableExtent>
This view’s extent, in the context view’s coordinate system. It does NOT describe the child view’s logical size.
This describes the “ground truth” position of this view within the context view, regardless of view tree depth, or specific layout state of intermediate views.
Limitations. It does NOT describe whether the view is “visible” (e.g., whether the view has opacity applied, or is not occluded by another view), and it does NOT describe whether the view is “hittable” (e.g., whether the view is positioned fully inside of every ancestor view’s bounding box).
extent_in_parent: Option<RotatableExtent>
The space occupied within the parent view’s coordinate system. It does NOT describe the child view’s logical size.
children: Option<Vec<u32>>
The list of child views, in the order known to the graphics API.
Each integer in this vector refers to the child’s position in the |views| or |incomplete| vector that the parent is in.
The identity, position, and size of each child view. Position and size are described by the extent of the child view within the parent view’s coordinate system.
The view tree topology is reliable. A child placed here is equivalent to the parent view receiving a “child view connected” signal.
Limitations. A child’s view boundary is described in the parent view’s coordinate system, which is subject to weak consistency (depending on the graphics API). That is, when a parent view has a change in size or metrics, the context view may observe a “jump” as the parent view incorporates those data. In such cases, a new ViewTreeSnapshot is issued to describe the change in position, relative to the context view.
Trait Implementations§
Source§impl Clone for ViewDescriptor
impl Clone for ViewDescriptor
Source§fn clone(&self) -> ViewDescriptor
fn clone(&self) -> ViewDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ViewDescriptor
impl Debug for ViewDescriptor
Source§impl<D: ResourceDialect> Decode<ViewDescriptor, D> for ViewDescriptor
impl<D: ResourceDialect> Decode<ViewDescriptor, D> for ViewDescriptor
Source§impl Default for ViewDescriptor
impl Default for ViewDescriptor
Source§fn default() -> ViewDescriptor
fn default() -> ViewDescriptor
Source§impl<D: ResourceDialect> Encode<ViewDescriptor, D> for &ViewDescriptor
impl<D: ResourceDialect> Encode<ViewDescriptor, D> for &ViewDescriptor
Source§impl PartialEq for ViewDescriptor
impl PartialEq for ViewDescriptor
Source§impl TypeMarker for ViewDescriptor
impl TypeMarker for ViewDescriptor
Source§type Owned = ViewDescriptor
type Owned = ViewDescriptor
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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.Source§impl ValueTypeMarker for ViewDescriptor
impl ValueTypeMarker for ViewDescriptor
Source§type Borrowed<'a> = &'a ViewDescriptor
type Borrowed<'a> = &'a ViewDescriptor
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ViewDescriptor
impl StructuralPartialEq for ViewDescriptor
Auto Trait Implementations§
impl Freeze for ViewDescriptor
impl RefUnwindSafe for ViewDescriptor
impl Send for ViewDescriptor
impl Sync for ViewDescriptor
impl Unpin for ViewDescriptor
impl UnwindSafe for ViewDescriptor
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)