Struct FloatRect

pub struct FloatRect { pub min: Vec2<f32>, pub max: Vec2<f32> }

A rectangular section anywhere in 2D float space.

Fields

min: Vec2<f32>

The top left corner location of the rectangle (inclusive)

max: Vec2<f32>

The bottom right corner location of the rectangle (inclusive)

Implementations

impl FloatRect

const fn byte_size() -> usize

Number of bytes this would consume in an exr file.

fn write<W: Write>(&self, write: &mut W) -> UnitResult

Without validation, write this instance to the byte stream.

fn read<R: Read>(read: &mut R) -> Result<Self>

Read the value without validating.

Trait Implementations

impl Clone for FloatRect

fn clone(&self) -> Self

impl Copy for FloatRect

impl Debug for FloatRect

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl PartialEq for FloatRect

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for FloatRect

Auto Trait Implementations

impl Freeze for FloatRect

impl RefUnwindSafe for FloatRect

impl Send for FloatRect

impl Sync for FloatRect

impl Unpin for FloatRect

impl UnsafeUnpin for FloatRect

impl UnwindSafe for FloatRect

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for FloatRect where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for FloatRect where ST: ?Sized, DT: ?Sized,

impl<T> Any for FloatRect where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for FloatRect where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for FloatRect where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for FloatRect where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for FloatRect

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for FloatRect

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for FloatRect where T: ?Sized,

impl<T> ToOwned for FloatRect where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for FloatRect where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for FloatRect where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for FloatRect where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>