pub enum Checkouts {
Repository,
This,
}Expand description
Which checkouts a reading of the server status covers.
The two answers cost differently and that is the whole reason the choice exists: the repository’s checkouts are read from git’s registry of them and each one costs a lease read and a probe, while this checkout alone costs one of each and enumerates nothing. The word each variant serialises to is the word the query parameter, the tool input and the command-line flag all take.
use majordomus_cli::capability::builtin::server::Checkouts;
assert_eq!(serde_json::to_value(Checkouts::This).unwrap(), "this");
assert_eq!(serde_json::to_value(Checkouts::Repository).unwrap(), "repository");
assert_eq!(Checkouts::default(), Checkouts::Repository, "the wide answer is what a caller who says nothing has always got");Variants§
Repository
Every checkout git registers for the repository, the primary first — a lease read and a probe each. The default, because it is the answer this capability gave before there was anything to ask.
This
This checkout alone. No other checkout is enumerated, no other lease is read and no
other server is probed; servers holds the one entry, and it is this one.
Trait Implementations§
impl Copy for Checkouts
Source§impl<'de> Deserialize<'de> for Checkouts
impl<'de> Deserialize<'de> for Checkouts
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 Checkouts
Source§impl JsonSchema for Checkouts
impl JsonSchema for Checkouts
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 Checkouts
Auto Trait Implementations§
impl Freeze for Checkouts
impl RefUnwindSafe for Checkouts
impl Send for Checkouts
impl Sync for Checkouts
impl Unpin for Checkouts
impl UnsafeUnpin for Checkouts
impl UnwindSafe for Checkouts
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.