pub(crate) struct ContentSizes {
pub min_content: Au,
pub max_content: Au,
}
Fields§
§min_content: Au
§max_content: Au
Implementations§
Source§impl ContentSizes
impl ContentSizes
Source§impl ContentSizes
impl ContentSizes
Sourcepub fn shrink_to_fit(&self, available_size: Au) -> Au
pub fn shrink_to_fit(&self, available_size: Au) -> Au
Clamps the provided amount to be between the min-content and the max-content. This is called “shrink-to-fit” in CSS2, and “fit-content” in CSS Sizing. https://drafts.csswg.org/css2/visudet.html#shrink-to-fit-float https://drafts.csswg.org/css-sizing/#funcdef-width-fit-content
Trait Implementations§
Source§impl Add for ContentSizes
impl Add for ContentSizes
Source§impl AddAssign for ContentSizes
impl AddAssign for ContentSizes
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Clone for ContentSizes
impl Clone for ContentSizes
Source§fn clone(&self) -> ContentSizes
fn clone(&self) -> ContentSizes
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 ContentSizes
impl Debug for ContentSizes
Source§impl Default for ContentSizes
impl Default for ContentSizes
Source§fn default() -> ContentSizes
fn default() -> ContentSizes
Returns the “default value” for a type. Read more
Source§impl From<Au> for ContentSizes
impl From<Au> for ContentSizes
Source§impl MallocSizeOf for ContentSizes
impl MallocSizeOf for ContentSizes
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl Zero for ContentSizes
impl Zero for ContentSizes
impl Copy for ContentSizes
Auto Trait Implementations§
impl Freeze for ContentSizes
impl RefUnwindSafe for ContentSizes
impl Send for ContentSizes
impl Sync for ContentSizes
impl Unpin for ContentSizes
impl UnwindSafe for ContentSizes
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<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.