Struct kitsune_p2p_types::agent_info::AgentInfoSigned
source · pub struct AgentInfoSigned(pub Arc<AgentInfoInner>);
Expand description
Value in the peer database that tracks an Agent’s representation as signed by that agent.
Tuple Fields§
§0: Arc<AgentInfoInner>
Implementations§
source§impl AgentInfoSigned
impl AgentInfoSigned
sourcepub async fn sign<'a, R, F>(
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
dht_storage_arc_half_length: u32,
url_list: UrlList,
signed_at_ms: u64,
expires_at_ms: u64,
f: F
) -> KitsuneResult<Self>
pub async fn sign<'a, R, F>( space: Arc<KitsuneSpace>, agent: Arc<KitsuneAgent>, dht_storage_arc_half_length: u32, url_list: UrlList, signed_at_ms: u64, expires_at_ms: u64, f: F ) -> KitsuneResult<Self>
Construct and sign a new AgentInfoSigned instance.
sourcepub fn decode(b: &[u8]) -> KitsuneResult<Self>
pub fn decode(b: &[u8]) -> KitsuneResult<Self>
decode from msgpack
sourcepub fn encode(&self) -> KitsuneResult<Box<[u8]>>
pub fn encode(&self) -> KitsuneResult<Box<[u8]>>
encode as msgpack
sourcepub fn to_agent_arc(&self) -> AgentArc
pub fn to_agent_arc(&self) -> AgentArc
get just the agent and its storage arc
sourcepub fn agent(&self) -> Arc<KitsuneAgent>
pub fn agent(&self) -> Arc<KitsuneAgent>
Accessor
Methods from Deref<Target = AgentInfoInner>§
Trait Implementations§
source§impl Clone for AgentInfoSigned
impl Clone for AgentInfoSigned
source§fn clone(&self) -> AgentInfoSigned
fn clone(&self) -> AgentInfoSigned
Returns a copy 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 AgentInfoSigned
impl Debug for AgentInfoSigned
source§impl Deref for AgentInfoSigned
impl Deref for AgentInfoSigned
source§impl<'de> Deserialize<'de> for AgentInfoSigned
impl<'de> Deserialize<'de> for AgentInfoSigned
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
source§impl Hash for AgentInfoSigned
impl Hash for AgentInfoSigned
source§impl PartialEq for AgentInfoSigned
impl PartialEq for AgentInfoSigned
source§fn eq(&self, other: &AgentInfoSigned) -> bool
fn eq(&self, other: &AgentInfoSigned) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AgentInfoSigned
impl Serialize for AgentInfoSigned
impl Eq for AgentInfoSigned
impl StructuralEq for AgentInfoSigned
impl StructuralPartialEq for AgentInfoSigned
Auto Trait Implementations§
impl RefUnwindSafe for AgentInfoSigned
impl Send for AgentInfoSigned
impl Sync for AgentInfoSigned
impl Unpin for AgentInfoSigned
impl UnwindSafe for AgentInfoSigned
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<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.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.§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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.