Skip to main content

Action

Enum Action 

Source
pub enum Action<S = String> {
Show 37 variants Bold, Br, Color(Color), Dest(Dest<S>), Expire(Expire<S>), Filter(Filter<S>), Font(Font<S>), Frame(Frame<S>), Gauge(Gauge<S>), Heading(Heading), Highlight, Hr, Hyperlink(Hyperlink<S>), Image(Image<S>), Italic, Music(Music<S>), MusicOff, MxpOff, NoBr, P, Password, Relocate(Relocate<S>), Reset, SBr, Send(Send<S>), Small, Sound(Sound<S>), SoundOff, Stat(Stat<S>), Strikeout, StyleVersion(StyleVersion<S>), Support(Support<S>), Tt, Underline, User, Var(Var<S>), Version,
}
Expand description

Effect caused by an element. Created by applying Arguments to an element AtomicTag.

Variants§

§

Bold

<BOLD>: Make text bold.

§

Br

<BR>: Insert a hard line break.

§

Color(Color)

<COLOR>: Change text color.

§

Dest(Dest<S>)

<DEST>: Set destination frame.

§

Expire(Expire<S>)

<EXPIRE>: Expire links.

§

Filter(Filter<S>)

<FILTER>: Set file filter.

§

Font(Font<S>)

<FONT>: Change text font.

§

Frame(Frame<S>)

<FRAME>: Create a frame window.

§

Gauge(Gauge<S>)

<GAUGE>: Display an MXP entity value as a gauge.

§

Heading(Heading)

<H{N}>: Format text as a heading.

§

Highlight

<HIGH>: Highlight text.

§

Hr

<HR>: Insert a horizontal rule.

<A>: Hyperlink.

§

Image(Image<S>)

<IMAGE>: Display an image.

§

Italic

<ITALIC>: Make text italic.

§

Music(Music<S>)

<MUSIC>: Play music.

§

MusicOff

<MUSIC OFF>: Stop music.

§

MxpOff

<MXP OFF>: MXP control command. This is an unofficial extension to the MXP protocol.

§

NoBr

<NOBR>: Ignore next newline.

§

P

<P>: Insert a paragraph break.

§

Password

<PASSWORD>: Prompt client to send user password.

§

Relocate(Relocate<S>)

<RELOCATE>: Prompt client to switch to a new network connection.

§

Reset

<RESET>: Close all OPEN tags. This is an unofficial extension to the MXP protocol.

§

SBr

<SBR>: Insert a soft linebreak.

§

Send(Send<S>)

<Send>: Turn text into a link that sends a command to the world.

§

Small

<SMALL>: Display text in a smaller size.

§

Sound(Sound<S>)

<SOUND>: Play a sound file.

§

SoundOff

<SOUND OFF>: Stop all sound.

§

Stat(Stat<S>)

<STAT>: Display an MXP entity value on the status bar.

§

Strikeout

<STRIKEOUT>: Strike-out the text.

§

StyleVersion(StyleVersion<S>)

<VERSION>: The client should cache this style-sheet version number and return it when requested by a plain <VERSION> request.

§

Support(Support<S>)

<SUPPORT>: Prompt client to respond with the commands that it supports.

§

Tt

<TT>: Display text in a non-proportional font.

§

Underline

<UNDERLINE>: Underline text.

§

User

<USER>: Prompt client to send username.

§

Var(Var<S>)

<VAR>: Set an MXP variable.

§

Version

<VERSION>: Prompt client to respond with its client and version of MXP.

Implementations§

Source§

impl<S: IntoOwnedString> Action<S>

Source

pub fn into_owned(self) -> Action<String>

Source§

impl<S> Action<S>

Source

pub fn map_text<F, T>(self, f: F) -> Action<T>
where F: FnMut(S) -> T,

Applies a type transformation to all text, returning a new struct.

Trait Implementations§

Source§

impl<S: Clone> Clone for Action<S>

Source§

fn clone(&self) -> Action<S>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug> Debug for Action<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: AsRef<str>> Display for Action<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for Action<String>

Source§

type Err = FromStrError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<S: PartialEq> PartialEq for Action<S>

Source§

fn eq(&self, other: &Action<S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S: Eq> Eq for Action<S>

Source§

impl<S> StructuralPartialEq for Action<S>

Auto Trait Implementations§

§

impl<S> Freeze for Action<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Action<S>
where S: RefUnwindSafe,

§

impl<S> Send for Action<S>
where S: Send,

§

impl<S> Sync for Action<S>
where S: Sync,

§

impl<S> Unpin for Action<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Action<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for Action<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.