#[repr(C)]pub struct CharSetData {
pub num: c_int,
pub leaves: Offset<Offset<CharSetLeaf>>,
pub numbers: Offset<u16>,
/* private fields */
}
Expand description
A set of code points, in the raw serialized format.
§Implementation details
This charset is implemented as a bunch of bitsets. Each bitset (a CharSetLeaf
)
has 256 bits, and so it represents the least significant byte of the codepoint. Associated to each
leaf is a 16-bit offset, representing the next two least-significant bytes of the codepoint.
(In particular, this can represent any subset of the numbers 0
through 0x00FFFFFF
, which is
big enough for the unicode range.)
Fields§
§num: c_int
Length of both of the following arrays
leaves: Offset<Offset<CharSetLeaf>>
Array of offsets to leaves. Each offset is relative to the start of the array, not the start of this struct!
numbers: Offset<u16>
Array having the same length as leaves
, and storing the 16-bit offsets of each leaf.
Trait Implementations§
Source§impl Clone for CharSetData
impl Clone for CharSetData
Source§fn clone(&self) -> CharSetData
fn clone(&self) -> CharSetData
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 moreSource§impl Debug for CharSetData
impl Debug for CharSetData
impl AnyBitPattern for CharSetData
impl Copy for CharSetData
Auto Trait Implementations§
impl Freeze for CharSetData
impl RefUnwindSafe for CharSetData
impl Send for CharSetData
impl Sync for CharSetData
impl Unpin for CharSetData
impl UnwindSafe for CharSetData
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
.