pub struct HostInfo {
pub public_key: PublicKey,
pub addresses: Vec<String>,
}Expand description
What an owner needs about a host to delegate to it (§4.2).
Fields§
§public_key: PublicKeyThe host key.
addresses: Vec<String>1–4 SimpleX contact addresses of the host.
Implementations§
Source§impl HostInfo
impl HostInfo
Sourcepub const fn new(public_key: PublicKey, addresses: Vec<String>) -> Self
pub const fn new(public_key: PublicKey, addresses: Vec<String>) -> Self
Wraps a host key and addresses known to be authentic.
Sourcepub fn from_advertised(
host_id: HostId,
public_key: PublicKey,
addresses: Vec<String>,
) -> Result<Self, BuildError>
pub fn from_advertised( host_id: HostId, public_key: PublicKey, addresses: Vec<String>, ) -> Result<Self, BuildError>
From the host’s advertised HostId, key and addresses: the key must derive the id.
§Errors
BuildError::HostId when it does not.
Trait Implementations§
impl Eq for HostInfo
impl StructuralPartialEq for HostInfo
Auto Trait Implementations§
impl Freeze for HostInfo
impl RefUnwindSafe for HostInfo
impl Send for HostInfo
impl Sync for HostInfo
impl Unpin for HostInfo
impl UnsafeUnpin for HostInfo
impl UnwindSafe for HostInfo
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