#[repr(i32)]pub enum RefExpectation {
REF_EXPECTATION_UNSPECIFIED = 0,
REF_EXPECTATION_ANY = 1,
REF_EXPECTATION_MISSING = 2,
REF_EXPECTATION_MATCH = 3,
}Expand description
CAS semantics for ref-update RPCs across every mkit wire protocol. Wire numbers are load-bearing. Do NOT renumber; new variants append.
Variants§
REF_EXPECTATION_UNSPECIFIED = 0
Protocol error if sent (the proto default). Servers MUST reject.
REF_EXPECTATION_ANY = 1
“Clobber” / last-writer-wins. expected_id MUST be empty.
REF_EXPECTATION_MISSING = 2
“Create only”. The ref MUST NOT already exist. expected_id MUST
be empty. (ANY overwrites an existing ref; MISSING conflicts on
it.)
REF_EXPECTATION_MATCH = 3
Compare-and-swap. expected_id MUST be the 32-byte current value.
Implementations§
Source§impl RefExpectation
impl RefExpectation
Sourcepub const Unspecified: Self = Self::REF_EXPECTATION_UNSPECIFIED
pub const Unspecified: Self = Self::REF_EXPECTATION_UNSPECIFIED
Idiomatic alias for Self::REF_EXPECTATION_UNSPECIFIED; Debug prints the variant name.
Sourcepub const Any: Self = Self::REF_EXPECTATION_ANY
pub const Any: Self = Self::REF_EXPECTATION_ANY
Idiomatic alias for Self::REF_EXPECTATION_ANY; Debug prints the variant name.
Sourcepub const Missing: Self = Self::REF_EXPECTATION_MISSING
pub const Missing: Self = Self::REF_EXPECTATION_MISSING
Idiomatic alias for Self::REF_EXPECTATION_MISSING; Debug prints the variant name.
Sourcepub const Match: Self = Self::REF_EXPECTATION_MATCH
pub const Match: Self = Self::REF_EXPECTATION_MATCH
Idiomatic alias for Self::REF_EXPECTATION_MATCH; Debug prints the variant name.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for RefExpectation
Available on crate feature arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for RefExpectation
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for RefExpectation
impl Clone for RefExpectation
impl Copy for RefExpectation
Source§impl Debug for RefExpectation
impl Debug for RefExpectation
Source§impl Default for RefExpectation
impl Default for RefExpectation
Source§impl Enumeration for RefExpectation
impl Enumeration for RefExpectation
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
.proto file.