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 Encoding
s.
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
Primitive(Primitive)
Pointer(&'a T)
Array(u32, &'a I)
Struct(&'a str, &'a F)
Union(&'a str, &'a M)
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]
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]
fn clone(&self) -> Descriptor<'a, T, I, F, M>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more