pub enum Standing {
Selected,
Excluded,
Deduplicated,
NotReached,
Unknown,
}Expand description
What one identifier’s standing in a compiled context is. Where one identifier stands with respect to a compiled context.
The pair to be careful about is NotReached and Unknown, because they look alike in a
rendering and mean opposite things. NotReached says the index holds the object and this
request did not reach it — the request is what to change, and raising the depth or the
budget may well bring it in. Unknown says the index holds nothing under that
identifier: the request is fine and the identifier is wrong, or the object is not in
this repository. Collapsing the two would send a reader to tune a request that was never
the problem.
Deduplicated is the third one worth naming: the thing is in the answer, under another
identifier, which is neither in nor out.
use majordomus_cli::devcontext::Standing;
// in the answer, one way or another
let present = [Standing::Selected, Standing::Deduplicated];
// reached and not given, so the request is what to change
let request_bound = [Standing::Excluded, Standing::NotReached];
for s in present {
assert!(!request_bound.contains(&s));
}
// the two that must not be confused: one is the request's fault, one is not
assert_eq!(Standing::NotReached.as_str(), "not_reached");
assert_ne!(Standing::NotReached, Standing::Unknown);
assert_eq!(
serde_json::to_value(Standing::NotReached).unwrap(),
serde_json::json!(Standing::NotReached.as_str()),
);Variants§
Selected
In the answer.
Excluded
Reached and not given; the exclusion says why.
Deduplicated
Folded into another identifier, or dropped for one.
NotReached
The index holds it and this request never reached it.
Unknown
The index holds nothing under that identifier.
Implementations§
Trait Implementations§
impl Copy for Standing
Source§impl<'de> Deserialize<'de> for Standing
impl<'de> Deserialize<'de> for Standing
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 Standing
Source§impl JsonSchema for Standing
impl JsonSchema for Standing
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 moreimpl StructuralPartialEq for Standing
Auto Trait Implementations§
impl Freeze for Standing
impl RefUnwindSafe for Standing
impl Send for Standing
impl Sync for Standing
impl Unpin for Standing
impl UnsafeUnpin for Standing
impl UnwindSafe for Standing
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<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.