pub struct BehaviorProfile {
pub seed: u64,
pub handedness: Handedness,
pub mouse_dpi: u16,
pub typing_wpm_mean: f32,
pub typing_wpm_sigma: f32,
pub scroll_style: ScrollStyle,
pub fitts_b: f32,
}Expand description
Per-session behavioral parameters. Different sessions should sample fresh seeds so mouse/keyboard patterns don’t repeat across visits.
Fields§
§seed: u64§handedness: Handedness§mouse_dpi: u16§typing_wpm_mean: f32§typing_wpm_sigma: f32§scroll_style: ScrollStyle§fitts_b: f32Implementations§
Source§impl BehaviorProfile
impl BehaviorProfile
Sourcepub fn rng_for(&self, salt: u64) -> ChaCha20Rng
pub fn rng_for(&self, salt: u64) -> ChaCha20Rng
Derive a deterministic sub-RNG for a specific call site.
Trait Implementations§
Source§impl Clone for BehaviorProfile
impl Clone for BehaviorProfile
Source§fn clone(&self) -> BehaviorProfile
fn clone(&self) -> BehaviorProfile
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 moreSource§impl Debug for BehaviorProfile
impl Debug for BehaviorProfile
Source§impl Default for BehaviorProfile
impl Default for BehaviorProfile
Source§impl<'de> Deserialize<'de> for BehaviorProfile
impl<'de> Deserialize<'de> for BehaviorProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BehaviorProfile
impl RefUnwindSafe for BehaviorProfile
impl Send for BehaviorProfile
impl Sync for BehaviorProfile
impl Unpin for BehaviorProfile
impl UnsafeUnpin for BehaviorProfile
impl UnwindSafe for BehaviorProfile
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