pub struct ServerDigest {
pub algorithm: String,
pub rows: u64,
pub digest: String,
pub key_min: Option<i64>,
pub key_max: Option<i64>,
}Expand description
A digest a backend computed itself, without shipping rows. Two server
digests are comparable only when their algorithm ids match — each backend
hashes its own text rendering of a row, so a Postgres digest says nothing
about a SQLite table. When the algorithms differ the verifier streams both
sides and uses ContentDigest instead.
Fields§
§algorithm: String§rows: u64§digest: StringOpaque digest text (a decimal sum, a hex string — whatever the algorithm defines).
key_min: Option<i64>§key_max: Option<i64>Implementations§
Source§impl ServerDigest
impl ServerDigest
Sourcepub fn comparable(&self, other: &ServerDigest) -> bool
pub fn comparable(&self, other: &ServerDigest) -> bool
Whether two server digests agree. Different algorithms never agree — the caller must not treat that as a difference but as “not comparable”.
pub fn same(&self, other: &ServerDigest) -> bool
pub fn bounds_union(&self, other: &ServerDigest) -> Option<(i64, i64)>
Trait Implementations§
Source§impl Clone for ServerDigest
impl Clone for ServerDigest
Source§impl Debug for ServerDigest
impl Debug for ServerDigest
Source§impl<'de> Deserialize<'de> for ServerDigest
impl<'de> Deserialize<'de> for ServerDigest
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 ServerDigest
Source§impl PartialEq for ServerDigest
impl PartialEq for ServerDigest
Source§impl Serialize for ServerDigest
impl Serialize for ServerDigest
impl StructuralPartialEq for ServerDigest
Auto Trait Implementations§
impl Freeze for ServerDigest
impl RefUnwindSafe for ServerDigest
impl Send for ServerDigest
impl Sync for ServerDigest
impl Unpin for ServerDigest
impl UnsafeUnpin for ServerDigest
impl UnwindSafe for ServerDigest
Blanket Implementations§
impl<T> Allocation for T
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,
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.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> 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 moreSource§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