pub struct Config {
pub log_all_events: bool,
pub log_bounces: bool,
pub stats_json: bool,
pub verbose: bool,
pub log_filter: String,
pub otel_endpoint: Option<String>,
pub ring_buffer_size: usize,
/* private fields */
}Fields§
§log_all_events: bool§log_bounces: bool§stats_json: bool§verbose: bool§log_filter: String§otel_endpoint: Option<String>§ring_buffer_size: usizeImplementations§
Source§impl Config
impl Config
Sourcepub fn new(
debounce_time: Duration,
near_miss_threshold: Duration,
log_interval: Duration,
log_all_events: bool,
log_bounces: bool,
stats_json: bool,
verbose: bool,
log_filter: String,
otel_endpoint: Option<String>,
ring_buffer_size: usize,
debounce_keys: Vec<u16>,
ignored_keys: Vec<u16>,
) -> Self
pub fn new( debounce_time: Duration, near_miss_threshold: Duration, log_interval: Duration, log_all_events: bool, log_bounces: bool, stats_json: bool, verbose: bool, log_filter: String, otel_endpoint: Option<String>, ring_buffer_size: usize, debounce_keys: Vec<u16>, ignored_keys: Vec<u16>, ) -> Self
Creates a new Config instance (primarily for testing/benchmarking).
pub fn debounce_time(&self) -> Duration
pub fn near_miss_threshold(&self) -> Duration
pub fn log_interval(&self) -> Duration
pub fn ignored_keys(&self) -> &[u16]
pub fn debounce_keys(&self) -> &[u16]
pub fn should_debounce(&self, key_code: u16) -> bool
pub fn is_key_ignored(&self, key_code: u16) -> bool
pub fn debounce_us(&self) -> u64
pub fn near_miss_threshold_us(&self) -> u64
pub fn log_interval_us(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request