pub struct RecallAudience {
pub visibility: ChannelVisibility,
pub channel_id: Option<String>,
pub requester_is_owner: bool,
}Expand description
Who a recall is for, as the host knows it. Uses the same visibility rule as the daemon’s own store.
Fields§
§visibility: ChannelVisibility§channel_id: Option<String>§requester_is_owner: boolImplementations§
Source§impl RecallAudience
impl RecallAudience
pub fn new( visibility: ChannelVisibility, channel_id: Option<String>, requester_is_owner: bool, ) -> Self
Sourcepub fn from_stored(
visibility: &str,
channel_id: Option<String>,
requester_is_owner: bool,
) -> Self
pub fn from_stored( visibility: &str, channel_id: Option<String>, requester_is_owner: bool, ) -> Self
From a host’s stored visibility text. An unrecognized value is the
most restrictive visibility, unlike
ChannelVisibility::from_str_lossy, which defaults to Internal.
Sourcepub fn may_see(&self, access: Option<&FactAccess>) -> bool
pub fn may_see(&self, access: Option<&FactAccess>) -> bool
Whether this audience may see a record with access. None means
the store could not say, which is treated as private.
Sourcepub fn sees_everything(&self) -> bool
pub fn sees_everything(&self) -> bool
Sees every record whatever its access, so no lookup is needed.
Sourcepub fn access_for_writes(&self) -> FactAccess
pub fn access_for_writes(&self) -> FactAccess
The access of something learned in this audience’s conversation:
a shared channel’s record stays in that channel, anything else is
private. Sharing wider is a deliberate call to
crate::Memory::remember_with.
Trait Implementations§
Source§impl Clone for RecallAudience
impl Clone for RecallAudience
Source§impl Debug for RecallAudience
impl Debug for RecallAudience
impl Eq for RecallAudience
Source§impl PartialEq for RecallAudience
impl PartialEq for RecallAudience
impl StructuralPartialEq for RecallAudience
Auto Trait Implementations§
impl Forget for RecallAudience
impl Freeze for RecallAudience
impl Move for RecallAudience
impl RefUnwindSafe for RecallAudience
impl Send for RecallAudience
impl Sync for RecallAudience
impl Unpin for RecallAudience
impl UnsafeUnpin for RecallAudience
impl UnwindSafe for RecallAudience
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,
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