pub struct UnresolvedEdge<T> {
pub top: T,
pub right: T,
pub bottom: T,
pub left: T,
}Expand description
Unresolved edge sizes for margin/padding/border.
This stores the raw CSS values before resolution, allowing us to defer resolution until the containing block size is known.
Fields§
§top: T§right: T§bottom: T§left: TImplementations§
Source§impl<T> UnresolvedEdge<T>
impl<T> UnresolvedEdge<T>
Source§impl UnresolvedEdge<UnresolvedMargin>
impl UnresolvedEdge<UnresolvedMargin>
Sourcepub fn resolve(&self, ctx: &ResolutionContext) -> EdgeSizes
pub fn resolve(&self, ctx: &ResolutionContext) -> EdgeSizes
Resolve all margin edges to pixel values.
Sourcepub fn get_margin_auto(&self) -> MarginAuto
pub fn get_margin_auto(&self) -> MarginAuto
Extract which margins are set to auto.
Source§impl UnresolvedEdge<PixelValue>
impl UnresolvedEdge<PixelValue>
Sourcepub fn resolve(
&self,
ctx: &ResolutionContext,
prop_ctx: PropertyContext,
) -> EdgeSizes
pub fn resolve( &self, ctx: &ResolutionContext, prop_ctx: PropertyContext, ) -> EdgeSizes
Resolve all edges to pixel values.
Trait Implementations§
Source§impl<T: Clone> Clone for UnresolvedEdge<T>
impl<T: Clone> Clone for UnresolvedEdge<T>
Source§fn clone(&self) -> UnresolvedEdge<T>
fn clone(&self) -> UnresolvedEdge<T>
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<T: Debug> Debug for UnresolvedEdge<T>
impl<T: Debug> Debug for UnresolvedEdge<T>
Source§impl<T: Default> Default for UnresolvedEdge<T>
impl<T: Default> Default for UnresolvedEdge<T>
Source§fn default() -> UnresolvedEdge<T>
fn default() -> UnresolvedEdge<T>
Returns the “default value” for a type. Read more
impl<T: Copy> Copy for UnresolvedEdge<T>
Auto Trait Implementations§
impl<T> Freeze for UnresolvedEdge<T>where
T: Freeze,
impl<T> RefUnwindSafe for UnresolvedEdge<T>where
T: RefUnwindSafe,
impl<T> Send for UnresolvedEdge<T>where
T: Send,
impl<T> Sync for UnresolvedEdge<T>where
T: Sync,
impl<T> Unpin for UnresolvedEdge<T>where
T: Unpin,
impl<T> UnsafeUnpin for UnresolvedEdge<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for UnresolvedEdge<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more