[−][src]Struct thyme::Rect
A rectangular area, represented by a position and a size
Fields
pos: Point
The position of the rectangle
size: Point
The size of the rectangle
Implementations
impl Rect
[src]
pub fn new(pos: Point, size: Point) -> Rect
[src]
Construct a new Rect
with the specified position and size.
pub fn left(&self) -> f32
[src]
Returns the left edge of this Rect.
pub fn right(&self) -> f32
[src]
Returns the right edge of this Rect.
pub fn top(&self) -> f32
[src]
Returns the top edge of this Rect.
pub fn bot(&self) -> f32
[src]
Returns the bottom edge of this Rect.
pub fn is_inside(&self, pos: Point) -> bool
[src]
Returns true if the specified point is inside (or on the edge of) this rectangle; false otherwise
pub fn min(self, other: Rect) -> Rect
[src]
Returns a new Rect
this is the minimum extent on a component-by-component
basis between this and other
. The returned Rect
will barely fit inside
both this and other
(if possible - if not it will have size 0)
pub fn max(self, other: Rect) -> Rect
[src]
Returns a new Rect
that is the maximum extent on a component-by-component
basis between this and other
. The returned Rect
will barely contain
both this and other
.
Trait Implementations
impl Clone for Rect
[src]
impl Copy for Rect
[src]
impl Debug for Rect
[src]
impl Default for Rect
[src]
impl<'de> Deserialize<'de> for Rect
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Mul<Rect> for f32
[src]
type Output = Rect
The resulting type after applying the *
operator.
fn mul(self, rect: Rect) -> Rect
[src]
impl Mul<f32> for Rect
[src]
type Output = Rect
The resulting type after applying the *
operator.
fn mul(self, val: f32) -> Rect
[src]
impl PartialEq<Rect> for Rect
[src]
impl Serialize for Rect
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Rect
[src]
Auto Trait Implementations
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T where
T: Copy,
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
F: FnOnce(&mut T) -> Result<(), E>,
fn get_elements_size() -> usize
fn to_void_ptr(&self) -> *const ()
fn ref_from_ptr(ptr: *mut (), size: usize) -> Option<*mut T>
fn is_size_suitable(size: usize) -> bool
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,