pub struct ReadOnlyDatabaseRef { /* private fields */ }Expand description
A handle to a Database that can only read, made by Database::read
or Database::read_primary. Copy, and free to pass to other code.
Its command groups hold the commands that read, and nothing else.
Implementations§
Source§impl ReadOnlyDatabaseRef
impl ReadOnlyDatabaseRef
Sourcepub fn generic(&self) -> ReadCommands<'static>
pub fn generic(&self) -> ReadCommands<'static>
Commands that work on a key of any type: expiry, deletion, renaming.
Sourcepub fn string(&self) -> ReadCommands<'static>
pub fn string(&self) -> ReadCommands<'static>
Commands on strings, which is what a plain value is.
Sourcepub fn bitmap(&self) -> ReadCommands<'static>
pub fn bitmap(&self) -> ReadCommands<'static>
Commands on the bits of a string.
Sourcepub fn hash(&self) -> ReadCommands<'static>
pub fn hash(&self) -> ReadCommands<'static>
Commands on hashes: a key holding fields, each with a value.
Sourcepub fn list(&self) -> ReadCommands<'static>
pub fn list(&self) -> ReadCommands<'static>
Commands on lists.
Sourcepub fn set(&self) -> ReadCommands<'static>
pub fn set(&self) -> ReadCommands<'static>
Commands on sets.
Sourcepub fn sorted_set(&self) -> ReadCommands<'static>
pub fn sorted_set(&self) -> ReadCommands<'static>
Commands on sorted sets: members ordered by a score.
Sourcepub fn geo(&self) -> ReadCommands<'static>
pub fn geo(&self) -> ReadCommands<'static>
Commands on geospatial indexes.
Sourcepub fn stream(&self) -> ReadCommands<'static>
pub fn stream(&self) -> ReadCommands<'static>
Commands on streams.
Sourcepub fn hyperloglog(&self) -> ReadCommands<'static>
pub fn hyperloglog(&self) -> ReadCommands<'static>
Commands on HyperLogLogs: estimates of how many distinct elements were added.
Sourcepub fn pubsub(&self) -> ReadCommands<'static>
pub fn pubsub(&self) -> ReadCommands<'static>
Publishing to channels, and subscribing to them.
Sourcepub fn command(&self, name: &'static str) -> CommandInvocation<'static>
pub fn command(&self, name: &'static str) -> CommandInvocation<'static>
A command the groups lack, by its name: see Database::command. Only
a command Redis says doesn’t write is sent.
Sourcepub fn script(&self, script: &'static Script) -> Invocation<'static>
pub fn script(&self, script: &'static Script) -> Invocation<'static>
A call to script, which must be a Script::read_only one.
Trait Implementations§
Source§impl Clone for ReadOnlyDatabaseRef
impl Clone for ReadOnlyDatabaseRef
impl Copy for ReadOnlyDatabaseRef
Auto Trait Implementations§
impl !RefUnwindSafe for ReadOnlyDatabaseRef
impl !UnwindSafe for ReadOnlyDatabaseRef
impl Forget for ReadOnlyDatabaseRef
impl Freeze for ReadOnlyDatabaseRef
impl Move for ReadOnlyDatabaseRef
impl Send for ReadOnlyDatabaseRef
impl Sync for ReadOnlyDatabaseRef
impl Unpin for ReadOnlyDatabaseRef
impl UnsafeUnpin for ReadOnlyDatabaseRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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