Trait objc_encode::Encoding
[−]
[src]
pub trait Encoding: Display { type PointerTarget: ?Sized + Encoding; type ArrayItem: ?Sized + Encoding; type StructFields: ?Sized + Encodings; type UnionMembers: ?Sized + Encodings; fn descriptor(
&self
) -> Descriptor<Self::PointerTarget, Self::ArrayItem, Self::StructFields, Self::UnionMembers>; fn eq_encoding<T: ?Sized + Encoding>(&self, other: &T) -> bool { ... } fn write<W: Write>(&self, writer: &mut W) -> Result { ... } }
An Objective-C type encoding.
Associated Types
type PointerTarget: ?Sized + Encoding
The type of Encoding
that Self will use if it is an encoding for
a pointer to describe its target.
type ArrayItem: ?Sized + Encoding
The type of Encoding
that Self will use if it is an encoding for
an array to describe its items.
type StructFields: ?Sized + Encodings
The type of Encodings
that Self will use if it is an encoding for
a struct to describe its fields.
type UnionMembers: ?Sized + Encodings
The type of Encodings
that Self will use if it is an encoding for
a union to describe its members.
Required Methods
fn descriptor(
&self
) -> Descriptor<Self::PointerTarget, Self::ArrayItem, Self::StructFields, Self::UnionMembers>
&self
) -> Descriptor<Self::PointerTarget, Self::ArrayItem, Self::StructFields, Self::UnionMembers>
Returns a Descriptor
that describes what kind of encoding self is.
Provided Methods
fn eq_encoding<T: ?Sized + Encoding>(&self, other: &T) -> bool
Returns whether self is equal to the given Encoding
.
fn write<W: Write>(&self, writer: &mut W) -> Result
Writes the string representation of self to the given writer.
Implementors
impl<T> Encoding for Array<T> where
T: Encoding,impl<T> Encoding for Pointer<T> where
T: Encoding,impl Encoding for Primitive
impl<S, T> Encoding for Struct<S, T> where
S: AsRef<str>,
T: Encodings,impl<S, T> Encoding for Union<S, T> where
S: AsRef<str>,
T: Encodings,impl<S: ?Sized> Encoding for StrEncoding<S> where
S: AsRef<str>,