pub struct Edges {
pub left: f32,
pub right: f32,
pub top: f32,
pub bottom: f32,
pub inline_start: Option<f32>,
pub inline_end: Option<f32>,
pub block_start: Option<f32>,
pub block_end: Option<f32>,
pub pct_left: Option<f32>,
pub pct_right: Option<f32>,
pub pct_top: Option<f32>,
pub pct_bottom: Option<f32>,
}Expand description
Four edge values (in CSS order: left, right, top, bottom).
W5.5 adds CSS Logical Properties Level 1 fields (inline_start,
inline_end, block_start, block_end). When set, they ride along
to the lumen-core Edges whose resolved(dir) method maps them onto
the physical sides at layout time per [ResolvedDirection].
Fields§
§left: f32Left edge in px.
right: f32Right edge in px.
top: f32Top edge in px.
bottom: f32Bottom edge in px.
inline_start: Option<f32>*-inline-start in px - maps to left (LTR) / right (RTL).
inline_end: Option<f32>*-inline-end in px - maps to right (LTR) / left (RTL).
block_start: Option<f32>*-block-start in px - alias for top (no vertical writing modes yet).
block_end: Option<f32>*-block-end in px - alias for bottom.
pct_left: Option<f32>CSS percent unit for the left edge (padding: 5%). When Some
the px field for the side is ignored; the layout backend hands
taffy a LengthPercentage::percent which resolves against the
containing block per CSS.
pct_right: Option<f32>See Self::pct_left.
pct_top: Option<f32>See Self::pct_left.
pct_bottom: Option<f32>See Self::pct_left.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Edges
impl<'de> Deserialize<'de> for Edges
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>,
impl Copy for Edges
impl StructuralPartialEq for Edges
Auto Trait Implementations§
impl Freeze for Edges
impl RefUnwindSafe for Edges
impl Send for Edges
impl Sync for Edges
impl Unpin for Edges
impl UnsafeUnpin for Edges
impl UnwindSafe for Edges
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.