pub struct RedisLabelledApi<'a> { /* private fields */ }
Implementations§
Source§impl RedisLabelledApi<'_>
impl RedisLabelledApi<'_>
pub async fn ensure_connected(&self) -> Result<(), RedisError>
pub async fn del<R, K>(&self, key: K) -> RedisResult<R>
pub async fn del_many<R, K>(&self, key: Vec<K>) -> RedisResult<R>
pub async fn get<R, K>(&self, key: K) -> RedisResult<R>
pub async fn exists<R, K>(&self, key: K) -> RedisResult<R>
pub async fn expire<R, K>(&self, key: K, seconds: i64) -> RedisResult<R>
pub async fn mget<R, K>(&self, keys: K) -> RedisResult<R>
pub async fn hdel<R, K, F>(&self, key: K, fields: F) -> RedisResult<R>
pub async fn hexists<R, K, F>(&self, key: K, field: F) -> RedisResult<R>
pub async fn hget<R, K, F>(&self, key: K, field: F) -> RedisResult<R>
pub async fn hkeys<R, K>(&self, key: K) -> RedisResult<R>
pub async fn hmget<R, K, F>(&self, key: K, fields: F) -> RedisResult<R>
pub async fn mset<K, V>(&self, key_values: HashMap<K, V>) -> RedisResult<()>
pub async fn hmset<R, K, V>(&self, key: K, values: V) -> RedisResult<R>
pub async fn hset<R, K, V>(&self, key: K, values: V) -> RedisResult<R>
pub async fn hsetnx<R, K, F, V>( &self, key: K, field: F, value: V, ) -> RedisResult<R>
pub async fn sadd<R, K, V>(&self, key: K, members: V) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
pub async fn set<R, K, V>(
&self,
key: K,
value: V,
expire: Option<Expiration>,
options: Option<SetOptions>,
get: bool,
) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
V: TryInto<RedisValue> + Send,
V::Error: Into<RedisError> + Send,
pub async fn smembers<R, K>(&self, key: K) -> RedisResult<R>
pub async fn srem<R, K, V>(&self, key: K, members: V) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
pub async fn scard<R, K>(&self, key: K) -> RedisResult<R>
pub async fn xadd<R, K, C, I, F>( &self, key: K, nomkstream: bool, cap: C, id: I, fields: F, ) -> RedisResult<R>
pub async fn xlen<R, K>(&self, key: K) -> RedisResult<R>
pub async fn xrange<R, K, S, E>(
&self,
key: K,
start: S,
end: E,
count: Option<u64>,
) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
S: TryInto<RedisValue> + Send,
S::Error: Into<RedisError> + Send,
E: TryInto<RedisValue> + Send,
E::Error: Into<RedisError> + Send,
pub async fn xrevrange<R, K, S, E>(
&self,
key: K,
end: E,
start: S,
count: Option<u64>,
) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
S: TryInto<RedisValue> + Send,
S::Error: Into<RedisError> + Send,
E: TryInto<RedisValue> + Send,
E::Error: Into<RedisError> + Send,
pub async fn xtrim<R, K, C>(&self, key: K, cap: C) -> RedisResult<R>
pub async fn zadd<R, K, V>(
&self,
key: K,
options: Option<SetOptions>,
ordering: Option<Ordering>,
changed: bool,
incr: bool,
values: V,
) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
V: TryInto<MultipleZaddValues> + Send,
V::Error: Into<RedisError> + Send,
pub async fn zrange<R, K, M, N>( &self, key: K, min: M, max: N, sort: Option<ZSort>, rev: bool, limit: Option<Limit>, withscores: bool, ) -> RedisResult<R>
pub async fn zrangebyscore<R, K, M, N>( &self, key: K, min: M, max: N, withscores: bool, limit: Option<Limit>, ) -> RedisResult<R>
pub async fn zrem<R, K, V>(&self, key: K, members: V) -> RedisResult<R>where
R: FromRedis,
K: AsRef<str>,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
pub async fn transaction<R, F, Fu>(&self, func: F) -> RedisResult<R>where
R: FromRedis,
F: FnOnce(RedisTransaction) -> Fu,
Fu: Future<Output = RedisResult<RedisTransaction>>,
pub async fn wait(&self, replicas: i64, timeout: i64) -> RedisResult<i64>
pub async fn info_connected_slaves(&self) -> RedisResult<u8>
pub async fn scan<K>( &self, pattern: K, cursor: u64, count: u64, ) -> RedisResult<(u64, Vec<String>)>
pub async fn keys<K>(&self, pattern: K) -> RedisResult<Vec<String>>
Auto Trait Implementations§
impl<'a> Freeze for RedisLabelledApi<'a>
impl<'a> !RefUnwindSafe for RedisLabelledApi<'a>
impl<'a> Send for RedisLabelledApi<'a>
impl<'a> Sync for RedisLabelledApi<'a>
impl<'a> Unpin for RedisLabelledApi<'a>
impl<'a> !UnwindSafe for RedisLabelledApi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self
file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);