Struct SpaceChildOrder

pub struct SpaceChildOrder(/* private fields */);
Expand description

The order of an m.space.child event.

Space child orders in Matrix are opaque character sequences consisting of ASCII characters within the range \x20 (space) and \x7E (~), inclusive. Their length must must not exceed 50 characters.

Implementations§

§

impl SpaceChildOrder

pub fn as_str(&self) -> &str

Creates a string slice from this SpaceChildOrder.

pub fn as_bytes(&self) -> &[u8]

Creates a byte slice from this SpaceChildOrder.

§

impl SpaceChildOrder

pub fn parse(s: impl AsRef<str>) -> Result<OwnedSpaceChildOrder, Error>

Try parsing a &str into an OwnedSpaceChildOrder.

The same can also be done using FromStr, TryFrom or TryInto. This function is simply more constrained and thus useful in generic contexts.

pub fn parse_box( s: impl AsRef<str> + Into<Box<str>>, ) -> Result<Box<SpaceChildOrder>, Error>

Try parsing a &str into a Box<SpaceChildOrder>.

The same can also be done using FromStr, TryFrom or TryInto. This function is simply more constrained and thus useful in generic contexts.

pub fn parse_rc( s: impl AsRef<str> + Into<Rc<str>>, ) -> Result<Rc<SpaceChildOrder>, Error>

Try parsing a &str into an Rc<SpaceChildOrder>.

pub fn parse_arc( s: impl AsRef<str> + Into<Arc<str>>, ) -> Result<Arc<SpaceChildOrder>, Error>

Try parsing a &str into an Arc<SpaceChildOrder>.

Trait Implementations§

§

impl AsRef<[u8]> for Box<SpaceChildOrder>

§

fn as_ref(&self) -> &[u8]

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

impl AsRef<[u8]> for SpaceChildOrder

§

fn as_ref(&self) -> &[u8]

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

impl AsRef<SpaceChildOrder> for OwnedSpaceChildOrder

§

fn as_ref(&self) -> &SpaceChildOrder

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

impl AsRef<SpaceChildOrder> for SpaceChildOrder

§

fn as_ref(&self) -> &SpaceChildOrder

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

impl AsRef<str> for Box<SpaceChildOrder>

§

fn as_ref(&self) -> &str

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

impl AsRef<str> for SpaceChildOrder

§

fn as_ref(&self) -> &str

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

impl Borrow<SpaceChildOrder> for OwnedSpaceChildOrder

§

fn borrow(&self) -> &SpaceChildOrder

Immutably borrows from an owned value. Read more
§

impl Clone for Box<SpaceChildOrder>

§

fn clone(&self) -> Box<SpaceChildOrder>

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
§

impl Debug for SpaceChildOrder

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Box<SpaceChildOrder>

§

fn deserialize<D>( deserializer: D, ) -> Result<Box<SpaceChildOrder>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for SpaceChildOrder

§

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

Formats the value using the given formatter. Read more
§

impl From<&SpaceChildOrder> for Arc<SpaceChildOrder>

§

fn from(s: &SpaceChildOrder) -> Arc<SpaceChildOrder>

Converts to this type from the input type.
§

impl From<&SpaceChildOrder> for Box<SpaceChildOrder>

§

fn from(id: &SpaceChildOrder) -> Box<SpaceChildOrder>

Converts to this type from the input type.
§

impl From<&SpaceChildOrder> for OwnedSpaceChildOrder

§

fn from(id: &SpaceChildOrder) -> OwnedSpaceChildOrder

Converts to this type from the input type.
§

impl From<&SpaceChildOrder> for Rc<SpaceChildOrder>

§

fn from(s: &SpaceChildOrder) -> Rc<SpaceChildOrder>

Converts to this type from the input type.
§

impl From<&SpaceChildOrder> for String

§

fn from(id: &SpaceChildOrder) -> String

Converts to this type from the input type.
§

impl From<OwnedSpaceChildOrder> for Box<SpaceChildOrder>

§

fn from(a: OwnedSpaceChildOrder) -> Box<SpaceChildOrder>

Converts to this type from the input type.
§

impl FromStr for Box<SpaceChildOrder>

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str( s: &str, ) -> Result<Box<SpaceChildOrder>, <Box<SpaceChildOrder> as FromStr>::Err>

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

