Struct routing::Client [−][src]
pub struct Client { /* fields omitted */ }
Interface for sending and receiving messages to and from a network of nodes in the role of a client.
A client is connected to the network via one or more nodes. Messages are never routed via a client, and a client cannot be part of a section authority.
Methods
impl Client
[src]
impl Client
pub fn get_account_info(
&mut self,
dst: Authority<XorName>,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn get_account_info(
&mut self,
dst: Authority<XorName>,
msg_id: MessageId
) -> Result<(), InterfaceError>
Gets MAID account information.
pub fn put_idata(
&mut self,
dst: Authority<XorName>,
data: ImmutableData,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn put_idata(
&mut self,
dst: Authority<XorName>,
data: ImmutableData,
msg_id: MessageId
) -> Result<(), InterfaceError>
Puts ImmutableData to the network
pub fn get_idata(
&mut self,
dst: Authority<XorName>,
name: XorName,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn get_idata(
&mut self,
dst: Authority<XorName>,
name: XorName,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches ImmutableData from the network by the given name.
pub fn get_mdata_version(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn get_mdata_version(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches a latest version number of the provided MutableData
pub fn get_mdata_shell(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn get_mdata_shell(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches the shell of the provided MutableData
pub fn get_mdata(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn get_mdata(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches the entire MutableData
pub fn list_mdata_entries(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn list_mdata_entries(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches a list of entries (keys + values) of the provided MutableData Note: response to this request is unlikely to accumulate during churn.
pub fn list_mdata_keys(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn list_mdata_keys(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches a list of keys of the provided MutableData Note: response to this request is unlikely to accumulate during churn.
pub fn list_mdata_values(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn list_mdata_values(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches a list of values of the provided MutableData Note: response to this request is unlikely to accumulate during churn.
pub fn get_mdata_value(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
key: Vec<u8>,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn get_mdata_value(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
key: Vec<u8>,
msg_id: MessageId
) -> Result<(), InterfaceError>
Fetches a single value from the provided MutableData by the given key
pub fn put_mdata(
&mut self,
dst: Authority<XorName>,
data: MutableData,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
[src]
pub fn put_mdata(
&mut self,
dst: Authority<XorName>,
data: MutableData,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
Creates a new MutableData
in the network
pub fn mutate_mdata_entries(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
actions: BTreeMap<Vec<u8>, EntryAction>,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
[src]
pub fn mutate_mdata_entries(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
actions: BTreeMap<Vec<u8>, EntryAction>,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
Updates MutableData
entries in bulk
pub fn list_mdata_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn list_mdata_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Lists all permissions for a given MutableData
pub fn list_mdata_user_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
user: User,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn list_mdata_user_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
user: User,
msg_id: MessageId
) -> Result<(), InterfaceError>
Lists a permission set for a given user
pub fn set_mdata_user_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
user: User,
permissions: PermissionSet,
version: u64,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
[src]
pub fn set_mdata_user_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
user: User,
permissions: PermissionSet,
version: u64,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
Updates or inserts a permission set for a given user
pub fn del_mdata_user_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
user: User,
version: u64,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
[src]
pub fn del_mdata_user_permissions(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
user: User,
version: u64,
msg_id: MessageId,
requester: PublicKey
) -> Result<(), InterfaceError>
Deletes a permission set for a given user
pub fn change_mdata_owner(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
new_owners: BTreeSet<PublicKey>,
version: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn change_mdata_owner(
&mut self,
dst: Authority<XorName>,
name: XorName,
tag: u64,
new_owners: BTreeSet<PublicKey>,
version: u64,
msg_id: MessageId
) -> Result<(), InterfaceError>
Sends an ownership transfer request
pub fn list_auth_keys_and_version(
&mut self,
dst: Authority<XorName>,
message_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn list_auth_keys_and_version(
&mut self,
dst: Authority<XorName>,
message_id: MessageId
) -> Result<(), InterfaceError>
Fetches a list of authorised keys and version in MaidManager
pub fn ins_auth_key(
&mut self,
dst: Authority<XorName>,
key: PublicKey,
version: u64,
message_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn ins_auth_key(
&mut self,
dst: Authority<XorName>,
key: PublicKey,
version: u64,
message_id: MessageId
) -> Result<(), InterfaceError>
Adds a new authorised key to MaidManager
pub fn del_auth_key(
&mut self,
dst: Authority<XorName>,
key: PublicKey,
version: u64,
message_id: MessageId
) -> Result<(), InterfaceError>
[src]
pub fn del_auth_key(
&mut self,
dst: Authority<XorName>,
key: PublicKey,
version: u64,
message_id: MessageId
) -> Result<(), InterfaceError>
Removes an authorised key from MaidManager
impl Client
[src]
impl Client
pub fn new(
event_sender: Sender<Event>,
keys: Option<FullId>,
bootstrap_config: Option<BootstrapConfig>,
msg_expiry_dur: Duration
) -> Result<Client, RoutingError>
[src]
pub fn new(
event_sender: Sender<Event>,
keys: Option<FullId>,
bootstrap_config: Option<BootstrapConfig>,
msg_expiry_dur: Duration
) -> Result<Client, RoutingError>
Create a new Client
.
It will automatically connect to the network, but not attempt to achieve full routing node
status. The name of the client will be the name of the PublicId
of the keys
and must
equal the SHA512 hash of its public signing key, otherwise the client will be instantly
terminated.
Keys will be exchanged with the ClientAuthority
so that communication with the network is
cryptographically secure and uses section consensus. The restriction for the client name
exists to ensure that the client cannot choose its ClientAuthority
.
pub fn id(&self) -> Result<PublicId, InterfaceError>
[src]
pub fn id(&self) -> Result<PublicId, InterfaceError>
Returns the PublicId
of this client.
pub fn bootstrap_config() -> Result<BootstrapConfig, RoutingError>
[src]
pub fn bootstrap_config() -> Result<BootstrapConfig, RoutingError>
Returns the bootstrap config that this client was created with.