#[repr(C, packed(1))]pub struct ExceptionULE {
pub bits: <ExceptionBits as AsULE>::ULE,
pub slot_presence: <SlotPresence as AsULE>::ULE,
pub data: str,
}Fields§
§bits: <ExceptionBits as AsULE>::ULE§slot_presence: <SlotPresence as AsULE>::ULE§data: strImplementations§
Source§impl ExceptionULE
impl ExceptionULE
fn empty_exception() -> &'static Self
pub(crate) fn has_slot(&self, slot: ExceptionSlot) -> bool
Sourcepub(crate) fn get_char_slot(&self, slot: ExceptionSlot) -> Option<char>
pub(crate) fn get_char_slot(&self, slot: ExceptionSlot) -> Option<char>
Obtain a char slot, if occupied. If slot represents a string slot,
will return None
Sourcefn get_simple_case_delta(&self) -> Option<u32>
fn get_simple_case_delta(&self) -> Option<u32>
Get the simple_case delta (i.e. the delta slot), given the character
this data belongs to.
Normalizes the delta from char-format to u32 format
Does not handle the sign of the delta; see self.bits.negative_delta
Sourcepub(crate) fn get_simple_case_slot_for(&self, ch: char) -> Option<char>
pub(crate) fn get_simple_case_slot_for(&self, ch: char) -> Option<char>
Get the simple_case value (i.e. the delta slot), given the character
this data belongs to.
The data is stored as a delta so the character must be provided.
The data cannot be stored directly as a character because the trie is more compact with adjacent characters sharing deltas.
Sourcefn get_stringy_data(&self) -> Option<&str>
fn get_stringy_data(&self) -> Option<&str>
Returns all the data in the closure/full slots, including length metadata
Sourcefn get_stringy_slot(&self, slot: ExceptionSlot) -> Option<&str>
fn get_stringy_slot(&self, slot: ExceptionSlot) -> Option<&str>
Returns a single stringy slot, either ExceptionSlot::Closure or ExceptionSlot::FullMappings.
Sourcepub(crate) fn get_closure_slot(&self) -> Option<&str>
pub(crate) fn get_closure_slot(&self) -> Option<&str>
Get the data behind the closure slot
Sourcefn get_fullmappings_slot_data(&self) -> Option<&str>
fn get_fullmappings_slot_data(&self) -> Option<&str>
Get all the slot data for the FullMappings slot
This needs to be further segmented into four based on length metadata
Sourcepub(crate) fn get_fullmappings_slot_for_kind(
&self,
kind: MappingKind,
) -> Option<&str>
pub(crate) fn get_fullmappings_slot_for_kind( &self, kind: MappingKind, ) -> Option<&str>
Get a specific FullMappings slot value
fn get_all_fullmapping_slots(&self) -> Option<[Cow<'_, str>; 4]>
pub(crate) fn slot_char_for_kind(&self, kind: MappingKind) -> Option<char>
pub(crate) fn add_full_and_closure_mappings<S: ClosureSink>(&self, set: &mut S)
Sourcepub fn decode(&self) -> DecodedException<'_>
pub fn decode(&self) -> DecodedException<'_>
Extract all the data out into a structured form
Useful for serialization and debugging
Trait Implementations§
Source§impl Debug for ExceptionULE
impl Debug for ExceptionULE
Source§impl<'a> EncodeAsVarULE<ExceptionULE> for &Exception<'a>
impl<'a> EncodeAsVarULE<ExceptionULE> for &Exception<'a>
Source§fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
cb with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T. Read moreSource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
VarULE typeSource§fn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
VarULE type to the dst buffer. dst should
be the size of Self::encode_var_ule_len()Source§impl<'a> EncodeAsVarULE<ExceptionULE> for Exception<'a>
impl<'a> EncodeAsVarULE<ExceptionULE> for Exception<'a>
Source§fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
cb with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T. Read moreSource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
VarULE typeSource§fn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
VarULE type to the dst buffer. dst should
be the size of Self::encode_var_ule_len()Source§impl<'a> From<&'a ExceptionULE> for Exception<'a>
impl<'a> From<&'a ExceptionULE> for Exception<'a>
Source§fn from(other: &'a ExceptionULE) -> Self
fn from(other: &'a ExceptionULE) -> Self
Source§impl PartialEq for ExceptionULE
impl PartialEq for ExceptionULE
Source§impl ToOwned for ExceptionULE
impl ToOwned for ExceptionULE
Source§type Owned = Box<ExceptionULE>
type Owned = Box<ExceptionULE>
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Source§impl VarULE for ExceptionULE
impl VarULE for ExceptionULE
Source§fn validate_bytes(bytes_one: &[u8]) -> Result<(), UleError>
fn validate_bytes(bytes_one: &[u8]) -> Result<(), UleError>
&[u8]. Read moreSource§unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
&[u8], and return it as &Self with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_bytes() with
success. Read moreSource§impl<'a> ZeroFrom<'a, ExceptionULE> for Exception<'a>
impl<'a> ZeroFrom<'a, ExceptionULE> for Exception<'a>
Source§fn zero_from(other: &'a ExceptionULE) -> Self
fn zero_from(other: &'a ExceptionULE) -> Self
C into a struct that may retain references into C.Source§impl<'a> ZeroMapKV<'a> for ExceptionULE
impl<'a> ZeroMapKV<'a> for ExceptionULE
Source§type Container = VarZeroVec<'a, ExceptionULE>
type Container = VarZeroVec<'a, ExceptionULE>
ZeroVec or VarZeroVec.type Slice = VarZeroSlice<ExceptionULE>
Source§type GetType = ExceptionULE
type GetType = ExceptionULE
Container::get() Read moreimpl Eq for ExceptionULE
Auto Trait Implementations§
impl Freeze for ExceptionULE
impl RefUnwindSafe for ExceptionULE
impl Send for ExceptionULE
impl !Sized for ExceptionULE
impl Sync for ExceptionULE
impl Unpin for ExceptionULE
impl UnsafeUnpin for ExceptionULE
impl UnwindSafe for ExceptionULE
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> EncodeAsVarULE<T> for T
impl<T> EncodeAsVarULE<T> for T
Source§fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
cb with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T. Read moreSource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
VarULE typeSource§fn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
VarULE type to the dst buffer. dst should
be the size of Self::encode_var_ule_len()