Enum valence_text::ClickEvent
source · pub enum ClickEvent {
OpenUrl(Cow<'static, str>),
OpenFile(Cow<'static, str>),
RunCommand(Cow<'static, str>),
SuggestCommand(Cow<'static, str>),
ChangePage(i32),
CopyToClipboard(Cow<'static, str>),
}
Expand description
Action to take on click of the text.
Variants§
OpenUrl(Cow<'static, str>)
Opens an URL
OpenFile(Cow<'static, str>)
Only usable by internal servers for security reasons.
RunCommand(Cow<'static, str>)
Sends a chat command. Doesn’t actually have to be a command, can be a normal chat message.
SuggestCommand(Cow<'static, str>)
Replaces the contents of the chat box with the text, not necessarily a command.
ChangePage(i32)
Only usable within written books. Changes the page of the book. Indexing starts at 1.
CopyToClipboard(Cow<'static, str>)
Copies the given text to clipboard
Trait Implementations§
source§impl Clone for ClickEvent
impl Clone for ClickEvent
source§fn clone(&self) -> ClickEvent
fn clone(&self) -> ClickEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ClickEvent
impl Debug for ClickEvent
source§impl<'de> Deserialize<'de> for ClickEvent
impl<'de> Deserialize<'de> for ClickEvent
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ClickEvent
impl PartialEq for ClickEvent
source§impl Serialize for ClickEvent
impl Serialize for ClickEvent
impl StructuralPartialEq for ClickEvent
Auto Trait Implementations§
impl Freeze for ClickEvent
impl RefUnwindSafe for ClickEvent
impl Send for ClickEvent
impl Sync for ClickEvent
impl Unpin for ClickEvent
impl UnwindSafe for ClickEvent
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)