pub enum Visibility {
Private,
Public,
}Expand description
Who may read a repository without an explicit grant.
⚠ The meaning of
Visibility::Publicchanged on 2026-08-03. It used to mean “any authenticated principal may read”, because gunnar had no unauthenticated path at all and the field therefore honoured nothing a private repository did not already get from a grant. It now means what the word says: readable by anyone, with no key. An operator who marked a repository public under the old reading has published it under the new one.Visibility::Privateis still the default and is unchanged, and an appliance that must never serve a stranger turns the anonymous path off at the listener (SshConfig::without_anonymous_access).
Variants§
Private
Only principals with a grant. The default, and the only safe one.
A private repository is indistinguishable from one that does not exist to a caller who may not read it. The SSH dispatch answers both with the same string, so a stranger cannot enumerate private repositories one guess at a time.
Public
Readable by anyone, including a caller who presented no key at all
That is what PrincipalKind::Anonymous is for.
Read only, and only git-upload-pack. Writing still needs a grant, so
Level::Write and Level::Admin are unaffected by this field.
Trait Implementations§
Source§impl Clone for Visibility
impl Clone for Visibility
impl Copy for Visibility
Source§impl Debug for Visibility
impl Debug for Visibility
Source§impl Default for Visibility
impl Default for Visibility
Source§impl<'de> Deserialize<'de> for Visibility
impl<'de> Deserialize<'de> for Visibility
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Visibility
Source§impl Hash for Visibility
impl Hash for Visibility
Source§impl Ord for Visibility
impl Ord for Visibility
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Visibility
impl PartialEq for Visibility
Source§impl PartialOrd for Visibility
impl PartialOrd for Visibility
Source§impl Serialize for Visibility
impl Serialize for Visibility
impl StructuralPartialEq for Visibility
Auto Trait Implementations§
impl Freeze for Visibility
impl RefUnwindSafe for Visibility
impl Send for Visibility
impl Sync for Visibility
impl Unpin for Visibility
impl UnsafeUnpin for Visibility
impl UnwindSafe for Visibility
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.