pub struct EntryFlags(pub u8);Expand description
Per-entry flag bits. Bit assignments are stable across IDFv1.
Tuple Fields§
§0: u8Implementations§
Source§impl EntryFlags
impl EntryFlags
pub const BLACKLIST: u8
pub const CURATED_OVERRIDE: u8
pub const USER_ADDED: u8
Sourcepub const ENGINE_TAG_MASK: u8 = 0b1110_0000
pub const ENGINE_TAG_MASK: u8 = 0b1110_0000
Bits 5-7 carry an engine-specific 3-bit enum payload (0-7). For
wubi entries (added v1.4.7 sub-phase A4 step 2): the
inputx_wubi::Layer enum index, so cement-side fills can
recover (word, layer, raw_freq) tuples without re-reading the
facade dict. For non-wubi engines it stays zero. Decoders
querying this should pair it with the IDF’s engine_kind
header byte; the field is otherwise just opaque bits.
pub const ENGINE_TAG_SHIFT: u8 = 5
pub fn is_blacklisted(self) -> bool
pub fn is_curated_override(self) -> bool
pub fn is_user_added(self) -> bool
Sourcepub fn engine_tag(self) -> u8
pub fn engine_tag(self) -> u8
Return the 3-bit engine-specific tag (bits 5-7). For wubi this
is the Layer enum’s as_index().
Sourcepub fn with_engine_tag(self, tag: u8) -> Self
pub fn with_engine_tag(self, tag: u8) -> Self
Set the 3-bit engine-specific tag while preserving the other
bits. tag is clamped to 3 bits (& 0b111); callers passing
out-of-range values lose the upper bits silently — keep the
caller’s enum strictly ≤ 7.
Trait Implementations§
Source§impl Clone for EntryFlags
impl Clone for EntryFlags
Source§fn clone(&self) -> EntryFlags
fn clone(&self) -> EntryFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntryFlags
impl Debug for EntryFlags
Source§impl Default for EntryFlags
impl Default for EntryFlags
Source§fn default() -> EntryFlags
fn default() -> EntryFlags
Source§impl PartialEq for EntryFlags
impl PartialEq for EntryFlags
Source§fn eq(&self, other: &EntryFlags) -> bool
fn eq(&self, other: &EntryFlags) -> bool
self and other values to be equal, and is used by ==.