Struct confitul::RemoteHost

source ·
pub struct RemoteHost { /* private fields */ }
Expand description

A remote host, for which this program instance is not responsible.

Typically, this is a host about which we gathered informations, but it is not local so, among other things, we can not really trust it and we do not have its private key.

This should NOT be serialized as it is not trustable. Instead, de-serialize from the HostInfo struct then call the constructor, which checks for integrity.

Implementations§

Create a new remote host.

The typical way to build this is from host info which has been serialized, sent over the wire, then de-serialized into a host info.

Examples
use confitul::LocalHost;
use confitul::RemoteHost;
use confitul::Host;

let lh = LocalHost::new(None).unwrap();
let rh = RemoteHost::new(&lh.info()).unwrap();
print!("{}\n{}\n", lh, rh);

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Informations about the host. Read more
Verify a message signature. Read more
ID of the host. Read more
Name of the host. Read more
Description of the host. Read more
URLs of the host. Read more
Signature of the host. Read more
Verify this host signature. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.