Skip to main content

Text

Struct Text 

Source
pub struct Text(/* private fields */);
Expand description

A textual value (RFC 5545 §3.3.11).

This is the subset of str values that are permissible TEXT property values in iCalendar: all strings that do not contain ASCII control characters other than HTAB (U+0009) and LF (U+000A).

Implementations§

Source§

impl Text

Source

pub fn new(input: &str) -> Result<&Self, InvalidTextError>

Source§

impl Text

Source

pub const fn as_str(&self) -> &str

Source§

impl Text

Source

pub const fn char_is_valid(c: char) -> bool

Returns true iff c is valid in a TEXT value.

Trait Implementations§

Source§

impl AsMut<Text> for TextBuf

Source§

fn as_mut(&mut self) -> &mut Text

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Text> for TextBuf

Source§

fn as_ref(&self) -> &Text

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<Text> for TextBuf

Source§

fn borrow(&self) -> &Text

Immutably borrows from an owned value. Read more
Source§

impl Clone for Box<Text>

Source§

fn clone(&self) -> Self

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 Debug for Text

Source§

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

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

impl Display for Text

Source§

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

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

impl From<&Text> for Box<Text>

Source§

fn from(value: &Text) -> Self

Converts to this type from the input type.
Source§

impl From<&Text> for TextBuf

Source§

fn from(value: &Text) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Text> for Box<Text>

Source§

fn from(value: &mut Text) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Text> for TextBuf

Source§

fn from(value: &mut Text) -> Self

Converts to this type from the input type.
Source§

impl From<TextBuf> for Box<Text>

Source§

fn from(value: TextBuf) -> Self

Converts to this type from the input type.
Source§

impl Hash for Text

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Ord for Text

Source§

fn cmp(&self, other: &Text) -> Ordering

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

impl PartialEq for Text

Source§

fn eq(&self, other: &Text) -> 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 PartialOrd for Text

Source§

fn partial_cmp(&self, other: &Text) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToOwned for Text

Source§

type Owned = TextBuf

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

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

fn clone_into(&self, target: &mut Self::Owned)

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

impl Eq for Text

Source§

impl StructuralPartialEq for Text

Auto Trait Implementations§

§

impl Freeze for Text

§

impl RefUnwindSafe for Text

§

impl Send for Text

§

impl !Sized for Text

§

impl Sync for Text

§

impl Unpin for Text

§

impl UnsafeUnpin for Text

§

impl UnwindSafe for Text

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more