pub struct PixelRect { /* private fields */ }Expand description
A non-empty half-open pixel rectangle in the coordinate space named by its owner.
Implementations§
Source§impl PixelRect
impl PixelRect
pub fn new(x: u32, y: u32, width: u32, height: u32) -> Result<Self>
pub const fn x(self) -> u32
pub const fn y(self) -> u32
pub const fn width(self) -> u32
pub const fn height(self) -> u32
pub fn right_exclusive(self) -> Result<u32>
pub fn bottom_exclusive(self) -> Result<u32>
pub fn fits_within(self, dimensions: PixelDimensions) -> bool
Trait Implementations§
impl Copy for PixelRect
Source§impl<'de> Deserialize<'de> for PixelRect
impl<'de> Deserialize<'de> for PixelRect
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PixelRect
Source§impl JsonSchema for PixelRect
impl JsonSchema for PixelRect
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for PixelRect
Auto Trait Implementations§
impl Forget for PixelRect
impl Freeze for PixelRect
impl Move for PixelRect
impl RefUnwindSafe for PixelRect
impl Send for PixelRect
impl Sync for PixelRect
impl Unpin for PixelRect
impl UnsafeUnpin for PixelRect
impl UnwindSafe for PixelRect
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