pub struct FactAccess {
pub privacy: FactPrivacy,
pub channel_id: Option<String>,
}Expand description
Who may see a stored fact or episode. The default is the narrowest level,
FactPrivacy::Private, so a record nobody classified stays out of
shared channels.
Fields§
§privacy: FactPrivacy§channel_id: Option<String>The originating channel; only meaningful with FactPrivacy::Channel.
Implementations§
Source§impl FactAccess
impl FactAccess
Sourcepub fn channel(channel_id: impl Into<String>) -> Self
pub fn channel(channel_id: impl Into<String>) -> Self
Only in channel_id (and the owner’s direct messages).
Sourcepub fn from_stored(privacy: &str, channel_id: Option<String>) -> Self
pub fn from_stored(privacy: &str, channel_id: Option<String>) -> Self
Read from stored text. Anything unrecognized, and a channel level with no channel, is private: never widen on data this build cannot read.
Trait Implementations§
Source§impl Clone for FactAccess
impl Clone for FactAccess
Source§impl Debug for FactAccess
impl Debug for FactAccess
Source§impl Default for FactAccess
impl Default for FactAccess
Source§impl<'de> Deserialize<'de> for FactAccess
impl<'de> Deserialize<'de> for FactAccess
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FactAccess
Source§impl PartialEq for FactAccess
impl PartialEq for FactAccess
Source§impl Serialize for FactAccess
impl Serialize for FactAccess
impl StructuralPartialEq for FactAccess
Auto Trait Implementations§
impl Forget for FactAccess
impl Freeze for FactAccess
impl Move for FactAccess
impl RefUnwindSafe for FactAccess
impl Send for FactAccess
impl Sync for FactAccess
impl Unpin for FactAccess
impl UnsafeUnpin for FactAccess
impl UnwindSafe for FactAccess
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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 more