pub enum RepoPathError {
Empty,
NotTwoSegments,
EmptyNamespace,
EmptyRepo,
IllegalCharacter(&'static str),
TooManyComponents,
}Expand description
Why a <namespace>/<repo> string was rejected.
This is a shape check, not the SSH path sandbox. That one guards a
resolved filesystem-ish path and lives in gunnar-core. This one exists so
a malformed path is rejected at the edge of the control plane with a
specific reason rather than becoming a confusing NotFound. It is
deliberately the laxer of the two: everything the sandbox accepts must
pass here, and the sandbox itself is what refuses the rest one layer
down.
Variants§
Empty
NotTwoSegments
No / at all, or a / in the repository half, which is one component
by definition however deeply the namespace nests.
EmptyNamespace
EmptyRepo
IllegalCharacter(&'static str)
., .., a NUL, a control character, a backslash or a colon.
TooManyComponents
More than MAX_COMPONENTS components: namespace levels plus the
repository name.
Trait Implementations§
Source§impl Clone for RepoPathError
impl Clone for RepoPathError
Source§impl Debug for RepoPathError
impl Debug for RepoPathError
Source§impl Display for RepoPathError
impl Display for RepoPathError
impl Eq for RepoPathError
Source§impl Error for RepoPathError
impl Error for RepoPathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RepoPathError
impl PartialEq for RepoPathError
impl StructuralPartialEq for RepoPathError
Auto Trait Implementations§
impl Freeze for RepoPathError
impl RefUnwindSafe for RepoPathError
impl Send for RepoPathError
impl Sync for RepoPathError
impl Unpin for RepoPathError
impl UnsafeUnpin for RepoPathError
impl UnwindSafe for RepoPathError
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<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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request