Struct raft::eraftpb::HardState [−][src]
Fields
term: u64
vote: u64
commit: u64
Methods
impl HardState
[src]
impl HardState
pub fn new() -> HardState
[src]
pub fn new() -> HardState
pub fn clear_term(&mut self)
[src]
pub fn clear_term(&mut self)
pub fn set_term(&mut self, v: u64)
[src]
pub fn set_term(&mut self, v: u64)
pub fn get_term(&self) -> u64
[src]
pub fn get_term(&self) -> u64
pub fn clear_vote(&mut self)
[src]
pub fn clear_vote(&mut self)
pub fn set_vote(&mut self, v: u64)
[src]
pub fn set_vote(&mut self, v: u64)
pub fn get_vote(&self) -> u64
[src]
pub fn get_vote(&self) -> u64
pub fn clear_commit(&mut self)
[src]
pub fn clear_commit(&mut self)
pub fn set_commit(&mut self, v: u64)
[src]
pub fn set_commit(&mut self, v: u64)
pub fn get_commit(&self) -> u64
[src]
pub fn get_commit(&self) -> u64
Trait Implementations
impl PartialEq for HardState
[src]
impl PartialEq for HardState
fn eq(&self, other: &HardState) -> bool
[src]
fn eq(&self, other: &HardState) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &HardState) -> bool
[src]
fn ne(&self, other: &HardState) -> bool
This method tests for !=
.
impl Clone for HardState
[src]
impl Clone for HardState
fn clone(&self) -> HardState
[src]
fn clone(&self) -> HardState
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for HardState
[src]
impl Default for HardState
impl Message for HardState
[src]
impl Message for HardState
fn is_initialized(&self) -> bool
[src]
fn is_initialized(&self) -> bool
True iff all required fields are initialized. Always returns true
for protobuf 3. Read more
fn merge_from(&mut self, is: &mut CodedInputStream) -> ProtobufResult<()>
[src]
fn merge_from(&mut self, is: &mut CodedInputStream) -> ProtobufResult<()>
Update this message object with fields read from given stream.
fn compute_size(&self) -> u32
[src]
fn compute_size(&self) -> u32
Compute and cache size of this message and all nested messages
fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
Write message to the stream. Read more
fn get_cached_size(&self) -> u32
[src]
fn get_cached_size(&self) -> u32
Get size previously computed by compute_size
.
fn get_unknown_fields(&self) -> &UnknownFields
[src]
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
[src]
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
fn as_any(&self) -> &Any
[src]
fn as_any(&self) -> &Any
View self as Any
.
fn as_any_mut(&mut self) -> &mut Any
[src]
fn as_any_mut(&mut self) -> &mut Any
View self as mutable Any
.
fn into_any(self: Box<Self>) -> Box<Any>
[src]
fn into_any(self: Box<Self>) -> Box<Any>
Convert boxed self to boxed Any
.
fn descriptor(&self) -> &'static MessageDescriptor
[src]
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
fn new() -> HardState
[src]
fn new() -> HardState
Create an empty message object.
fn descriptor_static() -> &'static MessageDescriptor
[src]
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type.
fn default_instance() -> &'static HardState
[src]
fn default_instance() -> &'static HardState
Return a pointer to default immutable message.
fn write_to(&self, os: &mut CodedOutputStream) -> Result<(), ProtobufError>
[src]
fn write_to(&self, os: &mut CodedOutputStream) -> Result<(), ProtobufError>
Write the message to the stream. Read more
fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
[src]
fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
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>
) -> Result<(), ProtobufError>
[src]
fn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8>
) -> Result<(), ProtobufError>
Write the message to the vec, prepend the message with message length encoded as varint. Read more
fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
[src]
fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
fn check_initialized(&self) -> Result<(), ProtobufError>
[src]
fn check_initialized(&self) -> Result<(), ProtobufError>
Check if all required fields of this object are initialized.
fn write_to_writer(&self, w: &mut Write) -> Result<(), ProtobufError>
[src]
fn write_to_writer(&self, w: &mut Write) -> Result<(), ProtobufError>
Write the message to the writer.
fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
[src]
fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
Write the message to bytes vec.
fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
[src]
fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
Write the message to bytes vec.
fn write_length_delimited_to_writer(
&self,
w: &mut Write
) -> Result<(), ProtobufError>
[src]
fn write_length_delimited_to_writer(
&self,
w: &mut Write
) -> Result<(), ProtobufError>
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>, ProtobufError>
[src]
fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length encoded as varint. Read more
fn type_id(&self) -> TypeId
[src]
fn type_id(&self) -> TypeId
Get type id for downcasting.
impl Clear for HardState
[src]
impl Clear for HardState
impl Debug for HardState
[src]
impl Debug for HardState
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl ProtobufValue for HardState
[src]
impl ProtobufValue for HardState
fn as_ref(&self) -> ProtobufValueRef
[src]
fn as_ref(&self) -> ProtobufValueRef
fn as_any(&self) -> &(Any + 'static)
[src]
fn as_any(&self) -> &(Any + 'static)
fn is_non_zero(&self) -> bool
[src]
fn is_non_zero(&self) -> bool
fn as_ref_copy(&self) -> ProtobufValueRef<'static>
[src]
fn as_ref_copy(&self) -> ProtobufValueRef<'static>