#[repr(i32)]pub enum WriteAction {
Stat = 0,
Write = 1,
Commit = 2,
}
Expand description
WriteAction defines the behavior of a WriteRequest.
Variants§
Stat = 0
WriteActionStat instructs the writer to return the current status while holding the lock on the write.
Write = 1
WriteActionWrite sets the action for the write request to write data.
Any data included will be written at the provided offset. The transaction will be left open for further writes.
This is the default.
Commit = 2
WriteActionCommit will write any outstanding data in the message and commit the write, storing it under the digest.
This can be used in a single message to send the data, verify it and commit it.
This action will always terminate the write.
Implementations§
source§impl WriteAction
impl WriteAction
source§impl WriteAction
impl WriteAction
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 WriteAction
impl Clone for WriteAction
source§fn clone(&self) -> WriteAction
fn clone(&self) -> WriteAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WriteAction
impl Debug for WriteAction
source§impl Default for WriteAction
impl Default for WriteAction
source§fn default() -> WriteAction
fn default() -> WriteAction
source§impl From<WriteAction> for i32
impl From<WriteAction> for i32
source§fn from(value: WriteAction) -> i32
fn from(value: WriteAction) -> i32
source§impl Hash for WriteAction
impl Hash for WriteAction
source§impl Ord for WriteAction
impl Ord for WriteAction
source§fn cmp(&self, other: &WriteAction) -> Ordering
fn cmp(&self, other: &WriteAction) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for WriteAction
impl PartialEq for WriteAction
source§impl PartialOrd for WriteAction
impl PartialOrd for WriteAction
source§impl TryFrom<i32> for WriteAction
impl TryFrom<i32> for WriteAction
source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<WriteAction, UnknownEnumValue>
fn try_from(value: i32) -> Result<WriteAction, UnknownEnumValue>
impl Copy for WriteAction
impl Eq for WriteAction
impl StructuralPartialEq for WriteAction
Auto Trait Implementations§
impl Freeze for WriteAction
impl RefUnwindSafe for WriteAction
impl Send for WriteAction
impl Sync for WriteAction
impl Unpin for WriteAction
impl UnwindSafe for WriteAction
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§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
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
key
and return true
if they are equal.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> 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