pub struct NegotiationEntry {
pub service_name: String,
pub requested_fingerprint: String,
pub resolved_fingerprint: String,
pub compatibility_check: CompatibilityCheck,
pub negotiated_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
}Expand description
兼容性协商记录
Fields§
§service_name: String服务名称(例如 “user-service”)
requested_fingerprint: String请求的指纹(客户端期望的版本)
resolved_fingerprint: String实际解析的指纹(服务端提供的版本)
compatibility_check: CompatibilityCheck兼容性检查结果
negotiated_at: DateTime<Utc>协商时间
expires_at: DateTime<Utc>过期时间
Implementations§
Source§impl NegotiationEntry
impl NegotiationEntry
Sourcepub fn new(
service_name: String,
requested_fingerprint: String,
resolved_fingerprint: String,
compatibility_check: CompatibilityCheck,
) -> Self
pub fn new( service_name: String, requested_fingerprint: String, resolved_fingerprint: String, compatibility_check: CompatibilityCheck, ) -> Self
创建新的协商记录
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
检查是否已过期
Trait Implementations§
Source§impl Clone for NegotiationEntry
impl Clone for NegotiationEntry
Source§fn clone(&self) -> NegotiationEntry
fn clone(&self) -> NegotiationEntry
Returns a duplicate of the value. Read more
1.0.0 · 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 NegotiationEntry
impl Debug for NegotiationEntry
Source§impl<'de> Deserialize<'de> for NegotiationEntry
impl<'de> Deserialize<'de> for NegotiationEntry
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 NegotiationEntry
impl RefUnwindSafe for NegotiationEntry
impl Send for NegotiationEntry
impl Sync for NegotiationEntry
impl Unpin for NegotiationEntry
impl UnwindSafe for NegotiationEntry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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> 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> ⓘ
Converts
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> ⓘ
Converts
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