pub enum ProtocolVersion {
V0,
V1,
V2,
}Expand description
Wire protocol version requested by the client.
Version 1 is version 0 with an explicit version 1 line in front of the
advertisement. Version 2 replaces the ref advertisement with a capability
list and command requests.
Variants§
V0
The original protocol, used when the client asks for nothing else.
V1
Version 0 framing announced with a version 1 line.
V2
Command-based protocol version 2.
Implementations§
Source§impl ProtocolVersion
impl ProtocolVersion
Sourcepub fn from_git_protocol(value: &str) -> Self
pub fn from_git_protocol(value: &str) -> Self
Pick the highest version named in a GIT_PROTOCOL style value.
The value is a colon-separated list of key=value entries; only
version=N entries are considered. Unknown or missing versions fall
back to ProtocolVersion::V0.
§Parameters
value: the raw value, for exampleversion=2orversion=2:foo=bar.
§Returns
The highest supported version the value asks for.
Trait Implementations§
Source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
impl Copy for ProtocolVersion
Source§impl Debug for ProtocolVersion
impl Debug for ProtocolVersion
Source§impl Default for ProtocolVersion
impl Default for ProtocolVersion
impl Eq for ProtocolVersion
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnsafeUnpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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.