Enum rustdoc_json_types::StructKind
source · [−]pub enum StructKind {
Unit,
Tuple(Vec<Option<Id>>),
Plain {
fields: Vec<Id>,
fields_stripped: bool,
},
}
Variants
Unit
A struct with no fields and no parentheses.
pub struct Unit;
Tuple(Vec<Option<Id>>)
A struct with unnamed fields.
pub struct TupleStruct(i32);
pub struct EmptyTupleStruct();
All Id
’s will point to ItemEnum::StructField
. Private and
#[doc(hidden)]
fields will be given as None
Plain
A struct with nammed fields.
pub struct PlainStruct { x: i32 }
pub struct EmptyPlainStruct {}
Trait Implementations
sourceimpl Clone for StructKind
impl Clone for StructKind
sourcefn clone(&self) -> StructKind
fn clone(&self) -> StructKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for StructKind
impl Debug for StructKind
sourceimpl<'de> Deserialize<'de> for StructKind
impl<'de> Deserialize<'de> for StructKind
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for StructKind
impl Hash for StructKind
sourceimpl PartialEq<StructKind> for StructKind
impl PartialEq<StructKind> for StructKind
sourcefn eq(&self, other: &StructKind) -> bool
fn eq(&self, other: &StructKind) -> bool
sourceimpl Serialize for StructKind
impl Serialize for StructKind
impl Eq for StructKind
impl StructuralEq for StructKind
impl StructuralPartialEq for StructKind
Auto Trait Implementations
impl RefUnwindSafe for StructKind
impl Send for StructKind
impl Sync for StructKind
impl Unpin for StructKind
impl UnwindSafe for StructKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Unit
: 0 bytesTuple
: 31 bytesPlain
: 31 bytes