pub struct Gap {
pub row: f32,
pub column: f32,
pub row_pct: Option<f32>,
pub column_pct: Option<f32>,
}Expand description
CSS gap / row-gap / column-gap - per-axis spacing between
adjacent rows / columns of a flex or grid container (W5.9). The
previous single-scalar gap: f32 is reachable via
Gap::from(value) for back-compat with existing call sites.
Fields§
§row: f32Vertical spacing between adjacent rows (CSS row-gap).
column: f32Horizontal spacing between adjacent columns (CSS column-gap).
row_pct: Option<f32>CSS percent unit for the row gap. When Some(pct) the row gap
resolves as pct% of the container’s content-box height (taffy
receives LengthPercentage::percent); row is ignored.
column_pct: Option<f32>See Self::row_pct; resolves against content-box width.
Implementations§
Trait Implementations§
impl Copy for Gap
impl StructuralPartialEq for Gap
Auto Trait Implementations§
impl Freeze for Gap
impl RefUnwindSafe for Gap
impl Send for Gap
impl Sync for Gap
impl Unpin for Gap
impl UnsafeUnpin for Gap
impl UnwindSafe for Gap
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,
§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> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§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>
Uses this template and the given
entity context to produce a Template::Output.§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.