Enum vibha::ModalSlice [] [src]

pub enum ModalSlice<'a> {
    Text(&'a str),
    Header(&'a str),
}

Wraps a string slice with a "mode" tag.

If you Display a modal slice, a Text will prefix itself with '\x02' to ensure that it's in text mode. Similarly, a Header will start with '\x01' and end with '\x02'. This way you're always in text mode by default, and writes that don't use ModalSlice can assume that things are always in text mode.

Variants

A slice of textual data.

A slice of header data.

Trait Implementations

impl<'a> Debug for ModalSlice<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> PartialEq for ModalSlice<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<'a> Eq for ModalSlice<'a>
[src]

impl<'a> PartialOrd for ModalSlice<'a>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a> Ord for ModalSlice<'a>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<'a> Clone for ModalSlice<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Copy for ModalSlice<'a>
[src]

impl<'a> Display for ModalSlice<'a>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for ModalSlice<'a>

impl<'a> Sync for ModalSlice<'a>