#[repr(C)]pub struct ItemPlacement(pub AlignFlags);Expand description
Value of the align-items and justify-items properties
https://drafts.csswg.org/css-align/#propdef-align-items https://drafts.csswg.org/css-align/#propdef-justify-items
Tuple Fields§
§0: AlignFlagsImplementations§
Source§impl ItemPlacement
impl ItemPlacement
Source§impl ItemPlacement
impl ItemPlacement
Sourcepub fn parse_block<'i>(
_: &ParserContext<'_>,
input: &mut Parser<'i, '_>,
) -> Result<Self, ParseError<'i>>
pub fn parse_block<'i>( _: &ParserContext<'_>, input: &mut Parser<'i, '_>, ) -> Result<Self, ParseError<'i>>
Parse a value for align-items
Sourcepub fn parse_inline<'i>(
_: &ParserContext<'_>,
input: &mut Parser<'i, '_>,
) -> Result<Self, ParseError<'i>>
pub fn parse_inline<'i>( _: &ParserContext<'_>, input: &mut Parser<'i, '_>, ) -> Result<Self, ParseError<'i>>
Parse a value for justify-items
fn parse<'i, 't>( input: &mut Parser<'i, 't>, axis: AxisDirection, ) -> Result<Self, ParseError<'i>>
Methods from Deref<Target = AlignFlags>§
pub const AUTO: Self
pub const NORMAL: Self
pub const START: Self
pub const END: Self
pub const FLEX_START: Self
pub const FLEX_END: Self
pub const CENTER: Self
pub const LEFT: Self
pub const RIGHT: Self
pub const BASELINE: Self
pub const LAST_BASELINE: Self
pub const STRETCH: Self
pub const SELF_START: Self
pub const SELF_END: Self
pub const SPACE_BETWEEN: Self
pub const SPACE_AROUND: Self
pub const SPACE_EVENLY: Self
pub const ANCHOR_CENTER: Self
pub const LEGACY: Self
pub const SAFE: Self
pub const UNSAFE: Self
pub const FLAG_BITS: Self
Sourcepub fn bits(&self) -> u8
pub fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub fn intersects(&self, other: Self) -> bool
pub fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub fn contains(&self, other: Self) -> bool
pub fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn iter(&self) -> Iter<AlignFlags>
pub fn iter(&self) -> Iter<AlignFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub fn iter_names(&self) -> IterNames<AlignFlags>
pub fn iter_names(&self) -> IterNames<AlignFlags>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Sourcepub fn with_value(&self, value: AlignFlags) -> Self
pub fn with_value(&self, value: AlignFlags) -> Self
Returns an updated value with the same flags.
Trait Implementations§
Source§impl Clone for ItemPlacement
impl Clone for ItemPlacement
Source§fn clone(&self) -> ItemPlacement
fn clone(&self) -> ItemPlacement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ItemPlacement
impl Debug for ItemPlacement
Source§impl<'de> Deserialize<'de> for ItemPlacement
impl<'de> Deserialize<'de> for ItemPlacement
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>,
Source§impl MallocSizeOf for ItemPlacement
impl MallocSizeOf for ItemPlacement
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Source§impl PartialEq for ItemPlacement
impl PartialEq for ItemPlacement
Source§impl Serialize for ItemPlacement
impl Serialize for ItemPlacement
Source§impl SpecifiedValueInfo for ItemPlacement
impl SpecifiedValueInfo for ItemPlacement
Source§fn collect_completion_keywords(f: KeywordsCollectFn<'_>)
fn collect_completion_keywords(f: KeywordsCollectFn<'_>)
Source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Source§impl ToComputedValue for ItemPlacement
impl ToComputedValue for ItemPlacement
Source§type ComputedValue = ItemPlacement
type ComputedValue = ItemPlacement
Source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Context.Source§impl ToCss for ItemPlacement
impl ToCss for ItemPlacement
Source§fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
self in CSS syntax, writing to dest.Source§fn to_css_string(&self) -> String
fn to_css_string(&self) -> String
self in CSS syntax and return a string. Read moreSource§fn to_css_cssstring(&self) -> String
fn to_css_cssstring(&self) -> String
self in CSS syntax and return a CssString. Read moreSource§impl ToResolvedValue for ItemPlacement
impl ToResolvedValue for ItemPlacement
Source§type ResolvedValue = ItemPlacement
type ResolvedValue = ItemPlacement
Source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Source§impl ToShmem for ItemPlacement
impl ToShmem for ItemPlacement
Source§impl ToTyped for ItemPlacement
impl ToTyped for ItemPlacement
Source§fn to_typed(&self) -> Option<TypedValue>
fn to_typed(&self) -> Option<TypedValue>
Source§impl Deref for ItemPlacement
impl Deref for ItemPlacement
impl Copy for ItemPlacement
impl Eq for ItemPlacement
impl StructuralPartialEq for ItemPlacement
Auto Trait Implementations§
impl Freeze for ItemPlacement
impl RefUnwindSafe for ItemPlacement
impl Send for ItemPlacement
impl Sync for ItemPlacement
impl Unpin for ItemPlacement
impl UnwindSafe for ItemPlacement
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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