[][src]Enum safe_nd::Request

pub enum Request {
    PutIData(IData),
    GetIData(IDataAddress),
    DeleteUnpubIData(IDataAddress),
    PutMData(MData),
    GetMData(MDataAddress),
    GetMDataValue {
        address: MDataAddress,
        key: Vec<u8>,
    },
    DeleteMData(MDataAddress),
    GetMDataShell(MDataAddress),
    GetMDataVersion(MDataAddress),
    ListMDataEntries(MDataAddress),
    ListMDataKeys(MDataAddress),
    ListMDataValues(MDataAddress),
    SetMDataUserPermissions {
        address: MDataAddress,
        user: PublicKey,
        permissions: MDataPermissionSet,
        version: u64,
    },
    DelMDataUserPermissions {
        address: MDataAddress,
        user: PublicKey,
        version: u64,
    },
    ListMDataPermissions(MDataAddress),
    ListMDataUserPermissions {
        address: MDataAddress,
        user: PublicKey,
    },
    MutateMDataEntries {
        address: MDataAddress,
        actions: MDataEntryActions,
    },
    PutAData(AData),
    GetAData(ADataAddress),
    GetADataShell {
        address: ADataAddress,
        data_index: ADataIndex,
    },
    DeleteAData(ADataAddress),
    GetADataRange {
        address: ADataAddress,
        range: (ADataIndex, ADataIndex),
    },
    GetADataValue {
        address: ADataAddress,
        key: Vec<u8>,
    },
    GetADataIndices(ADataAddress),
    GetADataLastEntry(ADataAddress),
    GetADataPermissions {
        address: ADataAddress,
        permissions_index: ADataIndex,
    },
    GetPubADataUserPermissions {
        address: ADataAddress,
        permissions_index: ADataIndex,
        user: ADataUser,
    },
    GetUnpubADataUserPermissions {
        address: ADataAddress,
        permissions_index: ADataIndex,
        public_key: PublicKey,
    },
    GetADataOwners {
        address: ADataAddress,
        owners_index: ADataIndex,
    },
    AddPubADataPermissions {
        address: ADataAddress,
        permissions: ADataPubPermissions,
        permissions_index: u64,
    },
    AddUnpubADataPermissions {
        address: ADataAddress,
        permissions: ADataUnpubPermissions,
        permissions_index: u64,
    },
    SetADataOwner {
        address: ADataAddress,
        owner: ADataOwner,
        owners_index: u64,
    },
    AppendSeq {
        append: ADataAppendOperation,
        index: u64,
    },
    AppendUnseq(ADataAppendOperation),
    TransferCoins {
        destination: XorName,
        amount: Coins,
        transaction_id: TransactionId,
    },
    GetBalance,
    CreateBalance {
        new_balance_owner: PublicKey,
        amount: Coins,
        transaction_id: TransactionId,
    },
    CreateLoginPacket(LoginPacket),
    CreateLoginPacketFor {
        new_owner: PublicKey,
        amount: Coins,
        transaction_id: TransactionId,
        new_login_packet: LoginPacket,
    },
    UpdateLoginPacket(LoginPacket),
    GetLoginPacket(XorName),
    ListAuthKeysAndVersion,
    InsAuthKey {
        key: PublicKey,
        version: u64,
        permissions: AppPermissions,
    },
    DelAuthKey {
        key: PublicKey,
        version: u64,
    },
}

RPC Request that is sent to vaults.

Variants

PutIData(IData)

Put ImmutableData.

GetIData(IDataAddress)

Get ImmutableData.

DeleteUnpubIData(IDataAddress)

Delete unpublished ImmutableData.

PutMData(MData)

Put MutableData.

GetMData(MDataAddress)

Get MutableData.

GetMDataValue

Get MutableData value.

Fields of GetMDataValue

address: MDataAddress

MutableData address.

key: Vec<u8>

Key to get.

DeleteMData(MDataAddress)

Delete MutableData.

GetMDataShell(MDataAddress)

Get MutableData shell.

GetMDataVersion(MDataAddress)

Get MutableData version.

ListMDataEntries(MDataAddress)

List MutableData entries.

ListMDataKeys(MDataAddress)

List MutableData keys.

ListMDataValues(MDataAddress)

List MutableData values.

SetMDataUserPermissions

Set MutableData user permissions.

Fields of SetMDataUserPermissions

address: MDataAddress

MutableData address.

user: PublicKey

User to set permissions for.

permissions: MDataPermissionSet

New permissions.

version: u64

Version to set.

DelMDataUserPermissions

Delete MutableData user permissions.

Fields of DelMDataUserPermissions

address: MDataAddress

MutableData address.

user: PublicKey

User to delete permissions for.

version: u64

Version to delete.

ListMDataPermissions(MDataAddress)

List MutableData permissions.

ListMDataUserPermissions

Get MutableData permissions for a user.

Fields of ListMDataUserPermissions

address: MDataAddress

MutableData address.

user: PublicKey

User to get permissions for.

MutateMDataEntries

Mutate MutableData entries.

Fields of MutateMDataEntries

address: MDataAddress

MutableData address.

actions: MDataEntryActions

Mutation actions to perform.

PutAData(AData)

Put a new AppendOnlyData onto the network.

GetAData(ADataAddress)

Get AppendOnlyData from the network.

GetADataShell

