#[repr(C)]pub struct Size<T: Clone + Default + Debug> {
pub width: T,
pub height: T,
}
Fields§
§width: T
§height: T
Implementations§
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Size<T>where
T: Deserialize<'de> + Clone + Default + Debug,
impl<'de, T> Deserialize<'de> for Size<T>where T: Deserialize<'de> + Clone + Default + Debug,
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<T, __RhsT: Copy> Div<__RhsT> for Size<T>where
T: Div<__RhsT, Output = T> + Clone + Default + Debug,
impl<T, __RhsT: Copy> Div<__RhsT> for Size<T>where T: Div<__RhsT, Output = T> + Clone + Default + Debug,
source§impl From<NSRect> for Size<GlobalPixels>
impl From<NSRect> for Size<GlobalPixels>
source§impl From<Size<DevicePixels>> for Size
impl From<Size<DevicePixels>> for Size
source§fn from(size: Size<DevicePixels>) -> Self
fn from(size: Size<DevicePixels>) -> Self
Converts to this type from the input type.
source§impl<T: Clone + Default + Debug> From<SizeRefinement<T>> for Size<T>where
Option<T>: Clone,
impl<T: Clone + Default + Debug> From<SizeRefinement<T>> for Size<T>where Option<T>: Clone,
source§fn from(value: SizeRefinement<T>) -> Self
fn from(value: SizeRefinement<T>) -> Self
Converts to this type from the input type.
source§impl From<Vector2I> for Size<DevicePixels>
impl From<Vector2I> for Size<DevicePixels>
source§impl<T, Rhs> Mul<Rhs> for Size<T>where
T: Mul<Rhs, Output = Rhs> + Clone + Default + Debug,
Rhs: Clone + Default + Debug,
impl<T, Rhs> Mul<Rhs> for Size<T>where T: Mul<Rhs, Output = Rhs> + Clone + Default + Debug, Rhs: Clone + Default + Debug,
source§impl<T, S> MulAssign<S> for Size<T>where
T: Mul<S, Output = T> + Clone + Default + Debug,
S: Clone,
impl<T, S> MulAssign<S> for Size<T>where T: Mul<S, Output = T> + Clone + Default + Debug, S: Clone,
source§fn mul_assign(&mut self, rhs: S)
fn mul_assign(&mut self, rhs: S)
Performs the
*=
operation. Read moresource§impl<T: PartialEq + Clone + Default + Debug> PartialEq<Size<T>> for Size<T>
impl<T: PartialEq + Clone + Default + Debug> PartialEq<Size<T>> for Size<T>
source§impl<T: Clone + Default + Debug> Refineable for Size<T>where
Option<T>: Clone,
impl<T: Clone + Default + Debug> Refineable for Size<T>where Option<T>: Clone,
type Refinement = SizeRefinement<T>
fn refine(&mut self, refinement: &Self::Refinement)
fn refined(self, refinement: Self::Refinement) -> Self
fn from_cascade(cascade: &Cascade<Self>) -> Selfwhere Self: Default + Sized,
impl<T: Copy + Clone + Default + Debug> Copy for Size<T>
impl<T> Eq for Size<T>where T: Eq + Default + Debug + Clone,
impl<T: Clone + Default + Debug> StructuralPartialEq for Size<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Size<T>where T: RefUnwindSafe,
impl<T> Send for Size<T>where T: Send,
impl<T> Sync for Size<T>where T: Sync,
impl<T> Unpin for Size<T>where T: Unpin,
impl<T> UnwindSafe for Size<T>where T: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.