pub struct ContentBounds {
pub size: Option<SizeU>,
pub origin: Option<Vec_>,
/* private fields */
}
Expand description
Defines the size and position of a piece of graphical content.
The bounds of the content are assumed to be rectangular.
Fields§
§size: Option<SizeU>
The size of the content, defined in its parent view’s coordinate space.
For example, a parent view with size 1280x800 is assumed to have a useful coordinate space from (0, 0) to (1280, 800). A piece of content that’s one-fourth the area of the parent view would have size 640x400.
origin: Option<Vec_>
The location of the top-left corner of the content’s origin, defined in the parent view’s coordinate space.
Returning to the example above, we could position the content to cover the bottom-right quadrant of the parent by assigning an origin of (640, 400).
Trait Implementations§
Source§impl Clone for ContentBounds
impl Clone for ContentBounds
Source§fn clone(&self) -> ContentBounds
fn clone(&self) -> ContentBounds
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ContentBounds
impl Debug for ContentBounds
Source§impl<D: ResourceDialect> Decode<ContentBounds, D> for ContentBounds
impl<D: ResourceDialect> Decode<ContentBounds, D> for ContentBounds
Source§impl Default for ContentBounds
impl Default for ContentBounds
Source§fn default() -> ContentBounds
fn default() -> ContentBounds
Returns the “default value” for a type. Read more
Source§impl<D: ResourceDialect> Encode<ContentBounds, D> for &ContentBounds
impl<D: ResourceDialect> Encode<ContentBounds, D> for &ContentBounds
Source§impl PartialEq for ContentBounds
impl PartialEq for ContentBounds
Source§impl TypeMarker for ContentBounds
impl TypeMarker for ContentBounds
Source§type Owned = ContentBounds
type Owned = ContentBounds
The owned Rust type which this FIDL type decodes into.
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.Source§impl ValueTypeMarker for ContentBounds
impl ValueTypeMarker for ContentBounds
Source§type Borrowed<'a> = &'a ContentBounds
type Borrowed<'a> = &'a ContentBounds
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ContentBounds
impl StructuralPartialEq for ContentBounds
Auto Trait Implementations§
impl Freeze for ContentBounds
impl RefUnwindSafe for ContentBounds
impl Send for ContentBounds
impl Sync for ContentBounds
impl Unpin for ContentBounds
impl UnwindSafe for ContentBounds
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)