#[non_exhaustive]pub enum PromisorField {
PartialCloneFilter,
Token,
}Expand description
An optional per-remote field the promisor-remote capability can carry besides
name and url.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PartialCloneFilter
The partial-clone filter the remote is meant to be used with
(remote.<name>.partialCloneFilter).
Token
An authentication token for the remote (remote.<name>.token).
Implementations§
Source§impl PromisorField
impl PromisorField
Sourcepub const fn wire_name(self) -> &'static str
pub const fn wire_name(self) -> &'static str
The field name as it appears on the wire (case-sensitive).
§Returns
"partialCloneFilter" or "token".
Sourcepub const fn config_key(self) -> &'static str
pub const fn config_key(self) -> &'static str
The canonical (lowercase) last component of the remote.<name>.<field> config key.
§Returns
"partialclonefilter" or "token".
Sourcepub fn parse_list(raw: &str) -> (Vec<Self>, Vec<String>)
pub fn parse_list(raw: &str) -> (Vec<Self>, Vec<String>)
Parse a comma or whitespace separated field list, as in promisor.sendFields.
Names are matched case-insensitively. Duplicates are kept only once.
§Parameters
raw: the config value, for example"partialCloneFilter, token".
§Returns
The known fields in the order given, and every name that is not a known field.
Trait Implementations§
Source§impl Clone for PromisorField
impl Clone for PromisorField
impl Copy for PromisorField
Source§impl Debug for PromisorField
impl Debug for PromisorField
impl Eq for PromisorField
Source§impl Hash for PromisorField
impl Hash for PromisorField
Source§impl PartialEq for PromisorField
impl PartialEq for PromisorField
impl StructuralPartialEq for PromisorField
Auto Trait Implementations§
impl Freeze for PromisorField
impl RefUnwindSafe for PromisorField
impl Send for PromisorField
impl Sync for PromisorField
impl Unpin for PromisorField
impl UnsafeUnpin for PromisorField
impl UnwindSafe for PromisorField
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
Mutably borrows from an owned value. Read more
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.