pub struct VarcFlags { /* private fields */ }Expand description
Flags used in the VarcComponent byte stream
https://github.com/harfbuzz/boring-expansion-spec/blob/main/VARC.md#variable-component-flags
Implementations§
Source§impl VarcFlags
impl VarcFlags
pub const RESET_UNSPECIFIED_AXES: VarcFlags
pub const HAVE_AXES: VarcFlags
pub const AXIS_VALUES_HAVE_VARIATION: VarcFlags
pub const TRANSFORM_HAS_VARIATION: VarcFlags
pub const HAVE_TRANSLATE_X: VarcFlags
pub const HAVE_TRANSLATE_Y: VarcFlags
pub const HAVE_ROTATION: VarcFlags
pub const HAVE_CONDITION: VarcFlags
pub const HAVE_SCALE_X: VarcFlags
pub const HAVE_SCALE_Y: VarcFlags
pub const HAVE_TCENTER_X: VarcFlags
pub const HAVE_TCENTER_Y: VarcFlags
pub const GID_IS_24BIT: VarcFlags
pub const HAVE_SKEW_X: VarcFlags
pub const HAVE_SKEW_Y: VarcFlags
pub const RESERVED_MASK: VarcFlags
Source§impl VarcFlags
impl VarcFlags
Sourcepub const fn from_bits(bits: u32) -> Option<VarcFlags>
pub const fn from_bits(bits: u32) -> Option<VarcFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> VarcFlags
pub const fn from_bits_truncate(bits: u32) -> VarcFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const fn intersects(&self, other: VarcFlags) -> bool
pub const fn intersects(&self, other: VarcFlags) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: VarcFlags) -> bool
pub const fn contains(&self, other: VarcFlags) -> bool
Returns true if all of the flags in other are contained within self.
Sourcepub const fn intersection(self, other: VarcFlags) -> VarcFlags
pub const fn intersection(self, other: VarcFlags) -> VarcFlags
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
Sourcepub const fn union(self, other: VarcFlags) -> VarcFlags
pub const fn union(self, other: VarcFlags) -> VarcFlags
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both.
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
Sourcepub const fn difference(self, other: VarcFlags) -> VarcFlags
pub const fn difference(self, other: VarcFlags) -> VarcFlags
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
Trait Implementations§
Source§impl BitAndAssign for VarcFlags
impl BitAndAssign for VarcFlags
Source§fn bitand_assign(&mut self, other: VarcFlags)
fn bitand_assign(&mut self, other: VarcFlags)
Disables all flags disabled in the set.
Source§impl BitOrAssign for VarcFlags
impl BitOrAssign for VarcFlags
Source§fn bitor_assign(&mut self, other: VarcFlags)
fn bitor_assign(&mut self, other: VarcFlags)
Adds the set of flags.
Source§impl BitXorAssign for VarcFlags
impl BitXorAssign for VarcFlags
Source§fn bitxor_assign(&mut self, other: VarcFlags)
fn bitxor_assign(&mut self, other: VarcFlags)
Toggles the set of flags.
Source§impl<'de> Deserialize<'de> for VarcFlags
impl<'de> Deserialize<'de> for VarcFlags
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VarcFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VarcFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl FontWrite for VarcFlags
impl FontWrite for VarcFlags
Source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
Source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
Source§impl Ord for VarcFlags
impl Ord for VarcFlags
Source§impl PartialOrd for VarcFlags
impl PartialOrd for VarcFlags
Source§impl Scalar for VarcFlags
impl Scalar for VarcFlags
Source§impl Serialize for VarcFlags
impl Serialize for VarcFlags
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 SubAssign for VarcFlags
impl SubAssign for VarcFlags
Source§fn sub_assign(&mut self, other: VarcFlags)
fn sub_assign(&mut self, other: VarcFlags)
Disables all flags enabled in the set.
impl AnyBitPattern for VarcFlags
impl Copy for VarcFlags
impl Eq for VarcFlags
impl StructuralPartialEq for VarcFlags
Auto Trait Implementations§
impl Freeze for VarcFlags
impl RefUnwindSafe for VarcFlags
impl Send for VarcFlags
impl Sync for VarcFlags
impl Unpin for VarcFlags
impl UnsafeUnpin for VarcFlags
impl UnwindSafe for VarcFlags
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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<T> FixedSize for Twhere
T: Scalar,
impl<T> FixedSize for Twhere
T: Scalar,
Source§const RAW_BYTE_LEN: usize
const RAW_BYTE_LEN: usize
Source§impl<T> FromObjRef<BigEndian<T>> for T
impl<T> FromObjRef<BigEndian<T>> for T
Source§fn from_obj_ref(from: &BigEndian<T>, _: FontData<'_>) -> T
fn from_obj_ref(from: &BigEndian<T>, _: FontData<'_>) -> T
from to an instance of Self, using the provided data to resolve offsets.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.