pub struct KeyringManager {
pub last_result: Option<KeyringResult>,
pub in_flight: u32,
pub pending_event: bool,
}Expand description
Cross-platform keyring state. One per App — the OS keyring is a
per-process (per-app-identity) store, not per-window.
Fields§
§last_result: Option<KeyringResult>Outcome of the most recent keyring op, or None until the first
completes. Read by callbacks via CallbackInfo::get_keyring_result().
in_flight: u32Ops dispatched to the native backend whose outcome has not been folded back yet (MWA-A1b arming signal for the capability pump).
pending_event: booltrue when an op outcome was folded since the last event pass (set
on EVERY completion — a repeated identical outcome still answers a
fresh op). Read by the EventProvider impl
(EventType::KeyringResult), cleared by
clear_pending_event.
Implementations§
Source§impl KeyringManager
impl KeyringManager
pub fn new() -> Self
Sourcepub const fn last_result(&self) -> Option<&KeyringResult>
pub const fn last_result(&self) -> Option<&KeyringResult>
Most recent keyring outcome, or None until the first op resolves.
Sourcepub fn set_last_result(&mut self, result: KeyringResult) -> bool
pub fn set_last_result(&mut self, result: KeyringResult) -> bool
Apply the outcome the backend delivered. Returns true if it
differs from the previous one (so the window can be marked dirty to
re-render the revealed / stored state).
Sourcepub const fn mark_requests_dispatched(&mut self, n: u32)
pub const fn mark_requests_dispatched(&mut self, n: u32)
The pump dispatched n ops to the native backend; keep the timer
armed until their outcomes fold back (MWA-A1b).
Sourcepub const fn clear_pending_event(&mut self)
pub const fn clear_pending_event(&mut self)
Clear the pending-event flag. The dll calls this after the event
pass has collected the KeyringResult event.
Sourcepub const fn has_pending_async(&self) -> bool
pub const fn has_pending_async(&self) -> bool
true while a dispatched op’s outcome is still outstanding
(MWA-A1b arming signal).
Trait Implementations§
Source§impl Clone for KeyringManager
impl Clone for KeyringManager
Source§fn clone(&self) -> KeyringManager
fn clone(&self) -> KeyringManager
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 KeyringManager
impl Debug for KeyringManager
Source§impl Default for KeyringManager
impl Default for KeyringManager
Source§fn default() -> KeyringManager
fn default() -> KeyringManager
impl Eq for KeyringManager
Source§impl EventProvider for KeyringManager
impl EventProvider for KeyringManager
Source§fn get_pending_events(&self, timestamp: Instant) -> Vec<SyntheticEvent>
fn get_pending_events(&self, timestamp: Instant) -> Vec<SyntheticEvent>
Yield a window-level KeyringResult event when an op outcome was
folded since the last pass (target = root; read the outcome via
CallbackInfo::get_keyring_result inside the callback).
Source§impl PartialEq for KeyringManager
impl PartialEq for KeyringManager
impl StructuralPartialEq for KeyringManager
Auto Trait Implementations§
impl Freeze for KeyringManager
impl RefUnwindSafe for KeyringManager
impl Send for KeyringManager
impl Sync for KeyringManager
impl Unpin for KeyringManager
impl UnsafeUnpin for KeyringManager
impl UnwindSafe for KeyringManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more