Struct tikv_client_proto::metapb::Store[][src]

pub struct Store {
    pub id: u64,
    pub address: String,
    pub state: i32,
    pub labels: Vec<StoreLabel>,
    pub version: String,
    pub peer_address: String,
    pub status_address: String,
    pub git_hash: String,
    pub start_timestamp: i64,
    pub deploy_path: String,
    pub last_heartbeat: i64,
    pub physically_destroyed: bool,
}

Fields

id: u64address: String
Expand description

Address to handle client requests (kv, cop, etc.)

state: i32labels: Vec<StoreLabel>version: Stringpeer_address: String
Expand description

Address to handle peer requests (raft messages from other store). Empty means same as address.

status_address: String
Expand description

Status address provides the HTTP service for external components

git_hash: Stringstart_timestamp: i64
Expand description

The start timestamp of the current store

deploy_path: Stringlast_heartbeat: i64
Expand description

The last heartbeat timestamp of the store.

physically_destroyed: bool
Expand description

If the store is physically destroyed, which means it can never up again.

Implementations

impl Store[src]

pub fn state(&self) -> StoreState[src]

Returns the enum value of state, or the default if the field is set to an invalid enum value.

pub fn set_state(&mut self, value: StoreState)[src]

Sets state to the provided enum value.

impl Store

pub fn new_() -> Store

pub fn default_ref() -> &'static Self

pub fn clear_id(&mut self)

pub fn set_id(&mut self, v: u64)

pub fn get_id(&self) -> u64

pub fn clear_address(&mut self)

pub fn set_address(&mut self, v: String)

pub fn get_address(&self) -> &str

pub fn mut_address(&mut self) -> &mut String

pub fn take_address(&mut self) -> String

pub fn clear_state(&mut self)

pub fn get_state(&self) -> StoreState

pub fn clear_labels(&mut self)

pub fn set_labels(&mut self, v: Vec<StoreLabel>)

pub fn get_labels(&self) -> &[StoreLabel]

pub fn mut_labels(&mut self) -> &mut Vec<StoreLabel>

pub fn take_labels(&mut self) -> Vec<StoreLabel>

pub fn clear_version(&mut self)

pub fn set_version(&mut self, v: String)

pub fn get_version(&self) -> &str

pub fn mut_version(&mut self) -> &mut String

pub fn take_version(&mut self) -> String

pub fn clear_peer_address(&mut self)

pub fn set_peer_address(&mut self, v: String)

pub fn get_peer_address(&self) -> &str

pub fn mut_peer_address(&mut self) -> &mut String

pub fn take_peer_address(&mut self) -> String

pub fn clear_status_address(&mut self)

pub fn set_status_address(&mut self, v: String)

pub fn get_status_address(&self) -> &str

pub fn mut_status_address(&mut self) -> &mut String

pub fn take_status_address(&mut self) -> String

pub fn clear_git_hash(&mut self)

pub fn set_git_hash(&mut self, v: String)

pub fn get_git_hash(&self) -> &str

pub fn mut_git_hash(&mut self) -> &mut String

pub fn take_git_hash(&mut self) -> String

pub fn clear_start_timestamp(&mut self)

pub fn set_start_timestamp(&mut self, v: i64)

pub fn get_start_timestamp(&self) -> i64

pub fn clear_deploy_path(&mut self)

pub fn set_deploy_path(&mut self, v: String)

pub fn get_deploy_path(&self) -> &str

pub fn mut_deploy_path(&mut self) -> &mut String

pub fn take_deploy_path(&mut self) -> String

pub fn clear_last_heartbeat(&mut self)

pub fn set_last_heartbeat(&mut self, v: i64)

pub fn get_last_heartbeat(&self) -> i64

pub fn clear_physically_destroyed(&mut self)

pub fn set_physically_destroyed(&mut self, v: bool)

pub fn get_physically_destroyed(&self) -> bool

Trait Implementations

impl Clear for Store

fn clear(&mut self)

Clear this make, make it equivalent to newly created object.

impl Clone for Store[src]

