pub struct ConsultConfig {
pub ask_expiry_secs: u64,
}Fields§
§ask_expiry_secs: u64Seconds an Ask stays answerable. Signed into the event as
expires_at_ms; consult refuses an Ask past it. 0 is not a
usable window (every Ask would be born expired), so it means the
default.
Implementations§
Source§impl ConsultConfig
impl ConsultConfig
Sourcepub fn ask_expiry(&self) -> Duration
pub fn ask_expiry(&self) -> Duration
The window an Ask written now is answerable for.
Sourcepub fn ask_expires_at_ms(&self, now_ms: u64) -> u64
pub fn ask_expires_at_ms(&self, now_ms: u64) -> u64
expires_at_ms for an Ask written at now_ms (Unix milliseconds).
Saturates rather than wrapping on an absurd configured window.
Trait Implementations§
Source§impl Clone for ConsultConfig
impl Clone for ConsultConfig
Source§impl Debug for ConsultConfig
impl Debug for ConsultConfig
Source§impl Default for ConsultConfig
impl Default for ConsultConfig
Source§impl<'de> Deserialize<'de> for ConsultConfig
impl<'de> Deserialize<'de> for ConsultConfig
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
impl Eq for ConsultConfig
Source§impl PartialEq for ConsultConfig
impl PartialEq for ConsultConfig
Source§impl Serialize for ConsultConfig
impl Serialize for ConsultConfig
impl StructuralPartialEq for ConsultConfig
Auto Trait Implementations§
impl Forget for ConsultConfig
impl Freeze for ConsultConfig
impl Move for ConsultConfig
impl RefUnwindSafe for ConsultConfig
impl Send for ConsultConfig
impl Sync for ConsultConfig
impl Unpin for ConsultConfig
impl UnsafeUnpin for ConsultConfig
impl UnwindSafe for ConsultConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.