Trait safe_app::Client[][src]

pub trait Client: 'static + Clone {
    type MsgType;
    fn full_id(&self) -> Option<FullId>;
fn config(&self) -> Option<Config>;
fn cm_addr(&self) -> Option<Authority<XorName>>;
fn inner(&self) -> Rc<RefCell<ClientInner<Self, Self::MsgType>>>;
fn public_encryption_key(&self) -> Option<PublicKey>;
fn secret_encryption_key(&self) -> Option<SecretKey>;
fn secret_symmetric_key(&self) -> Option<Key>;
fn public_signing_key(&self) -> Option<PublicKey>;
fn secret_signing_key(&self) -> Option<SecretKey>;
fn owner_key(&self) -> Option<PublicKey>; fn encryption_keypair(&self) -> Option<(PublicKey, SecretKey)> { ... }
fn signing_keypair(&self) -> Option<(PublicKey, SecretKey)> { ... }
fn set_timeout(&self, duration: Duration) { ... }
fn restart_routing(&self) -> Result<(), CoreError> { ... }
fn get_idata(
        &self,
        name: XorName
    ) -> Box<Future<Item = ImmutableData, Error = CoreError> + 'static> { ... }
fn put_idata(
        &self,
        data: ImmutableData
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn put_mdata(
        &self,
        data: MutableData
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn mutate_mdata_entries(
        &self,
        name: XorName,
        tag: u64,
        actions: BTreeMap<Vec<u8>, EntryAction>
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn get_mdata(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = MutableData, Error = CoreError> + 'static> { ... }
fn get_mdata_shell(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = MutableData, Error = CoreError> + 'static> { ... }
fn get_mdata_version(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = u64, Error = CoreError> + 'static> { ... }
fn list_mdata_entries(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = BTreeMap<Vec<u8>, Value>, Error = CoreError> + 'static> { ... }
fn list_mdata_keys(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = BTreeSet<Vec<u8>>, Error = CoreError> + 'static> { ... }
fn list_mdata_values(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = Vec<Value>, Error = CoreError> + 'static> { ... }
fn get_mdata_value(
        &self,
        name: XorName,
        tag: u64,
        key: Vec<u8>
    ) -> Box<Future<Item = Value, Error = CoreError> + 'static> { ... }
fn get_account_info(
        &self
    ) -> Box<Future<Item = AccountInfo, Error = CoreError> + 'static> { ... }
fn list_mdata_permissions(
        &self,
        name: XorName,
        tag: u64
    ) -> Box<Future<Item = BTreeMap<User, PermissionSet>, Error = CoreError> + 'static> { ... }
fn list_mdata_user_permissions(
        &self,
        name: XorName,
        tag: u64,
        user: User
    ) -> Box<Future<Item = PermissionSet, Error = CoreError> + 'static> { ... }
fn set_mdata_user_permissions(
        &self,
        name: XorName,
        tag: u64,
        user: User,
        permissions: PermissionSet,
        version: u64
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn del_mdata_user_permissions(
        &self,
        name: XorName,
        tag: u64,
        user: User,
        version: u64
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn change_mdata_owner(
        &self,
        name: XorName,
        tag: u64,
        new_owner: PublicKey,
        version: u64
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn list_auth_keys_and_version(
        &self
    ) -> Box<Future<Item = (BTreeSet<PublicKey>, u64), Error = CoreError> + 'static> { ... }
fn ins_auth_key(
        &self,
        key: PublicKey,
        version: u64
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... }
fn del_auth_key(
        &self,
        key: PublicKey,
        version: u64
    ) -> Box<Future<Item = (), Error = CoreError> + 'static> { ... } }

Trait providing an interface for self-authentication client implementations, so they can interface all requests from high level API's to the actual routing layer and manage all interactions with it. Essentially provides an interface for non-blocking Clients with an asynchronous API using the futures abstraction from the futures-rs crate.

Associated Types

Associated message type.

Required Methods

Return the client's ID.

Return a crust::Config if the Client was initialized with one.

Address of the Client Manager.

Return an associated ClientInner type which is expected to contain fields associated with the implementing type.

Return the public encryption key.

Return the Secret encryption key.

Return the Symmetric Encryption key.

Return the Public Signing key.

Return the Secret Signing key.

Return the owner signing key.

Provided Methods

Return the public and secret encryption keys.

Return the public and secret signing keys.

Set request timeout.

Restart the routing client and reconnect to the network.

Important traits for Box<R>

Get immutable data from the network. If the data exists locally in the cache then it will be immediately returned without making an actual network request.

Important traits for Box<R>

Put immutable data onto the network.

Important traits for Box<R>

Put MutableData onto the network.

Important traits for Box<R>

Mutates MutableData entries in bulk.

Important traits for Box<R>

Get entire MutableData from the network.

Important traits for Box<R>

Get a shell (bare bones) version of MutableData from the network.

Important traits for Box<R>

Get a current version of MutableData from the network.

Important traits for Box<R>

Return a complete list of entries in MutableData.

Important traits for Box<R>

Return a list of keys in MutableData stored on the network.

Important traits for Box<R>

Return a list of keys in MutableData stored on the network.

Important traits for Box<R>

Get a single entry from MutableData.

Important traits for Box<R>

Get data from the network.

Important traits for Box<R>

Return a list of permissions in MutableData stored on the network.

Important traits for Box<R>

Return a list of permissions for a particular User in MutableData.

Important traits for Box<R>

Updates or inserts a permission set for a given user

Important traits for Box<R>

Deletes a permission set for a given user

Important traits for Box<R>

Sends an ownership transfer request.

Important traits for Box<R>

Fetches a list of authorised keys and version in MaidManager.

Important traits for Box<R>

Adds a new authorised key to MaidManager.

Important traits for Box<R>

Removes an authorised key from MaidManager.

Implementations on Foreign Types

impl Client for CoreClient
[src]

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Important traits for Box<R>

Implementors