pub enum VisibilityLevel {
Public,
Verified,
SecondDegree,
Follower,
Connected,
Direct,
}Expand description
Visibility levels for resources (files, actions, profile fields)
Stored as single char in database:
- None/NULL = Direct (most restrictive, owner + explicit audience only)
- ‘P’ = Public (anyone, including unauthenticated)
- ‘V’ = Verified (any authenticated user from any federated instance)
- ‘2’ = 2nd degree (friend of friend, reserved for future voucher token system)
- ‘F’ = Follower (authenticated user who follows the owner)
- ‘C’ = Connected (authenticated user who is connected/mutual with owner)
Hierarchy (from most permissive to most restrictive): Public > Verified > 2nd Degree > Follower > Connected > Direct
Variants§
Public
Anyone can access, including unauthenticated users
Verified
Any authenticated user from any federated instance
SecondDegree
Friend of friend (2nd degree connection) - reserved for voucher token system
Follower
Authenticated user who follows the owner
Connected
Authenticated user who is connected (mutual) with owner
Direct
Most restrictive - only owner and explicit audience
Implementations§
Trait Implementations§
Source§impl Clone for VisibilityLevel
impl Clone for VisibilityLevel
Source§fn clone(&self) -> VisibilityLevel
fn clone(&self) -> VisibilityLevel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VisibilityLevel
impl Debug for VisibilityLevel
Source§impl Default for VisibilityLevel
impl Default for VisibilityLevel
Source§fn default() -> VisibilityLevel
fn default() -> VisibilityLevel
Returns the “default value” for a type. Read more
Source§impl Ord for VisibilityLevel
impl Ord for VisibilityLevel
Source§fn cmp(&self, other: &VisibilityLevel) -> Ordering
fn cmp(&self, other: &VisibilityLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VisibilityLevel
impl PartialEq for VisibilityLevel
Source§impl PartialOrd for VisibilityLevel
impl PartialOrd for VisibilityLevel
impl Copy for VisibilityLevel
impl Eq for VisibilityLevel
impl StructuralPartialEq for VisibilityLevel
Auto Trait Implementations§
impl Freeze for VisibilityLevel
impl RefUnwindSafe for VisibilityLevel
impl Send for VisibilityLevel
impl Sync for VisibilityLevel
impl Unpin for VisibilityLevel
impl UnsafeUnpin for VisibilityLevel
impl UnwindSafe for VisibilityLevel
Blanket Implementations§
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
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> Comparable<K> for Q
impl<Q, K> Comparable<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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().