[−][src]Struct holochain_core_types::agent::AgentId
AgentId represents an agent in the Holochain framework. This data struct is meant be stored in the CAS and source-chain. Its key is the public signing key, and is also used as its address.
Fields
nick: String
a nickname for referencing this agent
pub_sign_key: Base32
the encoded public signing key of this agent (the magnifier)
Methods
impl AgentId
[src]
pub const FAKE_RAW_KEY: [u8; 32]
[src]
A well-known key useful for testing and used by generate_fake()
pub fn generate_fake(nick: &str) -> Self
[src]
generate an agent id with fake key
pub fn new_with_raw_key(nick: &str, key: &str) -> HcResult<Self>
[src]
initialize an Agent struct with nick
and key
that will be encoded with HCID.
pub fn new(nick: &str, key_b32: Base32) -> Self
[src]
initialize an Agent struct with nick
and a HCID encoded key.
pub fn decoded_key(&self) -> HcResult<String>
[src]
Get the key decoded with HCID
Trait Implementations
impl AddressableContent for AgentId
[src]
fn address(&self) -> Address
[src]
for an Agent, the address is their public base32 encoded public signing key string
fn content(&self) -> Content
[src]
get the entry content
fn try_from_content(content: &Content) -> JsonResult<Self>
[src]
impl Clone for AgentId
[src]
impl Debug for AgentId
[src]
impl<'de> Deserialize<'de> for AgentId
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for AgentId
[src]
impl<'a> From<&'a AgentId> for JsonString
[src]
fn from(v: &AgentId) -> JsonString
[src]
impl From<AgentId> for JsonString
[src]
fn from(v: AgentId) -> JsonString
[src]
impl PartialEq<AgentId> for AgentId
[src]
impl Serialize for AgentId
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for AgentId
[src]
impl StructuralPartialEq for AgentId
[src]
impl<'a> TryFrom<&'a JsonString> for AgentId
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: &JsonString) -> Result<Self, Self::Error>
[src]
impl TryFrom<JsonString> for AgentId
[src]
Auto Trait Implementations
impl RefUnwindSafe for AgentId
impl Send for AgentId
impl Sync for AgentId
impl Unpin for AgentId
impl UnwindSafe for AgentId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,