pub struct DogVersion {
pub version: String,
pub protocol: Option<u32>,
}Expand description
What a dog answered VERSION_FLAG with, parsed by
parse_version_answer from the format docs/dogs.md publishes.
Two fields rather than one, because they answer different questions:
protocol decides whether the dog can handshake at all, and version
only says which build it is. A dog may give the second and not the
first, which is why protocol is optional and an absent one reads as
unknown rather than as a fault.
Fields§
§version: StringThe last whitespace-separated field of line 1, the version. The name before it is ignored, so a crate whose name differs from the dog’s registered name answers correctly without knowing it.
protocol: Option<u32>The shep-protocol line’s value, and None when the answer carried
no such line or carried one that is not a decimal number. Answering
is optional, so None is an unknown protocol rather than a fault.
Trait Implementations§
Source§impl Debug for DogVersion
impl Debug for DogVersion
impl Eq for DogVersion
Source§impl PartialEq for DogVersion
impl PartialEq for DogVersion
impl StructuralPartialEq for DogVersion
Auto Trait Implementations§
impl Freeze for DogVersion
impl RefUnwindSafe for DogVersion
impl Send for DogVersion
impl Sync for DogVersion
impl Unpin for DogVersion
impl UnsafeUnpin for DogVersion
impl UnwindSafe for DogVersion
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
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
key and return true if they are equal.