pub enum Rejection {
Oversized,
Version,
Identity,
Signature,
Repository,
Untrusted,
Bounds,
Capacity,
ClockAhead,
}Expand description
Why an event was not stored. A journal that silently drops what it is sent is a journal
nobody can debug, so every refusal is counted under one of these reasons and shown: a
mesh whose runtimes will not converge can be diagnosed from the numbers, because the
reasons distinguish a misconfiguration (Repository, Untrusted) from an attack
(Signature, Identity) from a limit reached (Capacity, Oversized).
use majordomus_cli::mesh::journal::Rejection;
// the wire word is what a counter and a JSON report both carry
assert_eq!(serde_json::to_value(Rejection::Untrusted).unwrap(), serde_json::json!("untrusted"));
assert_ne!(Rejection::Untrusted, Rejection::Repository);Variants§
Oversized
Over MAX_EVENT_BYTES.
Version
An event format version this executable does not read.
Identity
The stream id, the key, or the key-to-node binding does not hold.
Signature
The signature does not verify.
Repository
Another repository’s event.
Untrusted
The origin is not trusted by this runtime’s policy.
Bounds
A known kind whose body is out of bounds.
Capacity
The journal’s stream or pending bound is full.
ClockAhead
The Lamport stamp is more than MAX_LAMPORT_LEAD ahead of this runtime’s clock.
Trait Implementations§
impl Copy for Rejection
Source§impl<'de> Deserialize<'de> for Rejection
impl<'de> Deserialize<'de> for Rejection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Rejection
Source§impl JsonSchema for Rejection
impl JsonSchema for Rejection
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for Rejection
impl Ord for Rejection
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Rejection
impl PartialOrd for Rejection
impl StructuralPartialEq for Rejection
Auto Trait Implementations§
impl Freeze for Rejection
impl RefUnwindSafe for Rejection
impl Send for Rejection
impl Sync for Rejection
impl Unpin for Rejection
impl UnsafeUnpin for Rejection
impl UnwindSafe for Rejection
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.