fn clone(&self) -> Store[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Store[src]

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

Formats the value using the given formatter. Read more

impl Default for Store[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl Message for Store[src]

fn encode_raw<B>(&self, buf: &mut B) where
    B: BufMut
[src]

fn merge_field<B>(
    &mut self,
    tag: u32,
    wire_type: WireType,
    buf: &mut B,
    ctx: DecodeContext
) -> Result<(), DecodeError> where
    B: Buf
[src]

fn encoded_len(&self) -> usize[src]

Returns the encoded length of the message without a length delimiter.

fn clear(&mut self)[src]

Clears the message, resetting all fields to their default.

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
    B: BufMut
[src]

Encodes the message to a buffer. Read more

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
    B: BufMut
[src]

Encodes the message with a length-delimiter to a buffer. Read more

fn decode<B>(buf: B) -> Result<Self, DecodeError> where
    Self: Default,
    B: Buf
[src]

Decodes an instance of the message from a buffer. Read more

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
    Self: Default,
    B: Buf
[src]

Decodes a length-delimited instance of the message from the buffer.

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
    B: Buf
[src]

Decodes an instance of the message from a buffer, and merges it into self. Read more

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
    B: Buf
[src]

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

impl Message for Store

fn compute_size(&self) -> u32

Compute and cache size of this message and all nested messages

fn get_cached_size(&self) -> u32

Get size previously computed by compute_size.

fn as_any(&self) -> &dyn Any

View self as Any.

fn descriptor(&self) -> &'static MessageDescriptor

Message descriptor for this message, used for reflection.

fn new() -> Self

Create an empty message object. Read more

fn default_instance() -> &'static Store

Return a pointer to default immutable message with static lifetime. Read more

fn is_initialized(&self) -> bool

True iff all required fields are initialized. Always returns true for protobuf 3. Read more

fn write_to_with_cached_sizes(
    &self,
    _os: &mut CodedOutputStream<'_>
) -> ProtobufResult<()>

Write message to the stream. Read more

fn merge_from(&mut self, _is: &mut CodedInputStream<'_>) -> ProtobufResult<()>

Update this message object with fields read from given stream.

fn get_unknown_fields(&self) -> &UnknownFields

Get a reference to unknown fields.

fn mut_unknown_fields(&mut self) -> &mut UnknownFields

Get a mutable reference to unknown fields.

fn write_to_bytes(&self) -> ProtobufResult<Vec<u8>>

Write the message to bytes vec.

fn merge_from_bytes(&mut self, bytes: &[u8]) -> ProtobufResult<()>

Update this message object with fields read from given stream.

fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>[src]

Parse message from stream.

fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>[src]

Write the message to the stream. Read more

fn write_length_delimited_to(
    &self,
    os: &mut CodedOutputStream<'_>
) -> Result<(), ProtobufError>
[src]

Write the message to the stream prepending the message with message length encoded as varint. Read more

fn write_length_delimited_to_vec(
    &self,
    vec: &mut Vec<u8, Global>
) -> Result<(), ProtobufError>
[src]

Write the message to the vec, prepend the message with message length encoded as varint. Read more

fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>[src]

Parse message from reader. Parse stops on EOF or when error encountered. Read more

fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>[src]

Parse message from byte array.

fn check_initialized(&self) -> Result<(), ProtobufError>[src]

Check if all required fields of this object are initialized.

fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>[src]

Write the message to the writer.

fn write_to_vec(&self, v: &mut Vec<u8, Global>) -> Result<(), ProtobufError>[src]

Write the message to bytes vec.

fn write_length_delimited_to_writer(
    &self,
    w: &mut dyn Write
) -> Result<(), ProtobufError>
[src]

Write the message to the writer, prepend the message with message length encoded as varint. Read more

fn write_length_delimited_to_bytes(
    &self
) -> Result<Vec<u8, Global>, ProtobufError>
[src]

Write the message to the bytes vec, prepend the message with message length encoded as varint. Read more

fn type_id(&self) -> TypeId[src]

Get type id for downcasting.

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)[src]

View self as mutable Any.

fn into_any(self: Box<Self, Global>) -> Box<dyn Any + 'static, Global>[src]

Convert boxed self to boxed Any.

fn descriptor_static() -> &'static MessageDescriptor[src]

Get message descriptor for message type. Read more

impl PartialEq<Store> for Store[src]

fn eq(&self, other: &Store) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Store) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for Store[src]

Auto Trait Implementations

impl RefUnwindSafe for Store

impl Send for Store

impl Sync for Store

impl Unpin for Store

impl UnwindSafe for Store

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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.

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

Performs the conversion.

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.

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

Performs the conversion.