Enum google_api_proto::google::spanner::admin::instance::v1::replica_info::ReplicaType
source · #[repr(i32)]pub enum ReplicaType {
TypeUnspecified = 0,
ReadWrite = 1,
ReadOnly = 2,
Witness = 3,
}
Expand description
Indicates the type of replica. See the replica types documentation for more details.
Variants§
TypeUnspecified = 0
Not specified.
ReadWrite = 1
Read-write replicas support both reads and writes. These replicas:
- Maintain a full copy of your data.
- Serve reads.
- Can vote whether to commit a write.
- Participate in leadership election.
- Are eligible to become a leader.
ReadOnly = 2
Read-only replicas only support reads (not writes). Read-only replicas:
- Maintain a full copy of your data.
- Serve reads.
- Do not participate in voting to commit writes.
- Are not eligible to become a leader.
Witness = 3
Witness replicas don’t support reads but do participate in voting to commit writes. Witness replicas:
- Do not maintain a full copy of data.
- Do not serve reads.
- Vote whether to commit writes.
- Participate in leader election but are not eligible to become leader.
Implementations§
source§impl ReplicaType
impl ReplicaType
source§impl ReplicaType
impl ReplicaType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for ReplicaType
impl Clone for ReplicaType
source§fn clone(&self) -> ReplicaType
fn clone(&self) -> ReplicaType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ReplicaType
impl Debug for ReplicaType
source§impl Default for ReplicaType
impl Default for ReplicaType
source§fn default() -> ReplicaType
fn default() -> ReplicaType
Returns the “default value” for a type. Read more
source§impl From<ReplicaType> for i32
impl From<ReplicaType> for i32
source§fn from(value: ReplicaType) -> i32
fn from(value: ReplicaType) -> i32
Converts to this type from the input type.
source§impl Hash for ReplicaType
impl Hash for ReplicaType
source§impl Ord for ReplicaType
impl Ord for ReplicaType
source§fn cmp(&self, other: &ReplicaType) -> Ordering
fn cmp(&self, other: &ReplicaType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ReplicaType
impl PartialEq for ReplicaType
source§fn eq(&self, other: &ReplicaType) -> bool
fn eq(&self, other: &ReplicaType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ReplicaType
impl PartialOrd for ReplicaType
source§fn partial_cmp(&self, other: &ReplicaType) -> Option<Ordering>
fn partial_cmp(&self, other: &ReplicaType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for ReplicaType
impl TryFrom<i32> for ReplicaType
§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
source§fn try_from(value: i32) -> Result<ReplicaType, DecodeError>
fn try_from(value: i32) -> Result<ReplicaType, DecodeError>
Performs the conversion.
impl Copy for ReplicaType
impl Eq for ReplicaType
impl StructuralPartialEq for ReplicaType
Auto Trait Implementations§
impl Freeze for ReplicaType
impl RefUnwindSafe for ReplicaType
impl Send for ReplicaType
impl Sync for ReplicaType
impl Unpin for ReplicaType
impl UnwindSafe for ReplicaType
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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>
Wrap the input message
T
in a tonic::Request