Enum objc_encode::Descriptor [] [src]

pub enum Descriptor<'a, T: 'a + ?Sized, I: 'a + ?Sized, F: 'a + ?Sized, M: 'a + ?Sized> {
    Primitive(Primitive),
    Pointer(&'a T),
    Array(u32, &'a I),
    Struct(&'a str, &'a F),
    Union(&'a str, &'a M),
}

A type which describes an Encoding.

In a sense, descriptors allow a form of downcasting for Encodings. While accepting an Encoding of any type, through its descriptor we can still know what kind it is and access specific information about it, like the length of an array or the name of a struct. This allows encodings of different types to be compared and interoperate.

Variants

Trait Implementations

impl<'a, T: Debug + 'a + ?Sized, I: Debug + 'a + ?Sized, F: Debug + 'a + ?Sized, M: Debug + 'a + ?Sized> Debug for Descriptor<'a, T, I, F, M>
[src]

Formats the value using the given formatter.

impl<'a, T: 'a + ?Sized, I: 'a + ?Sized, F: 'a + ?Sized, M: 'a + ?Sized> Copy for Descriptor<'a, T, I, F, M>
[src]

impl<'a, T: 'a + ?Sized, I: 'a + ?Sized, F: 'a + ?Sized, M: 'a + ?Sized> Clone for Descriptor<'a, T, I, F, M>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more