#[non_exhaustive]pub enum UniversalDeclarationOr<T>where
T: StructFieldType,{
Specific(TypedStructDeclaration<T>),
Universal(UniversalStructDeclaration),
}
Expand description
Structs refs can always be the Universal struct type, but may also be a more specific type depending on context
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.
Specific(TypedStructDeclaration<T>)
Universal(UniversalStructDeclaration)
Implementations§
Source§impl<T> UniversalDeclarationOr<T>where
T: StructFieldType,
impl<T> UniversalDeclarationOr<T>where
T: StructFieldType,
pub fn untyped(&self) -> &StructDeclarationHandle
Trait Implementations§
Source§impl<T> Clone for UniversalDeclarationOr<T>where
T: StructFieldType + Clone,
impl<T> Clone for UniversalDeclarationOr<T>where
T: StructFieldType + Clone,
Source§fn clone(&self) -> UniversalDeclarationOr<T>
fn clone(&self) -> UniversalDeclarationOr<T>
Returns a duplicate 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<T> Debug for UniversalDeclarationOr<T>where
T: StructFieldType + Debug,
impl<T> Debug for UniversalDeclarationOr<T>where
T: StructFieldType + Debug,
Source§impl<T> PartialEq for UniversalDeclarationOr<T>where
T: StructFieldType,
impl<T> PartialEq for UniversalDeclarationOr<T>where
T: StructFieldType,
impl<T> Eq for UniversalDeclarationOr<T>where
T: StructFieldType,
Auto Trait Implementations§
impl<T> Freeze for UniversalDeclarationOr<T>
impl<T> RefUnwindSafe for UniversalDeclarationOr<T>where
T: RefUnwindSafe,
impl<T> !Send for UniversalDeclarationOr<T>
impl<T> !Sync for UniversalDeclarationOr<T>
impl<T> Unpin for UniversalDeclarationOr<T>where
T: Unpin,
impl<T> UnwindSafe for UniversalDeclarationOr<T>where
T: UnwindSafe,
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