Struct AlignContent
pub struct AlignContent {
pub keyword: AlignContentKeyword,
pub safety: AlignmentSafety,
}Expand description
Sets the distribution of space between and around content items. For Flexbox it controls alignment in the cross axis. For Grid it controls alignment in the block axis.
Fields§
§keyword: AlignContentKeywordPosition keyword.
safety: AlignmentSafetyOverflow-position modifier (safe / unsafe).
Implementations§
§impl AlignContent
impl AlignContent
pub const NORMAL: AlignContent
pub const NORMAL: AlignContent
The layout mode’s default alignment. See [AlignContentKeyword::Normal].
pub const START: AlignContent
pub const START: AlignContent
Items are packed toward the start of the axis.
pub const END: AlignContent
pub const END: AlignContent
Items are packed toward the end of the axis.
pub const FLEX_START: AlignContent
pub const FLEX_START: AlignContent
Items are packed towards the flex-relative start of the axis.
pub const FLEX_END: AlignContent
pub const FLEX_END: AlignContent
Items are packed towards the flex-relative end of the axis.
pub const CENTER: AlignContent
pub const CENTER: AlignContent
Items are centered around the middle of the axis.
pub const STRETCH: AlignContent
pub const STRETCH: AlignContent
Items are stretched to fill the container.
pub const SPACE_BETWEEN: AlignContent
pub const SPACE_BETWEEN: AlignContent
The first and last items are aligned flush with the edges of the container.
pub const SPACE_EVENLY: AlignContent
pub const SPACE_EVENLY: AlignContent
The gap between the first and last items equals the gap between items.
pub const SPACE_AROUND: AlignContent
pub const SPACE_AROUND: AlignContent
The gap between the first and last items is half the gap between items.
pub const SAFE_START: AlignContent
pub const SAFE_START: AlignContent
Like AlignContent::START, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
pub const SAFE_END: AlignContent
pub const SAFE_END: AlignContent
Like AlignContent::END, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
pub const SAFE_FLEX_START: AlignContent
pub const SAFE_FLEX_START: AlignContent
Like AlignContent::FLEX_START, but falls back to AlignContent::START when
the content overflows the alignment container, to avoid data loss.
pub const SAFE_FLEX_END: AlignContent
pub const SAFE_FLEX_END: AlignContent
Like AlignContent::FLEX_END, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
pub const SAFE_CENTER: AlignContent
pub const SAFE_CENTER: AlignContent
Like AlignContent::CENTER, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
pub const fn is_safe(self) -> bool
pub const fn is_safe(self) -> bool
Returns true iff this carries the safe overflow-position modifier.
pub const fn with_safety(self, safety: AlignmentSafety) -> AlignContent
pub const fn with_safety(self, safety: AlignmentSafety) -> AlignContent
Returns this alignment with the given overflow-position modifier.
pub const fn keyword(self) -> AlignContentKeyword
pub const fn keyword(self) -> AlignContentKeyword
Returns the underlying position keyword, discarding the safety modifier.
Trait Implementations§
§impl Clone for AlignContent
impl Clone for AlignContent
§fn clone(&self) -> AlignContent
fn clone(&self) -> AlignContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AlignContent
§impl Debug for AlignContent
impl Debug for AlignContent
§impl Default for AlignContent
impl Default for AlignContent
§fn default() -> AlignContent
fn default() -> AlignContent
impl Eq for AlignContent
§impl PartialEq for AlignContent
impl PartialEq for AlignContent
impl StructuralPartialEq for AlignContent
Auto Trait Implementations§
impl Freeze for AlignContent
impl RefUnwindSafe for AlignContent
impl Send for AlignContent
impl Sync for AlignContent
impl Unpin for AlignContent
impl UnsafeUnpin for AlignContent
impl UnwindSafe for AlignContent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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§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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Settings for T
§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.§impl<T> TypeData for T
impl<T> TypeData for T
§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
self.