impl Hash for SpaceChildOrder

§

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

Feeds this value into the given Hasher. Read more
§

impl Ord for SpaceChildOrder

§

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

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

impl PartialEq<&SpaceChildOrder> for Box<SpaceChildOrder>

§

fn eq(&self, other: &&SpaceChildOrder) -> 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.
§

impl PartialEq<&SpaceChildOrder> for OwnedSpaceChildOrder

§

fn eq(&self, other: &&SpaceChildOrder) -> 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.
§

impl PartialEq<&str> for Box<SpaceChildOrder>

§

fn eq(&self, other: &&str) -> 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.
§

impl PartialEq<&str> for SpaceChildOrder

§

fn eq(&self, other: &&str) -> 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.
§

impl PartialEq<Box<SpaceChildOrder>> for &SpaceChildOrder

§

fn eq(&self, other: &Box<SpaceChildOrder>) -> 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.
§

impl PartialEq<Box<SpaceChildOrder>> for SpaceChildOrder

§

fn eq(&self, other: &Box<SpaceChildOrder>) -> 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.
§

impl PartialEq<OwnedSpaceChildOrder> for &SpaceChildOrder

§

fn eq(&self, other: &OwnedSpaceChildOrder) -> 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.
§

impl PartialEq<OwnedSpaceChildOrder> for Box<SpaceChildOrder>

§

fn eq(&self, other: &OwnedSpaceChildOrder) -> 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.
§

impl PartialEq<OwnedSpaceChildOrder> for SpaceChildOrder

§

fn eq(&self, other: &OwnedSpaceChildOrder) -> 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.
§

impl PartialEq<SpaceChildOrder> for &str

§

fn eq(&self, other: &SpaceChildOrder) -> 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.
§

impl PartialEq<SpaceChildOrder> for Box<SpaceChildOrder>

§

fn eq(&self, other: &SpaceChildOrder) -> 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.
§

impl PartialEq<SpaceChildOrder> for OwnedSpaceChildOrder

§

fn eq(&self, other: &SpaceChildOrder) -> 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.
§

impl PartialEq<SpaceChildOrder> for String

§

fn eq(&self, other: &SpaceChildOrder) -> 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.
§

impl PartialEq<SpaceChildOrder> for str

§

fn eq(&self, other: &SpaceChildOrder) -> 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.
§

impl PartialEq<String> for Box<SpaceChildOrder>

§

fn eq(&self, other: &String) -> 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.
§

impl PartialEq<String> for SpaceChildOrder

§

fn eq(&self, other: &String) -> 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.
§

impl PartialEq<str> for Box<SpaceChildOrder>

§

fn eq(&self, other: &str) -> 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.
§

impl PartialEq<str> for SpaceChildOrder

§

fn eq(&self, other: &str) -> 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.
§

impl PartialEq for SpaceChildOrder

§

fn eq(&self, other: &SpaceChildOrder) -> 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.
§

impl PartialOrd for SpaceChildOrder

§

fn partial_cmp(&self, other: &SpaceChildOrder) -> 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
§

impl Serialize for SpaceChildOrder

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl ToOwned for SpaceChildOrder

§

type Owned = OwnedSpaceChildOrder

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> <SpaceChildOrder as ToOwned>::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
§

impl<'a> TryFrom<&'a str> for &'a SpaceChildOrder

§

type Error = Error

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

fn try_from( s: &'a str, ) -> Result<&'a SpaceChildOrder, <&'a SpaceChildOrder as TryFrom<&'a str>>::Error>

Performs the conversion.
§

impl TryFrom<&str> for Box<SpaceChildOrder>

§

type Error = Error

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

fn try_from( s: &str, ) -> Result<Box<SpaceChildOrder>, <Box<SpaceChildOrder> as TryFrom<&str>>::Error>

Performs the conversion.
§

impl TryFrom<String> for Box<SpaceChildOrder>

§

type Error = Error

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

fn try_from( s: String, ) -> Result<Box<SpaceChildOrder>, <Box<SpaceChildOrder> as TryFrom<String>>::Error>

Performs the conversion.
§

impl Eq for SpaceChildOrder

§

impl StructuralPartialEq for SpaceChildOrder

Auto Trait Implementations§

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

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

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
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