Struct pliantdb_core::kv::set::Builder[][src]

#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Builder<'a, Kv, V> { /* fields omitted */ }

Executes Command::Set when awaited. Also offers methods to customize the options for the operation.

Implementations

impl<'a, K, V> Builder<'a, K, V> where
    K: Kv
[src]

pub fn expire_in(self, duration: Duration) -> Self[src]

Set this key to expire after duration from now.

pub fn expire_at(self, time: SystemTime) -> Self[src]

Set this key to expire at the provided time.

pub fn keep_existing_expiration(self) -> Self[src]

If the key already exists, do not update the currently set expiration.

pub fn only_if_exists(self) -> Self[src]

Only set the value if this key already exists.

pub fn only_if_vacant(self) -> Self[src]

Only set the value if this key isn’t present.

pub async fn returning_previous(self) -> Result<Option<V>, Error> where
    V: Serialize + for<'de> Deserialize<'de> + Send + Sync
[src]

Executes the Set operation, requesting the previous value be returned. If no change is made, None will be returned.

Trait Implementations

impl<'a, K, V> Future for Builder<'a, K, V> where
    K: Kv,
    V: Serialize
[src]

type Output = Result<KeyStatus, Error>

The type of value produced on completion.

Auto Trait Implementations

impl<'a, Kv, V> !RefUnwindSafe for Builder<'a, Kv, V>

impl<'a, Kv, V> Send for Builder<'a, Kv, V> where
    Kv: Sync,
    V: Sync

impl<'a, Kv, V> !Sync for Builder<'a, Kv, V>

impl<'a, Kv, V> Unpin for Builder<'a, Kv, V>

impl<'a, Kv, V> !UnwindSafe for Builder<'a, Kv, V>

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

impl<T> FutureExt for T where
    T: Future + ?Sized

impl<T> Instrument for T[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized

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