pub enum TypedInit<'a> {
Bit(BitInit<'a>),
Bits(BitsInit<'a>),
Code(StringInit<'a>),
Int(IntInit<'a>),
String(StringInit<'a>),
List(ListInit<'a>),
Dag(DagInit<'a>),
Def(DefInit<'a>),
Invalid,
}
Expand description
Enum that holds a reference to a TypedInit
.
Variants§
Bit(BitInit<'a>)
Bits(BitsInit<'a>)
Code(StringInit<'a>)
Int(IntInit<'a>)
String(StringInit<'a>)
List(ListInit<'a>)
Dag(DagInit<'a>)
Def(DefInit<'a>)
Invalid
Implementations§
source§impl<'a> TypedInit<'a>
impl<'a> TypedInit<'a>
pub fn as_bit(self) -> Result<BitInit<'a>, Error>
pub fn as_bits(self) -> Result<BitsInit<'a>, Error>
pub fn as_code(self) -> Result<StringInit<'a>, Error>
pub fn as_int(self) -> Result<IntInit<'a>, Error>
pub fn as_string(self) -> Result<StringInit<'a>, Error>
pub fn as_list(self) -> Result<ListInit<'a>, Error>
pub fn as_dag(self) -> Result<DagInit<'a>, Error>
pub fn as_def(self) -> Result<DefInit<'a>, Error>
sourcepub unsafe fn from_raw(init: TableGenTypedInitRef) -> Self
pub unsafe fn from_raw(init: TableGenTypedInitRef) -> Self
Trait Implementations§
source§impl<'a> From<RecordValue<'a>> for TypedInit<'a>
impl<'a> From<RecordValue<'a>> for TypedInit<'a>
source§fn from(value: RecordValue<'a>) -> Self
fn from(value: RecordValue<'a>) -> Self
Converts to this type from the input type.
impl<'a> Copy for TypedInit<'a>
impl<'a> Eq for TypedInit<'a>
impl<'a> StructuralPartialEq for TypedInit<'a>
Auto Trait Implementations§
impl<'a> Freeze for TypedInit<'a>
impl<'a> RefUnwindSafe for TypedInit<'a>
impl<'a> !Send for TypedInit<'a>
impl<'a> !Sync for TypedInit<'a>
impl<'a> Unpin for TypedInit<'a>
impl<'a> UnwindSafe for TypedInit<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)