#[repr(C)]pub union ValueUnion {
pub s: PtrOffset<u8>,
pub i: c_int,
pub b: c_int,
pub d: f64,
pub m: PtrOffset<()>,
pub c: PtrOffset<CharSetData>,
pub f: PtrOffset<()>,
pub l: PtrOffset<()>,
pub r: PtrOffset<()>,
}Expand description
A dynamically typed value, as a raw union.
Many of fontconfig’s values are stored as a tagged union. But because
there’s no layout guarantees for tagged unions in rust, we read them
in the C layout, as a combination of c_int tag and an untagged union.
This is the untagged union part.
Fields§
§s: PtrOffset<u8>§i: c_int§b: c_int§d: f64§m: PtrOffset<()>§c: PtrOffset<CharSetData>§f: PtrOffset<()>§l: PtrOffset<()>§r: PtrOffset<()>Trait Implementations§
Source§impl Clone for ValueUnion
impl Clone for ValueUnion
Source§fn clone(&self) -> ValueUnion
fn clone(&self) -> ValueUnion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl AnyBitPattern for ValueUnion
impl Copy for ValueUnion
Auto Trait Implementations§
impl Freeze for ValueUnion
impl RefUnwindSafe for ValueUnion
impl Send for ValueUnion
impl Sync for ValueUnion
impl Unpin for ValueUnion
impl UnwindSafe for ValueUnion
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> 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
If this function returns true, then it must be valid to reinterpret
bits
as &Self.