[][src]Enum safe_nd::SDataRequest

pub enum SDataRequest {
    Store(SData),
    Get(SDataAddress),
    Delete(SDataAddress),
    GetRange {
        address: SDataAddress,
        range: (SDataIndex, SDataIndex),
    },
    GetLastEntry(SDataAddress),
    GetPermissions(SDataAddress),
    GetUserPermissions {
        address: SDataAddress,
        user: SDataUser,
    },
    GetOwner(SDataAddress),
    MutatePubPermissions(SDataMutationOperation<SDataPubPermissions>),
    MutatePrivPermissions(SDataMutationOperation<SDataPrivPermissions>),
    MutateOwner(SDataMutationOperation<SDataOwner>),
    Mutate(SDataMutationOperation<SDataEntry>),
}

Sequence request that is sent to vaults.

Variants

Store(SData)

Store a new Sequence onto the network.

Get Sequence from the network.

Delete(SDataAddress)

Delete a private Sequence.

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

GetRange

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

Fields of GetRange

address: SDataAddress

Sequence address.

range: (SDataIndex, SDataIndex)

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))

GetLastEntry(SDataAddress)

Get last entry from the Sequence.

GetPermissions(SDataAddress)

List all current users permissions.

GetUserPermissions

Get current permissions for a specified user(s).

Fields of GetUserPermissions

address: SDataAddress

Sequence address.

user: SDataUser

User to get permissions for.

GetOwner(SDataAddress)

Get current owner.

Set new permissions for public Sequence.

Set new permissions for private Sequence.

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

Mutate the Sequence (insert/remove entry).

Implementations

impl SDataRequest[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.

pub fn authorisation_kind(&self) -> AuthorisationKind[src]

Returns the type of authorisation needed for the request.

pub fn dest_address(&self) -> Option<Cow<XorName>>[src]

Returns the address of the destination for request.

Trait Implementations

impl Clone for SDataRequest[src]

impl Debug for SDataRequest[src]

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

impl Eq for SDataRequest[src]

impl Hash for SDataRequest[src]

impl PartialEq<SDataRequest> for SDataRequest[src]

impl PartialOrd<SDataRequest> for SDataRequest[src]

impl Serialize for SDataRequest[src]

impl StructuralEq for SDataRequest[src]

impl StructuralPartialEq for SDataRequest[src]

Auto Trait Implementations

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: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Member for T where
    T: Clone + Eq + Hash
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,