pub struct WindowFrame {
pub x: i32,
pub y: i32,
pub width: i32,
pub height: i32,
}Fields§
§x: i32§y: i32§width: i32§height: i32Implementations§
Source§impl WindowFrame
impl WindowFrame
pub fn root() -> Self
pub fn right(self) -> i32
pub fn bottom(self) -> i32
pub fn center_x(self) -> i32
pub fn center_y(self) -> i32
pub fn shifted(self, direction: Direction) -> Self
pub fn resize_by_direction(&mut self, direction: Direction, amount: i32)
pub fn clamp(&mut self)
Trait Implementations§
Source§impl Clone for WindowFrame
impl Clone for WindowFrame
Source§fn clone(&self) -> WindowFrame
fn clone(&self) -> WindowFrame
Returns a duplicate 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 WindowFrame
impl Debug for WindowFrame
Source§impl<'de> Deserialize<'de> for WindowFrame
impl<'de> Deserialize<'de> for WindowFrame
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
Source§impl PartialEq for WindowFrame
impl PartialEq for WindowFrame
Source§impl Serialize for WindowFrame
impl Serialize for WindowFrame
impl Copy for WindowFrame
impl Eq for WindowFrame
impl StructuralPartialEq for WindowFrame
Auto Trait Implementations§
impl Freeze for WindowFrame
impl RefUnwindSafe for WindowFrame
impl Send for WindowFrame
impl Sync for WindowFrame
impl Unpin for WindowFrame
impl UnsafeUnpin for WindowFrame
impl UnwindSafe for WindowFrame
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.