Enum lobsterchat::component::ClickEvent
source · [−]pub enum ClickEvent {
OpenUrl(String),
RunCommand(String),
SuggestCommand(String),
ChangePage(String),
CopyToClipboard(String),
}
Expand description
Container for click events See wiki.vg for more info.
Variants
OpenUrl(String)
Opens the provided URL on click
RunCommand(String)
Runs the provided command on click
SuggestCommand(String)
Suggests (puts in the chat box) the provided command on click
ChangePage(String)
Changes current open book’s page
CopyToClipboard(String)
Copies provided data to clipboard
Implementations
sourceimpl ClickEvent
impl ClickEvent
sourcepub fn run_command<S: Into<String>>(cmd: S) -> Self
pub fn run_command<S: Into<String>>(cmd: S) -> Self
Runs the provided command on click
sourcepub fn suggest_command<S: Into<String>>(cmd: S) -> Self
pub fn suggest_command<S: Into<String>>(cmd: S) -> Self
Suggests (puts in the chat box) the provided command on click
sourcepub fn change_page(page: i32) -> Self
pub fn change_page(page: i32) -> Self
Changes current open book’s page7
sourcepub fn copy_to_clipboard<S: Into<String>>(msg: S) -> Self
pub fn copy_to_clipboard<S: Into<String>>(msg: S) -> Self
Copies provided data to clipboard
Trait Implementations
sourceimpl Clone for ClickEvent
impl Clone for ClickEvent
sourcefn clone(&self) -> ClickEvent
fn clone(&self) -> ClickEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ClickEvent
impl Debug for ClickEvent
sourceimpl<'de> Deserialize<'de> for ClickEvent
impl<'de> Deserialize<'de> for ClickEvent
sourcefn 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
sourceimpl PartialEq<ClickEvent> for ClickEvent
impl PartialEq<ClickEvent> for ClickEvent
sourcefn eq(&self, other: &ClickEvent) -> bool
fn eq(&self, other: &ClickEvent) -> bool
sourceimpl PartialOrd<ClickEvent> for ClickEvent
impl PartialOrd<ClickEvent> for ClickEvent
sourcefn partial_cmp(&self, other: &ClickEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &ClickEvent) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl Serialize for ClickEvent
impl Serialize for ClickEvent
impl StructuralPartialEq for ClickEvent
Auto Trait Implementations
impl RefUnwindSafe for ClickEvent
impl Send for ClickEvent
impl Sync for ClickEvent
impl Unpin for ClickEvent
impl UnwindSafe for ClickEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more