#[non_exhaustive]pub enum RefWireError {
Unspecified,
IdNotEmpty(RefExpectationWire),
BadDigest {
field: DigestField,
len: Option<usize>,
},
}Expand description
A malformed ref or digest field. Every variant is
Code::InvalidArgument; the two message methods keep today’s text for
each wire family, as crate::upload::UploadError does.
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.
Unspecified
The expectation is unspecified or an unknown number.
IdNotEmpty(RefExpectationWire)
ANY or MISSING (the payload) carried a non-empty expected_id.
BadDigest
A digest field that is absent (len: None) or not 32 bytes long.
Implementations§
Source§impl RefWireError
impl RefWireError
Sourcepub const fn code(self) -> Code
pub const fn code(self) -> Code
Always Code::InvalidArgument.
Sourcepub const fn ssh_message(self) -> &'static str
pub const fn ssh_message(self) -> &'static str
mkit serve’s message, verbatim. The ssh wire ignores a non-empty
expected_id for ANY/MISSING, so IdNotEmpty never reaches it and
borrows vcs-worker’s text.
Sourcepub fn connect_message(self) -> Cow<'static, str>
pub fn connect_message(self) -> Cow<'static, str>
mkit-transport-connect’s message, verbatim.
Trait Implementations§
Source§impl Clone for RefWireError
impl Clone for RefWireError
impl Copy for RefWireError
Source§impl Debug for RefWireError
impl Debug for RefWireError
impl Eq for RefWireError
Source§impl From<RefWireError> for ServerError
impl From<RefWireError> for ServerError
Source§fn from(err: RefWireError) -> Self
fn from(err: RefWireError) -> Self
The Connect code and message.
Source§impl PartialEq for RefWireError
impl PartialEq for RefWireError
impl StructuralPartialEq for RefWireError
Auto Trait Implementations§
impl Freeze for RefWireError
impl RefUnwindSafe for RefWireError
impl Send for RefWireError
impl Sync for RefWireError
impl Unpin for RefWireError
impl UnsafeUnpin for RefWireError
impl UnwindSafe for RefWireError
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