#[repr(C)]pub struct OpaqueType<'gc> {
pub metadata: NodeMetadata<'gc>,
pub id: &'gc Node<'gc>,
pub type_parameters: Option<&'gc Node<'gc>>,
pub impltype: &'gc Node<'gc>,
pub lower_bound: Option<&'gc Node<'gc>>,
pub upper_bound: Option<&'gc Node<'gc>>,
pub supertype: Option<&'gc Node<'gc>>,
}Expand description
The OpaqueType AST node.
Fields§
§metadata: NodeMetadata<'gc>Source range, debug location, paren count, and node id.
id: &'gc Node<'gc>ESTree id property.
type_parameters: Option<&'gc Node<'gc>>ESTree typeParameters property.
impltype: &'gc Node<'gc>ESTree impltype property.
lower_bound: Option<&'gc Node<'gc>>ESTree lowerBound property.
upper_bound: Option<&'gc Node<'gc>>ESTree upperBound property.
supertype: Option<&'gc Node<'gc>>ESTree supertype property.
Implementations§
Source§impl<'gc> OpaqueType<'gc>
impl<'gc> OpaqueType<'gc>
Sourcepub fn new(
metadata: NodeMetadata<'gc>,
id: &'gc Node<'gc>,
type_parameters: Option<&'gc Node<'gc>>,
impltype: &'gc Node<'gc>,
lower_bound: Option<&'gc Node<'gc>>,
upper_bound: Option<&'gc Node<'gc>>,
supertype: Option<&'gc Node<'gc>>,
) -> Self
pub fn new( metadata: NodeMetadata<'gc>, id: &'gc Node<'gc>, type_parameters: Option<&'gc Node<'gc>>, impltype: &'gc Node<'gc>, lower_bound: Option<&'gc Node<'gc>>, upper_bound: Option<&'gc Node<'gc>>, supertype: Option<&'gc Node<'gc>>, ) -> Self
Build OpaqueType from its metadata and ESTree.def fields.
Trait Implementations§
Auto Trait Implementations§
impl<'gc> !Freeze for OpaqueType<'gc>
impl<'gc> !RefUnwindSafe for OpaqueType<'gc>
impl<'gc> !Send for OpaqueType<'gc>
impl<'gc> !Sync for OpaqueType<'gc>
impl<'gc> !UnwindSafe for OpaqueType<'gc>
impl<'gc> Unpin for OpaqueType<'gc>
impl<'gc> UnsafeUnpin for OpaqueType<'gc>
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