#[repr(C)]pub struct NetworkCursor {
pub source_digest: [u8; 32],
pub query_generation: u64,
pub profile: u16,
pub scope: u64,
pub offset: u64,
}Expand description
Resumable network-graph continuation.
Bound to one immutable source, query generation, profile and scope. Offset is progress within that bind; it is not an authorization field.
Fields§
§source_digest: [u8; 32]§query_generation: u64§profile: u16§scope: u64§offset: u64Implementations§
Source§impl NetworkCursor
impl NetworkCursor
Sourcepub const fn bind(
source_digest: [u8; 32],
query_generation: u64,
profile: u16,
scope: u64,
) -> Self
pub const fn bind( source_digest: [u8; 32], query_generation: u64, profile: u16, scope: u64, ) -> Self
Issue a continuation at offset 0 for this exact query/source/profile/scope.
Sourcepub fn advance(
&mut self,
source_digest: &[u8; 32],
query_generation: u64,
profile: u16,
scope: u64,
delta: u64,
) -> Result<u64, QdnfError>
pub fn advance( &mut self, source_digest: &[u8; 32], query_generation: u64, profile: u16, scope: u64, delta: u64, ) -> Result<u64, QdnfError>
Advance delta only when the live query/source/profile/scope match this
cursor. Stale generation is QdnfError::StaleGeneration; forged source,
profile or cross-scope reuse is QdnfError::Unauthorized. Offset does
not wrap.
Trait Implementations§
Source§impl Clone for NetworkCursor
impl Clone for NetworkCursor
impl Copy for NetworkCursor
Source§impl Debug for NetworkCursor
impl Debug for NetworkCursor
impl Eq for NetworkCursor
Source§impl PartialEq for NetworkCursor
impl PartialEq for NetworkCursor
impl StructuralPartialEq for NetworkCursor
Auto Trait Implementations§
impl Freeze for NetworkCursor
impl RefUnwindSafe for NetworkCursor
impl Send for NetworkCursor
impl Sync for NetworkCursor
impl Unpin for NetworkCursor
impl UnsafeUnpin for NetworkCursor
impl UnwindSafe for NetworkCursor
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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