Struct sled_web::request::Cas[][src]

pub struct Cas {
    pub key: Vec<u8>,
    pub old: Option<Vec<u8>>,
    pub new: Option<Vec<u8>>,
}

Compare and swap. Capable of unique creation, conditional modification, or deletion.

If old is None, this will only set the value if it doesn't exist yet. If new is None, will delete the value if old is correct. If both old and new are Some, will modify the value if old is correct.

If Tree is read-only, will do nothing.

Fields

Trait Implementations

impl Clone for Cas
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Cas
[src]

Formats the value using the given formatter. Read more

impl Eq for Cas
[src]

impl Hash for Cas
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Cas
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Cas
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Cas
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl RequestType for Cas
[src]

METHOD: Method = <Method>::PUT

The HTTP method included with the header.

PATH_AND_QUERY: &'static str = "/tree/entries/cas"

The component of the URI following the domain.

impl IntoBody for Cas
[src]

The body of the request, capable of being serialized to JSON.

Convert self into the serializable Body type.

impl IntoResponse for Cas
[src]

Respond to the given request body, updating the sled::Tree as necessary.

Auto Trait Implementations

impl Send for Cas

impl Sync for Cas