Struct Rect Copy item path #[repr(C)]
pub struct Rect {
pub x: i32 ,
pub y: i32 ,
pub width: i32 ,
pub height: i32 ,
}
Expand description An integral, rectangular, axis-aligned region in a 2D cartesian
space.
This type does not specify units. Protocols that use this type should
specify the characteristics of the vector space, including orientation and
units.
The location of the origin of the rectangle in the x-axis.
The location of the origin of the rectangle in the y-axis.
The distance along the x-axis.
If width
is positive, the region includes x values starting at x
and
increasing along the x-axis. If width
is negative, the region includes
x values starting at x
and decreasing along the x-axis.
The distance along the y-axis.
If height
is positive, the region includes y values starting at y
and increasing along the y-axis. If height
is negative, the region
includes y values starting at y
and decreasing along the y-axis.
Performs copy-assignment from
source
.
Read more Formats the value using the given formatter.
Read more Creates a valid instance of Self
. The specific value does not matter,
since it will be overwritten by decode
.
Decodes an object of type
T
from the decoder’s buffers into
self
.
Read more Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self
and
other
) and is used by
the
>=
operator.
Read more The owned Rust type which this FIDL type decodes into.
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of inline_align
.
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 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.
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from
&Self::Owned
. There are three cases:
Read more Cheaply converts from &Self::Owned
to Self::Borrowed
.
The marker type to use when the body is at the top-level.
The marker type to use when the body is nested in a result union.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dst
.
Read more Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more Encodes the object into the encoder’s buffers. Any handles stored in the
object are swapped for
Handle::INVALID
.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From <T> for U
chooses to do.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer.
Read more Mutably dereferences the given pointer.
Read more Drops the object pointed to by the given pointer.
Read more The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.