Database

Struct Database 

Source
pub struct Database {
Show 42 fields pub database_id: i32, pub name: Option<String>, pub status: Option<String>, pub provider: Option<String>, pub region: Option<String>, pub redis_version: Option<String>, pub resp_version: Option<String>, pub memory_limit_in_gb: Option<f64>, pub dataset_size_in_gb: Option<f64>, pub memory_used_in_mb: Option<f64>, pub private_endpoint: Option<String>, pub public_endpoint: Option<String>, pub port: Option<i32>, pub data_eviction_policy: Option<String>, pub data_persistence: Option<String>, pub replication: Option<bool>, pub protocol: Option<String>, pub support_oss_cluster_api: Option<bool>, pub use_external_endpoint_for_oss_cluster_api: Option<bool>, pub enable_tls: Option<bool>, pub throughput_measurement: Option<DatabaseThroughputSpec>, pub local_throughput_measurement: Option<Vec<LocalThroughput>>, pub average_item_size_in_bytes: Option<i64>, pub periodic_backup_path: Option<String>, pub remote_backup: Option<Value>, pub source_ip: Option<Vec<String>>, pub client_ssl_certificate: Option<String>, pub client_tls_certificates: Option<Vec<Value>>, pub password: Option<String>, pub sasl_username: Option<String>, pub sasl_password: Option<String>, pub alerts: Option<Vec<Value>>, pub modules: Option<Vec<Value>>, pub sharding_type: Option<String>, pub query_performance_factor: Option<String>, pub replica_of: Option<Vec<String>>, pub replica: Option<Value>, pub enable_default_user: Option<bool>, pub activated: Option<String>, pub last_modified: Option<String>, pub links: Option<Vec<HashMap<String, Value>>>, pub extra: Value,
}
Expand description

Database

Represents a Redis Cloud database with all known API fields as first-class struct members. The extra field is reserved only for truly unknown/future fields that may be added to the API.

Fields§

§database_id: i32

Database ID - always present in API responses

§name: Option<String>

Database name

§status: Option<String>

Database status (e.g., “active”, “pending”, “error”, “draft”)

§provider: Option<String>

Cloud provider (e.g., “AWS”, “GCP”, “Azure”)

§region: Option<String>

Cloud region (e.g., “us-east-1”, “europe-west1”)

§redis_version: Option<String>

Redis version (e.g., “7.2”, “7.0”)

§resp_version: Option<String>

Redis Serialization Protocol version

§memory_limit_in_gb: Option<f64>

Total memory limit in GB (including replication and overhead)

§dataset_size_in_gb: Option<f64>

Dataset size in GB (actual data size, excluding replication)

§memory_used_in_mb: Option<f64>

Memory used in MB

§private_endpoint: Option<String>

Private endpoint for database connections

§public_endpoint: Option<String>

Public endpoint for database connections (if enabled)

§port: Option<i32>

TCP port on which the database is available

§data_eviction_policy: Option<String>

Data eviction policy (e.g., “volatile-lru”, “allkeys-lru”, “noeviction”)

§data_persistence: Option<String>

Data persistence setting (e.g., “aof-every-1-sec”, “snapshot-every-1-hour”, “none”)

§replication: Option<bool>

Whether replication is enabled

§protocol: Option<String>

Protocol used (e.g., “redis”, “memcached”)

§support_oss_cluster_api: Option<bool>

Support for OSS Cluster API

§use_external_endpoint_for_oss_cluster_api: Option<bool>

Use external endpoint for OSS Cluster API

§enable_tls: Option<bool>

Whether TLS is enabled for connections

§throughput_measurement: Option<DatabaseThroughputSpec>

Throughput measurement configuration

§local_throughput_measurement: Option<Vec<LocalThroughput>>

Local throughput measurement for Active-Active databases

§average_item_size_in_bytes: Option<i64>

Average item size in bytes (for Auto Tiering)

§periodic_backup_path: Option<String>

Path to periodic backup storage location

§remote_backup: Option<Value>

Remote backup configuration

§source_ip: Option<Vec<String>>

List of source IP addresses or subnet masks allowed to connect

§client_ssl_certificate: Option<String>

Client TLS/SSL certificate (deprecated, use client_tls_certificates)

§client_tls_certificates: Option<Vec<Value>>

List of client TLS/SSL certificates for mTLS authentication

§password: Option<String>

Database password (masked in responses for security)

§sasl_username: Option<String>

Memcached SASL username

§sasl_password: Option<String>

Memcached SASL password (masked in responses)

§alerts: Option<Vec<Value>>

Database alert configurations

§modules: Option<Vec<Value>>

Redis modules/capabilities enabled on this database

§sharding_type: Option<String>

Database hashing policy for clustering

§query_performance_factor: Option<String>

Query performance factor (for search and query databases)

§replica_of: Option<Vec<String>>

List of databases this database is a replica of

§replica: Option<Value>

Replica configuration

§enable_default_user: Option<bool>

Whether default Redis user is enabled

§activated: Option<String>

Timestamp when database was activated

§last_modified: Option<String>

Timestamp of last modification

§links: Option<Vec<HashMap<String, Value>>>

HATEOAS links for API navigation

§extra: Value

Only for truly unknown/future API fields. All documented fields should be first-class members above.

Trait Implementations§

Source§

impl Clone for Database

Source§

fn clone(&self) -> Database

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Database

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Database

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Database

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,