pub enum RenderMode {
Server,
Native,
Both,
}Expand description
Who renders the strings a device shows, per category.
Only ever applies to a Message::Localizable. A caller that passes a
rendered Notification gets exactly what it wrote, loc included — the
native passthrough documented before this issue keeps working untouched.
Variants§
Server
The server renders, in the recipient’s own language. The default, and the only thing a browser can be sent.
Native
The app renders, from strings it ships. APNs and FCM get the
caller’s Localizable::loc keys, and the text beside them is the
venture’s default locale — a fallback for a device whose app is
too old to have the key, nothing more.
Both
Both: the app’s keys and the server’s text in the recipient’s own language. The OS uses the app’s strings where the key exists and falls back to ours where it does not.
Implementations§
Source§impl RenderMode
impl RenderMode
Sourcepub fn sends_loc_keys(self) -> bool
pub fn sends_loc_keys(self) -> bool
Whether a token transport should be sent the app’s own keys.
Sourcepub fn renders_for_recipient(self) -> bool
pub fn renders_for_recipient(self) -> bool
Whether the text beside those keys is rendered in the recipient’s language, or in the venture’s default.
Trait Implementations§
Source§impl Clone for RenderMode
impl Clone for RenderMode
impl Copy for RenderMode
Source§impl Debug for RenderMode
impl Debug for RenderMode
Source§impl Default for RenderMode
impl Default for RenderMode
Source§impl<'de> Deserialize<'de> for RenderMode
impl<'de> Deserialize<'de> for RenderMode
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>,
Source§impl Display for RenderMode
impl Display for RenderMode
impl Eq for RenderMode
Source§impl PartialEq for RenderMode
impl PartialEq for RenderMode
Source§impl Serialize for RenderMode
impl Serialize for RenderMode
impl StructuralPartialEq for RenderMode
Auto Trait Implementations§
impl Freeze for RenderMode
impl RefUnwindSafe for RenderMode
impl Send for RenderMode
impl Sync for RenderMode
impl Unpin for RenderMode
impl UnsafeUnpin for RenderMode
impl UnwindSafe for RenderMode
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
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§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
key and return true if they are equal.