Struct layout_2020::taffy::stylo_taffy::convert::stylo::AlignFlags
source · #[repr(C)]pub(crate) struct AlignFlags(u8);
Expand description
Constants shared by multiple CSS Box Alignment properties
Tuple Fields§
§0: u8
Implementations§
source§impl AlignFlags
impl AlignFlags
sourcepub const AUTO: AlignFlags = _
pub const AUTO: AlignFlags = _
{align,justify}-{content,items,self}: ‘auto’
sourcepub const NORMAL: AlignFlags = _
pub const NORMAL: AlignFlags = _
‘normal’
sourcepub const START: AlignFlags = _
pub const START: AlignFlags = _
‘start’
sourcepub const END: AlignFlags = _
pub const END: AlignFlags = _
‘end’
sourcepub const FLEX_START: AlignFlags = _
pub const FLEX_START: AlignFlags = _
‘flex-start’
sourcepub const FLEX_END: AlignFlags = _
pub const FLEX_END: AlignFlags = _
‘flex-end’
sourcepub const CENTER: AlignFlags = _
pub const CENTER: AlignFlags = _
‘center’
sourcepub const LEFT: AlignFlags = _
pub const LEFT: AlignFlags = _
‘left’
sourcepub const RIGHT: AlignFlags = _
pub const RIGHT: AlignFlags = _
‘right’
sourcepub const BASELINE: AlignFlags = _
pub const BASELINE: AlignFlags = _
‘baseline’
sourcepub const LAST_BASELINE: AlignFlags = _
pub const LAST_BASELINE: AlignFlags = _
‘last-baseline’
sourcepub const STRETCH: AlignFlags = _
pub const STRETCH: AlignFlags = _
‘stretch’
sourcepub const SELF_START: AlignFlags = _
pub const SELF_START: AlignFlags = _
‘self-start’
sourcepub const SELF_END: AlignFlags = _
pub const SELF_END: AlignFlags = _
‘self-end’
sourcepub const SPACE_BETWEEN: AlignFlags = _
pub const SPACE_BETWEEN: AlignFlags = _
‘space-between’
sourcepub const SPACE_AROUND: AlignFlags = _
pub const SPACE_AROUND: AlignFlags = _
‘space-around’
sourcepub const SPACE_EVENLY: AlignFlags = _
pub const SPACE_EVENLY: AlignFlags = _
‘space-evenly’
sourcepub const ANCHOR_CENTER: AlignFlags = _
pub const ANCHOR_CENTER: AlignFlags = _
anchor-center
sourcepub const LEGACY: AlignFlags = _
pub const LEGACY: AlignFlags = _
‘legacy’ (mutually exclusive w. SAFE & UNSAFE)
sourcepub const SAFE: AlignFlags = _
pub const SAFE: AlignFlags = _
‘safe’
sourcepub const UNSAFE: AlignFlags = _
pub const UNSAFE: AlignFlags = _
‘unsafe’ (mutually exclusive w. SAFE)
sourcepub const FLAG_BITS: AlignFlags = _
pub const FLAG_BITS: AlignFlags = _
Mask for the additional flags above.
source§impl AlignFlags
impl AlignFlags
sourcepub const fn empty() -> AlignFlags
pub const fn empty() -> AlignFlags
Get a flags value with all bits unset.
sourcepub const fn all() -> AlignFlags
pub const fn all() -> AlignFlags
Get a flags value with all known bits set.
sourcepub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
sourcepub const fn from_bits(bits: u8) -> Option<AlignFlags>
pub const fn from_bits(bits: u8) -> Option<AlignFlags>
Convert from a bits value.
This method will return None
if any unknown bits are set.
sourcepub const fn from_bits_truncate(bits: u8) -> AlignFlags
pub const fn from_bits_truncate(bits: u8) -> AlignFlags
Convert from a bits value, unsetting any unknown bits.
sourcepub const fn from_bits_retain(bits: u8) -> AlignFlags
pub const fn from_bits_retain(bits: u8) -> AlignFlags
Convert from a bits value exactly.
sourcepub fn from_name(name: &str) -> Option<AlignFlags>
pub fn from_name(name: &str) -> Option<AlignFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
sourcepub const fn intersects(&self, other: AlignFlags) -> bool
pub const fn intersects(&self, other: AlignFlags) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
sourcepub const fn contains(&self, other: AlignFlags) -> bool
pub const fn contains(&self, other: AlignFlags) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
sourcepub fn insert(&mut self, other: AlignFlags)
pub fn insert(&mut self, other: AlignFlags)
The bitwise or (|
) of the bits in two flags values.
sourcepub fn remove(&mut self, other: AlignFlags)
pub fn remove(&mut self, other: AlignFlags)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
sourcepub fn toggle(&mut self, other: AlignFlags)
pub fn toggle(&mut self, other: AlignFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub fn set(&mut self, other: AlignFlags, value: bool)
pub fn set(&mut self, other: AlignFlags, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
sourcepub const fn intersection(self, other: AlignFlags) -> AlignFlags
pub const fn intersection(self, other: AlignFlags) -> AlignFlags
The bitwise and (&
) of the bits in two flags values.
sourcepub const fn union(self, other: AlignFlags) -> AlignFlags
pub const fn union(self, other: AlignFlags) -> AlignFlags
The bitwise or (|
) of the bits in two flags values.
sourcepub const fn difference(self, other: AlignFlags) -> AlignFlags
pub const fn difference(self, other: AlignFlags) -> AlignFlags
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
sourcepub const fn symmetric_difference(self, other: AlignFlags) -> AlignFlags
pub const fn symmetric_difference(self, other: AlignFlags) -> AlignFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub const fn complement(self) -> AlignFlags
pub const fn complement(self) -> AlignFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§impl AlignFlags
impl AlignFlags
sourcepub const fn iter(&self) -> Iter<AlignFlags>
pub const 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 const fn iter_names(&self) -> IterNames<AlignFlags>
pub const 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.
source§impl AlignFlags
impl AlignFlags
sourcepub fn value(&self) -> AlignFlags
pub fn value(&self) -> AlignFlags
Returns the enumeration value stored in the lower 5 bits.
sourcepub fn flags(&self) -> AlignFlags
pub fn flags(&self) -> AlignFlags
Returns the flags stored in the upper 3 bits.
Trait Implementations§
source§impl Binary for AlignFlags
impl Binary for AlignFlags
source§impl BitAnd for AlignFlags
impl BitAnd for AlignFlags
source§fn bitand(self, other: AlignFlags) -> AlignFlags
fn bitand(self, other: AlignFlags) -> AlignFlags
The bitwise and (&
) of the bits in two flags values.
source§type Output = AlignFlags
type Output = AlignFlags
&
operator.source§impl BitAndAssign for AlignFlags
impl BitAndAssign for AlignFlags
source§fn bitand_assign(&mut self, other: AlignFlags)
fn bitand_assign(&mut self, other: AlignFlags)
The bitwise and (&
) of the bits in two flags values.
source§impl BitOr for AlignFlags
impl BitOr for AlignFlags
source§fn bitor(self, other: AlignFlags) -> AlignFlags
fn bitor(self, other: AlignFlags) -> AlignFlags
The bitwise or (|
) of the bits in two flags values.
source§type Output = AlignFlags
type Output = AlignFlags
|
operator.source§impl BitOrAssign for AlignFlags
impl BitOrAssign for AlignFlags
source§fn bitor_assign(&mut self, other: AlignFlags)
fn bitor_assign(&mut self, other: AlignFlags)
The bitwise or (|
) of the bits in two flags values.
source§impl BitXor for AlignFlags
impl BitXor for AlignFlags
source§fn bitxor(self, other: AlignFlags) -> AlignFlags
fn bitxor(self, other: AlignFlags) -> AlignFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
source§type Output = AlignFlags
type Output = AlignFlags
^
operator.source§impl BitXorAssign for AlignFlags
impl BitXorAssign for AlignFlags
source§fn bitxor_assign(&mut self, other: AlignFlags)
fn bitxor_assign(&mut self, other: AlignFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
source§impl Clone for AlignFlags
impl Clone for AlignFlags
source§fn clone(&self) -> AlignFlags
fn clone(&self) -> AlignFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AlignFlags
impl Debug for AlignFlags
source§impl<'de> Deserialize<'de> for AlignFlags
impl<'de> Deserialize<'de> for AlignFlags
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AlignFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AlignFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Extend<AlignFlags> for AlignFlags
impl Extend<AlignFlags> for AlignFlags
source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = AlignFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = AlignFlags>,
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl Flags for AlignFlags
impl Flags for AlignFlags
source§const FLAGS: &'static [Flag<AlignFlags>] = _
const FLAGS: &'static [Flag<AlignFlags>] = _
source§fn from_bits_retain(bits: u8) -> AlignFlags
fn from_bits_retain(bits: u8) -> AlignFlags
source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moresource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moresource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.source§impl FromIterator<AlignFlags> for AlignFlags
impl FromIterator<AlignFlags> for AlignFlags
source§fn from_iter<T>(iterator: T) -> AlignFlagswhere
T: IntoIterator<Item = AlignFlags>,
fn from_iter<T>(iterator: T) -> AlignFlagswhere
T: IntoIterator<Item = AlignFlags>,
The bitwise or (|
) of the bits in each flags value.
source§impl IntoIterator for AlignFlags
impl IntoIterator for AlignFlags
source§type Item = AlignFlags
type Item = AlignFlags
source§type IntoIter = Iter<AlignFlags>
type IntoIter = Iter<AlignFlags>
source§fn into_iter(self) -> <AlignFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <AlignFlags as IntoIterator>::IntoIter
source§impl LowerHex for AlignFlags
impl LowerHex for AlignFlags
source§impl MallocSizeOf for AlignFlags
impl MallocSizeOf for AlignFlags
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl Not for AlignFlags
impl Not for AlignFlags
source§fn not(self) -> AlignFlags
fn not(self) -> AlignFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§type Output = AlignFlags
type Output = AlignFlags
!
operator.source§impl Octal for AlignFlags
impl Octal for AlignFlags
source§impl PartialEq for AlignFlags
impl PartialEq for AlignFlags
source§impl Serialize for AlignFlags
impl Serialize for AlignFlags
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Sub for AlignFlags
impl Sub for AlignFlags
source§fn sub(self, other: AlignFlags) -> AlignFlags
fn sub(self, other: AlignFlags) -> AlignFlags
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
source§type Output = AlignFlags
type Output = AlignFlags
-
operator.source§impl SubAssign for AlignFlags
impl SubAssign for AlignFlags
source§fn sub_assign(&mut self, other: AlignFlags)
fn sub_assign(&mut self, other: AlignFlags)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
source§impl ToComputedValue for AlignFlags
impl ToComputedValue for AlignFlags
source§type ComputedValue = AlignFlags
type ComputedValue = AlignFlags
source§fn from_computed_value(
from: &<AlignFlags as ToComputedValue>::ComputedValue,
) -> AlignFlags
fn from_computed_value( from: &<AlignFlags as ToComputedValue>::ComputedValue, ) -> AlignFlags
source§fn to_computed_value(
&self,
context: &Context<'_>,
) -> <AlignFlags as ToComputedValue>::ComputedValue
fn to_computed_value( &self, context: &Context<'_>, ) -> <AlignFlags as ToComputedValue>::ComputedValue
Context
.source§impl ToCss for AlignFlags
impl ToCss for AlignFlags
source§impl ToResolvedValue for AlignFlags
impl ToResolvedValue for AlignFlags
source§type ResolvedValue = AlignFlags
type ResolvedValue = AlignFlags
source§fn from_resolved_value(
from: <AlignFlags as ToResolvedValue>::ResolvedValue,
) -> AlignFlags
fn from_resolved_value( from: <AlignFlags as ToResolvedValue>::ResolvedValue, ) -> AlignFlags
source§fn to_resolved_value(
self,
context: &Context<'_>,
) -> <AlignFlags as ToResolvedValue>::ResolvedValue
fn to_resolved_value( self, context: &Context<'_>, ) -> <AlignFlags as ToResolvedValue>::ResolvedValue
source§impl ToShmem for AlignFlags
impl ToShmem for AlignFlags
source§fn to_shmem(
&self,
builder: &mut SharedMemoryBuilder,
) -> Result<ManuallyDrop<AlignFlags>, String>
fn to_shmem( &self, builder: &mut SharedMemoryBuilder, ) -> Result<ManuallyDrop<AlignFlags>, String>
source§impl UpperHex for AlignFlags
impl UpperHex for AlignFlags
impl Copy for AlignFlags
impl Eq for AlignFlags
impl StructuralPartialEq for AlignFlags
Auto Trait Implementations§
impl Freeze for AlignFlags
impl RefUnwindSafe for AlignFlags
impl Send for AlignFlags
impl Sync for AlignFlags
impl Unpin for AlignFlags
impl UnwindSafe for AlignFlags
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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