pub struct ChannelRule {
pub kind: i32,
pub channel: i32,
pub actor_origin: i32,
pub routing: i32,
}Expand description
One cell of the preference matrix: for a (kind, channel, actor_origin) key,
route matching notifications per routing. A rule with the UNSPECIFIED kind
or channel acts as a wildcard default for that axis.
Fields§
§kind: i32§channel: i32§actor_origin: i32§routing: i32Implementations§
Source§impl ChannelRule
impl ChannelRule
Sourcepub fn kind(&self) -> NotificationKind
pub fn kind(&self) -> NotificationKind
Returns the enum value of kind, or the default if the field is set to an invalid enum value.
Sourcepub fn set_kind(&mut self, value: NotificationKind)
pub fn set_kind(&mut self, value: NotificationKind)
Sets kind to the provided enum value.
Sourcepub fn channel(&self) -> NotificationChannel
pub fn channel(&self) -> NotificationChannel
Returns the enum value of channel, or the default if the field is set to an invalid enum value.
Sourcepub fn set_channel(&mut self, value: NotificationChannel)
pub fn set_channel(&mut self, value: NotificationChannel)
Sets channel to the provided enum value.
Sourcepub fn actor_origin(&self) -> ActorOrigin
pub fn actor_origin(&self) -> ActorOrigin
Returns the enum value of actor_origin, or the default if the field is set to an invalid enum value.
Sourcepub fn set_actor_origin(&mut self, value: ActorOrigin)
pub fn set_actor_origin(&mut self, value: ActorOrigin)
Sets actor_origin to the provided enum value.
Sourcepub fn routing(&self) -> NotificationRouting
pub fn routing(&self) -> NotificationRouting
Returns the enum value of routing, or the default if the field is set to an invalid enum value.
Sourcepub fn set_routing(&mut self, value: NotificationRouting)
pub fn set_routing(&mut self, value: NotificationRouting)
Sets routing to the provided enum value.
Trait Implementations§
Source§impl Clone for ChannelRule
impl Clone for ChannelRule
Source§fn clone(&self) -> ChannelRule
fn clone(&self) -> ChannelRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChannelRule
Source§impl Debug for ChannelRule
impl Debug for ChannelRule
Source§impl Default for ChannelRule
impl Default for ChannelRule
impl Eq for ChannelRule
Source§impl Hash for ChannelRule
impl Hash for ChannelRule
Source§impl Message for ChannelRule
impl Message for ChannelRule
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ChannelRule
impl PartialEq for ChannelRule
impl StructuralPartialEq for ChannelRule
Auto Trait Implementations§
impl Freeze for ChannelRule
impl RefUnwindSafe for ChannelRule
impl Send for ChannelRule
impl Sync for ChannelRule
impl Unpin for ChannelRule
impl UnsafeUnpin for ChannelRule
impl UnwindSafe for ChannelRule
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