pub struct CommandTableEntry {
pub trigger: String,
pub title: String,
pub template: String,
}Expand description
One command of a host-supplied command table (/ mode). The host validates the table it read; the engine still skips a row it cannot use rather than trusting it.
template is literal text with three kinds of placeholder: {date} or {date:FORMAT}, {time} or {time:FORMAT}, and {weekday}. FORMAT is a strftime pattern (%Y-%m-%d), the defaults are %Y-%m-%d and %H:%M, and {weekday} is the Chinese day name (星期四). Any other brace, including one left unclosed, makes the row unusable.
Fields§
§trigger: String1..=32 lowercase ASCII letters, what the user types after /.
title: StringShown beside the row.
template: StringTrait Implementations§
Source§impl Clone for CommandTableEntry
impl Clone for CommandTableEntry
Source§impl Debug for CommandTableEntry
impl Debug for CommandTableEntry
impl Eq for CommandTableEntry
Source§impl PartialEq for CommandTableEntry
impl PartialEq for CommandTableEntry
impl StructuralPartialEq for CommandTableEntry
Auto Trait Implementations§
impl Freeze for CommandTableEntry
impl RefUnwindSafe for CommandTableEntry
impl Send for CommandTableEntry
impl Sync for CommandTableEntry
impl Unpin for CommandTableEntry
impl UnsafeUnpin for CommandTableEntry
impl UnwindSafe for CommandTableEntry
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§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.