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§
source§impl Clone for StructKind
impl Clone for StructKind
source§fn clone(&self) -> StructKind
fn clone(&self) -> StructKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StructKind
impl Debug for StructKind
source§impl<'de> Deserialize<'de> for StructKind
impl<'de> Deserialize<'de> for StructKind
source§fn 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
source§impl Hash for StructKind
impl Hash for StructKind
source§impl PartialEq<StructKind> for StructKind
impl PartialEq<StructKind> for StructKind
source§fn eq(&self, other: &StructKind) -> bool
fn eq(&self, other: &StructKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn 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