Struct AdaptiveKey
pub struct AdaptiveKey {
pub default: KeyOutput,
pub rules: [AltRepeatRule; 8],
}Expand description
Per-site adaptive key.
Holds a default output and a table of last-output → emit rules.
Fields§
§default: KeyOutputOutput when no rule matches (or history is empty).
rules: [AltRepeatRule; 8]Sparse last-output → emit mappings for this key site.
Implementations§
§impl AdaptiveKey
impl AdaptiveKey
pub const EMPTY: AdaptiveKey
pub const EMPTY: AdaptiveKey
Empty adaptive key (no-op default, no rules).
pub const fn new(default: KeyOutput, rules: [AltRepeatRule; 8]) -> AdaptiveKey
pub const fn new(default: KeyOutput, rules: [AltRepeatRule; 8]) -> AdaptiveKey
Constructs an adaptive key from a default and a padded rule array.
Trait Implementations§
§impl Clone for AdaptiveKey
impl Clone for AdaptiveKey
§fn clone(&self) -> AdaptiveKey
fn clone(&self) -> AdaptiveKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AdaptiveKey
§impl Debug for AdaptiveKey
impl Debug for AdaptiveKey
§impl<'de> Deserialize<'de> for AdaptiveKey
impl<'de> Deserialize<'de> for AdaptiveKey
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdaptiveKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdaptiveKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for AdaptiveKey
impl PartialEq for AdaptiveKey
impl StructuralPartialEq for AdaptiveKey
Auto Trait Implementations§
impl Freeze for AdaptiveKey
impl RefUnwindSafe for AdaptiveKey
impl Send for AdaptiveKey
impl Sync for AdaptiveKey
impl Unpin for AdaptiveKey
impl UnsafeUnpin for AdaptiveKey
impl UnwindSafe for AdaptiveKey
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