pub enum Command {
LsRefs,
Fetch,
}
Expand description
A selector for V2 commands to invoke on the server for purpose of pre-invocation validation.
Variants§
Implementations§
Source§impl Command
impl Command
Sourcepub fn initial_v2_arguments(&self, features: &[Feature]) -> Vec<BString>
Available on crate features async-client
or blocking-client
only.
pub fn initial_v2_arguments(&self, features: &[Feature]) -> Vec<BString>
async-client
or blocking-client
only.Provide the initial arguments based on the given features
.
They are typically provided by the Self::default_features
method.
Only useful for V2, and based on heuristics/experimentation.
Sourcepub fn default_features(
&self,
version: Protocol,
server_capabilities: &Capabilities,
) -> Vec<Feature>
Available on crate features async-client
or blocking-client
only.
pub fn default_features( &self, version: Protocol, server_capabilities: &Capabilities, ) -> Vec<Feature>
async-client
or blocking-client
only.Turns on all modern features for V1 and all supported features for V2, returning them as a vector of features. Note that this is the basis for any fetch operation as these features fulfil basic requirements and reasonably up-to-date servers.
Sourcepub fn validate_argument_prefixes(
&self,
version: Protocol,
server: &Capabilities,
arguments: &[BString],
features: &[Feature],
) -> Result<(), Error>
Available on crate features async-client
or blocking-client
only.
pub fn validate_argument_prefixes( &self, version: Protocol, server: &Capabilities, arguments: &[BString], features: &[Feature], ) -> Result<(), Error>
async-client
or blocking-client
only.Return an error if the given arguments
and features
don’t match what’s statically known.
Trait Implementations§
Source§impl Ord for Command
impl Ord for Command
Source§impl PartialOrd for Command
impl PartialOrd for Command
impl Copy for Command
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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