pub enum SampleKind {
Put,
Delete,
Query,
Reply,
ReplyErr,
Get,
}Expand description
What carries an envelope or a form, its sample (core §7.5): the parser knows it, and nothing more.
Variants§
Put
A put’s payload, or the payload of a GET’s reply that represents a put (S2) or carries a snapshot: a mutation, a heartbeat, a frame or a snapshot.
Delete
A delete’s attachment, or a reply_del’s (S2): a delete.
Query
A call’s query, its payload: a value with no stamp, a request.
Reply
A call’s reply, its payload: a value. Never a GET’s reply that
represents a put, which is a SampleKind::Put.
ReplyErr
A call’s reply_err, its payload: an error.
Get
A state GET’s query, its payload (core 0.110): a held stamp, form
7 with no body (HeldStamp::parse). Never a call’s query, which
is a SampleKind::Query.
Implementations§
Source§impl SampleKind
impl SampleKind
Sourcepub const ALL: [SampleKind; 6]
pub const ALL: [SampleKind; 6]
Every sample, in §7.5’s order: a put, a delete and a call’s three,
then a state GET’s payload, which core 0.110 added. A loop over it
meets SampleKind::Get, which carries a snapshot’s form alone, as
a held stamp, and is parsed by HeldStamp::parse, never by
Envelope::parse or a call’s readers.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
put, delete, query, reply or reply_err, as the fixtures
spell it, and get for a state GET’s payload.
Sourcepub const fn carries(self, form: Form) -> bool
pub const fn carries(self, form: Form) -> bool
Whether the sample carries the form: a put a mutation, an event, a
heartbeat, a frame or a snapshot, a delete’s attachment a delete, a
query and a reply a value, a reply_err an error, and a state GET
a snapshot’s form, as a held stamp. No sample carries a reserved
one.
Trait Implementations§
Source§impl Clone for SampleKind
impl Clone for SampleKind
impl Copy for SampleKind
Source§impl Debug for SampleKind
impl Debug for SampleKind
Source§impl Display for SampleKind
impl Display for SampleKind
impl Eq for SampleKind
Source§impl Hash for SampleKind
impl Hash for SampleKind
Source§impl PartialEq for SampleKind
impl PartialEq for SampleKind
impl StructuralPartialEq for SampleKind
Auto Trait Implementations§
impl Forget for SampleKind
impl Freeze for SampleKind
impl Move for SampleKind
impl RefUnwindSafe for SampleKind
impl Send for SampleKind
impl Sync for SampleKind
impl Unpin for SampleKind
impl UnsafeUnpin for SampleKind
impl UnwindSafe for SampleKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more