Get AppendOnlyData shell at a certain point in history (data_index refers to the list of data).

Fields of GetADataShell

address: ADataAddress

AppendOnlyData address.

data_index: ADataIndex

Index of the data at which to get the shell.

DeleteAData(ADataAddress)

Delete an unpublished AppendOnlyData.

This operation MUST return an error if applied to published AppendOnlyData. Only the current owner(s) can perform this action.

GetADataRange

Get a range of entries from an AppendOnlyData object on the network.

Fields of GetADataRange

address: ADataAddress

AppendOnlyData address.

range: (ADataIndex, ADataIndex)

Range of entries to fetch.

For example, get 10 last entries: range: (Index::FromEnd(10), Index::FromEnd(0))

Get all entries: range: (Index::FromStart(0), Index::FromEnd(0))

Get first 5 entries: range: (Index::FromStart(0), Index::FromStart(5))

GetADataValue

Get AppendOnlyData value.

Fields of GetADataValue

address: ADataAddress

AppendOnlyData address.

key: Vec<u8>

Key to get.

GetADataIndices(ADataAddress)

Get current indices: data, owners, permissions.

GetADataLastEntry(ADataAddress)

Get an entry with the current index.

GetADataPermissions

List all permissions at the provided index.

Fields of GetADataPermissions

address: ADataAddress

AppendOnlyData address.

permissions_index: ADataIndex

Permissions index.

GetPubADataUserPermissions

Get published permissions for a specified user(s).

Fields of GetPubADataUserPermissions

address: ADataAddress

AppendOnlyData address.

permissions_index: ADataIndex

Permissions index.

user: ADataUser

User to get permissions for.

GetUnpubADataUserPermissions

Get unpublished permissions for a specified user(s).

Fields of GetUnpubADataUserPermissions

address: ADataAddress

AppendOnlyData address.

permissions_index: ADataIndex

Permissions index.

public_key: PublicKey

User to get permissions for.

GetADataOwners

Get owners at the provided index.

Fields of GetADataOwners

address: ADataAddress

AppendOnlyData address.

owners_index: ADataIndex

Onwers index.

AddPubADataPermissions

Add a new published permissions entry.

Fields of AddPubADataPermissions

address: ADataAddress

AppendOnlyData address.

permissions: ADataPubPermissions

Published permissions.

permissions_index: u64

Index to add to.

AddUnpubADataPermissions

Add a new unpublished permissions entry.

Fields of AddUnpubADataPermissions

address: ADataAddress

AppendOnlyData address.

permissions: ADataUnpubPermissions

Unpublished permissions.

permissions_index: u64

Index to add to.

SetADataOwner

Add a new owners entry. Only the current owner(s) can perform this action.

Fields of SetADataOwner

address: ADataAddress

AppendOnlyData address.

owner: ADataOwner

New owner.

owners_index: u64

Owners index.

AppendSeq

Append sequenced AppendOnlyData at the given index.

Fields of AppendSeq

append: ADataAppendOperation

Entries to append.

index: u64

Index.

Append unsequenced AppendOnlyData.

TransferCoins

Balance transfer.

Fields of TransferCoins

destination: XorName

The destination to transfer to.

amount: Coins

The amount in coins to transfer.

transaction_id: TransactionId

The ID of the transaction.

GetBalance

Get current wallet balance.

CreateBalance

Create a new coin balance.

Fields of CreateBalance

new_balance_owner: PublicKey

The new owner of the balance.

amount: Coins

The new balance amount in coins.

transaction_id: TransactionId

The ID of the transaction.

CreateLoginPacket(LoginPacket)

Create a login packet.

CreateLoginPacketFor

Create a login packet for a given user and transfer some initial coins.

Fields of CreateLoginPacketFor

new_owner: PublicKey

The new owner of the login packet.

amount: Coins

The new balance amount in coins.

transaction_id: TransactionId

The ID of the transaction.

new_login_packet: LoginPacket

The new login packet.

UpdateLoginPacket(LoginPacket)

Update a login packet.

GetLoginPacket(XorName)

Get an encrypted login packet.

ListAuthKeysAndVersion

List authorised keys and version stored by Elders.

InsAuthKey

Insert an authorised key (for an app, user, etc.).

Fields of InsAuthKey

key: PublicKey

Authorised key to be inserted

version: u64

Incremented version

permissions: AppPermissions

Permissions

DelAuthKey

Delete an authorised key.

Fields of DelAuthKey

key: PublicKey

Authorised key to be deleted

version: u64

Incremented version

Methods

impl Request[src]

pub fn get_type(&self) -> Type[src]

Get the Type of this Request.

pub fn error_response(&self, error: Error) -> Response[src]

Creates a Response containing an error, with the Response variant corresponding to the Request variant.

Trait Implementations

impl Clone for Request[src]

impl Debug for Request[src]

impl<'de> Deserialize<'de> for Request[src]

impl Eq for Request[src]

impl Hash for Request[src]

impl Ord for Request[src]

impl PartialEq<Request> for Request[src]

impl PartialOrd<Request> for Request[src]

impl Serialize for Request[src]

impl StructuralEq for Request[src]

impl StructuralPartialEq for Request[src]

Auto Trait Implementations

impl RefUnwindSafe for Request

impl Send for Request

impl Sync for Request

impl Unpin for Request

impl UnwindSafe for Request

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.