Struct objc_encode::parse::StrEncoding [] [src]

pub struct StrEncoding<S: ?Sized = str>(_)
where
    S: AsRef<str>
;

An Objective-C type encoding parsed from its string representation.

Encodings are parsed lazily; for example, when comparing for equality we may then find that the encoding is of a struct, but no further evaluation is done of the fields of the struct until they are requested.

Methods

impl StrEncoding
[src]

Constructs a StrEncoding parsed from the given string, or returns an error if the string was not a valid encoding.

from_str will return a reference to a dynamically-sized StrEncoding which is valid for the lifetime of the given string. To construct a sized StrEncoding that owns a buffer, use the new method.

Constructs a StrEncoding without checking to see if the given string is a valid encoding.

If the given string is not a valid encoding, the returned StrEncoding will panic later when being evaluated.

impl<S> StrEncoding<S> where
    S: AsRef<str>, 
[src]

Constructs a StrEncoding parsed from the given string, or returns an error if the string was not a valid encoding.

new constructs a sized StrEncoding that owns the given buffer, meaning it can be moved without dealing with lifetimes. If you only have a borrowed &str slice or don't want to allocate a buffer, use the from_str method.

Constructs a StrEncoding without checking to see if the given string is a valid encoding.

If the given string is not a valid encoding, the returned StrEncoding will panic later when being evaluated.

impl<S: ?Sized> StrEncoding<S> where
    S: AsRef<str>, 
[src]

Returns the string representation of self.

Trait Implementations

impl<S: Clone + ?Sized> Clone for StrEncoding<S> where
    S: AsRef<str>, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: Copy + ?Sized> Copy for StrEncoding<S> where
    S: AsRef<str>, 
[src]

impl<S: Debug + ?Sized> Debug for StrEncoding<S> where
    S: AsRef<str>, 
[src]

Formats the value using the given formatter.

impl<S: ?Sized> Encoding for StrEncoding<S> where
    S: AsRef<str>, 
[src]

The type of Encoding that Self will use if it is an encoding for a pointer to describe its target. Read more

The type of Encoding that Self will use if it is an encoding for an array to describe its items. Read more

The type of Encodings that Self will use if it is an encoding for a struct to describe its fields. Read more

The type of Encodings that Self will use if it is an encoding for a union to describe its members. Read more

Returns a Descriptor that describes what kind of encoding self is.

Writes the string representation of self to the given writer.

Returns whether self is equal to the given Encoding.

impl<S: ?Sized> Display for StrEncoding<S> where
    S: AsRef<str>, 
[src]

Formats the value using the given formatter. Read more

impl<S: ?Sized, E: ?Sized> PartialEq<E> for StrEncoding<S> where
    S: AsRef<str>,
    E: Encoding
[src]

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

This method tests for !=.