pub struct SignableLink<'a> {
pub src_id: &'a str,
pub dst_id: &'a str,
pub relation: &'a str,
pub observed_by: Option<&'a str>,
pub valid_from: Option<&'a str>,
pub valid_until: Option<&'a str>,
}Expand description
The six fields the link signature commits to.
Decoupled from crate::models::MemoryLink on purpose: that struct
is the public wire shape for get_links (4 columns), while the
signed bundle includes the temporal-validity columns (valid_from,
valid_until, observed_by) added in v0.6.3 schema v15. Keeping
SignableLink separate means H3’s verifier can deserialize directly
from a row without dragging the entire MemoryLink shape — and it
gives the canonical encoder a single, audited shape to commit to.
Fields§
§src_id: &'a str§dst_id: &'a str§relation: &'a str§observed_by: Option<&'a str>Agent that observed / asserted this link. None when the link
was created by an unidentified caller (rare on the signing path
— the keypair’s owner is normally the observer).
valid_from: Option<&'a str>RFC3339 instant the link became true. Always present on writes
produced by db::create_link (set to “now” at insert time).
valid_until: Option<&'a str>RFC3339 instant the link was invalidated, or None if still
valid. Almost always None at insert time; set later by
db::invalidate_link.
Trait Implementations§
Source§impl<'a> Clone for SignableLink<'a>
impl<'a> Clone for SignableLink<'a>
Source§fn clone(&self) -> SignableLink<'a>
fn clone(&self) -> SignableLink<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for SignableLink<'a>
impl<'a> Debug for SignableLink<'a>
impl<'a> Eq for SignableLink<'a>
Source§impl<'a> PartialEq for SignableLink<'a>
impl<'a> PartialEq for SignableLink<'a>
Source§fn eq(&self, other: &SignableLink<'a>) -> bool
fn eq(&self, other: &SignableLink<'a>) -> bool
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for SignableLink<'a>
Auto Trait Implementations§
impl<'a> Freeze for SignableLink<'a>
impl<'a> RefUnwindSafe for SignableLink<'a>
impl<'a> Send for SignableLink<'a>
impl<'a> Sync for SignableLink<'a>
impl<'a> Unpin for SignableLink<'a>
impl<'a> UnsafeUnpin for SignableLink<'a>
impl<'a> UnwindSafe for SignableLink<'a>
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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