pub struct NotificationPreferences {
pub version: Vec<u8>,
pub rules: Vec<NotificationRule>,
pub digest_interval: Option<Duration>,
pub timezone: String,
pub digest_overrides: Vec<NotificationDigestOverride>,
pub effective_delivery: Vec<EffectiveDelivery>,
pub next_digest_at: Option<Timestamp>,
}Expand description
Stored settings and weft-owned read projections are distinct. The inbox is the record and never waits for an email digest. ObserveNotifications with include_preferences returns all these fields in the same preferences payload.
Fields§
§version: Vec<u8>§rules: Vec<NotificationRule>§digest_interval: Option<Duration>Email-only account cadence: zero disables scheduled digest email; supported nonzero intervals are one hour, one day and one week. Supplied durations require zero nanos and seconds in {0, 3600, 86400, 604800}, otherwise INVALID_ARGUMENT / FIELD_INVALID. Absence uses weft’s daily default. This does not delay inbox items or push.
timezone: StringIANA timezone anchoring email digest windows; empty uses weft’s default.
digest_overrides: Vec<NotificationDigestOverride>One override per Spool. Removing an override restores the account default. Cadence can be overridden without overriding any routing rules.
effective_delivery: Vec<EffectiveDelivery>Read-only resolved cells: complete account matrix plus sparse cells ONLY for currently readable Spool scopes having local routing rules. Within those scopes emit cells differing from account fallback in delivery, source, source_spool or locked (account RULE becomes ACCOUNT at a Spool). Never enumerate rule-free descendants. Omitted scopes say nothing about their effective delivery: use ObserveNotifications.effective_delivery_spool for one Spool’s complete matrix, including inherited provenance. With that filter, emit ALL cells for the selected Spool, not the sparse account diff. Unique by (kind, spool, actor_origin, channel), at most 4096 cells and 1 MiB for the entire preferences message. Oversize reads fail RESOURCE_EXHAUSTED / QUOTA_EXCEEDED, never truncate. Only readable event scopes are disclosed. Weft owns defaults and precedence. Locked email is always IMMEDIATE.
next_digest_at: Option<Timestamp>Read-only next account email digest window, absent when its effective interval is off. A schedule projection, not a promise of queued email.
Trait Implementations§
Source§impl Clone for NotificationPreferences
impl Clone for NotificationPreferences
Source§fn clone(&self) -> NotificationPreferences
fn clone(&self) -> NotificationPreferences
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotificationPreferences
impl Debug for NotificationPreferences
Source§impl Default for NotificationPreferences
impl Default for NotificationPreferences
Source§fn default() -> NotificationPreferences
fn default() -> NotificationPreferences
Source§impl Message for NotificationPreferences
impl Message for NotificationPreferences
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for NotificationPreferences
impl PartialEq for NotificationPreferences
impl StructuralPartialEq for NotificationPreferences
Auto Trait Implementations§
impl Freeze for NotificationPreferences
impl RefUnwindSafe for NotificationPreferences
impl Send for NotificationPreferences
impl Sync for NotificationPreferences
impl Unpin for NotificationPreferences
impl UnsafeUnpin for NotificationPreferences
impl UnwindSafe for NotificationPreferences
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
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<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> ⓘ
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> ⓘ
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