#[non_exhaustive]pub enum StructType<D>where
D: DocReference,{
FunctionArg(Handle<Struct<FunctionArgStructField, D>>),
FunctionReturn(Handle<Struct<FunctionReturnStructField, D>>),
CallbackArg(Handle<Struct<CallbackArgStructField, D>>),
Universal(Handle<Struct<UniversalStructField, D>>),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FunctionArg(Handle<Struct<FunctionArgStructField, D>>)
structs that may be used as native function parameters
FunctionReturn(Handle<Struct<FunctionReturnStructField, D>>)
structs than can be used as native function return values
CallbackArg(Handle<Struct<CallbackArgStructField, D>>)
structs that may be used as callback function arguments in interfaces
Universal(Handle<Struct<UniversalStructField, D>>)
structs that can be used in any context and only contain basic types
Implementations§
Source§impl<D> StructType<D>where
D: DocReference,
impl<D> StructType<D>where
D: DocReference,
pub fn initializers(&self) -> &[Handle<Initializer<D>>]
pub fn name(&self) -> &Name
pub fn doc(&self) -> &Doc<D>
pub fn settings(&self) -> &LibrarySettings
pub fn declaration(&self) -> StructDeclarationHandle
pub fn find_field_name(&self, name: &str) -> Option<Name>
pub fn get_default_initializer(&self) -> Option<&Handle<Initializer<D>>>
Trait Implementations§
Source§impl<D> Clone for StructType<D>where
D: DocReference + Clone,
impl<D> Clone for StructType<D>where
D: DocReference + Clone,
Source§fn clone(&self) -> StructType<D>
fn clone(&self) -> StructType<D>
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<D> Debug for StructType<D>where
D: DocReference + Debug,
impl<D> Debug for StructType<D>where
D: DocReference + Debug,
Source§impl From<Handle<Struct<CallbackArgStructField, Unvalidated>>> for StructType<Unvalidated>
impl From<Handle<Struct<CallbackArgStructField, Unvalidated>>> for StructType<Unvalidated>
Source§fn from(x: CallbackArgStructHandle) -> Self
fn from(x: CallbackArgStructHandle) -> Self
Converts to this type from the input type.
Source§impl From<Handle<Struct<FunctionArgStructField, Unvalidated>>> for StructType<Unvalidated>
impl From<Handle<Struct<FunctionArgStructField, Unvalidated>>> for StructType<Unvalidated>
Source§fn from(x: FunctionArgStructHandle) -> Self
fn from(x: FunctionArgStructHandle) -> Self
Converts to this type from the input type.
Source§impl From<Handle<Struct<FunctionReturnStructField, Unvalidated>>> for StructType<Unvalidated>
impl From<Handle<Struct<FunctionReturnStructField, Unvalidated>>> for StructType<Unvalidated>
Source§fn from(x: FunctionReturnStructHandle) -> Self
fn from(x: FunctionReturnStructHandle) -> Self
Converts to this type from the input type.
Source§impl From<Handle<Struct<UniversalStructField, Unvalidated>>> for StructType<Unvalidated>
impl From<Handle<Struct<UniversalStructField, Unvalidated>>> for StructType<Unvalidated>
Source§fn from(x: UniversalStructHandle) -> Self
fn from(x: UniversalStructHandle) -> Self
Converts to this type from the input type.
Source§impl<D> Hash for StructType<D>where
D: DocReference + Hash,
impl<D> Hash for StructType<D>where
D: DocReference + Hash,
Source§impl<D> PartialEq for StructType<D>where
D: DocReference + PartialEq,
impl<D> PartialEq for StructType<D>where
D: DocReference + PartialEq,
impl<D> Eq for StructType<D>where
D: DocReference + Eq,
impl<D> StructuralPartialEq for StructType<D>where
D: DocReference,
Auto Trait Implementations§
impl<D> Freeze for StructType<D>
impl<D> RefUnwindSafe for StructType<D>where
D: RefUnwindSafe,
impl<D> !Send for StructType<D>
impl<D> !Sync for StructType<D>
impl<D> Unpin for StructType<D>
impl<D> UnwindSafe for StructType<D>where
D: RefUnwindSafe,
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