pub struct FunctionTypeAnnotation<'gc> { /* private fields */ }Expand description
Clone-with-changes builder for super::FunctionTypeAnnotation.
Implementations§
Source§impl<'gc> FunctionTypeAnnotation<'gc>
impl<'gc> FunctionTypeAnnotation<'gc>
Sourcepub fn from_node(node: &'gc FunctionTypeAnnotation<'gc>) -> Self
pub fn from_node(node: &'gc FunctionTypeAnnotation<'gc>) -> Self
Start from a copy of node, with no field changed yet.
Sourcepub fn build(self, gc: &'gc GCLock<'_, '_>) -> TransformResult<&'gc Node<'gc>>
pub fn build(self, gc: &'gc GCLock<'_, '_>) -> TransformResult<&'gc Node<'gc>>
Allocate the rebuilt node if a setter ran, else
TransformResult::Unchanged.
Sourcepub fn build_forced(self, gc: &'gc GCLock<'_, '_>) -> &'gc Node<'gc>
pub fn build_forced(self, gc: &'gc GCLock<'_, '_>) -> &'gc Node<'gc>
Allocate the node unconditionally, changed or not.
Sourcepub fn params(&mut self, params: NodeList<'gc>)
pub fn params(&mut self, params: NodeList<'gc>)
Set the params field and mark the builder changed.
Sourcepub fn this(&mut self, this: Option<&'gc Node<'gc>>)
pub fn this(&mut self, this: Option<&'gc Node<'gc>>)
Set the this field and mark the builder changed.
Sourcepub fn return_type(&mut self, return_type: &'gc Node<'gc>)
pub fn return_type(&mut self, return_type: &'gc Node<'gc>)
Set the return_type field and mark the builder changed.
Sourcepub fn rest(&mut self, rest: Option<&'gc Node<'gc>>)
pub fn rest(&mut self, rest: Option<&'gc Node<'gc>>)
Set the rest field and mark the builder changed.
Sourcepub fn type_parameters(&mut self, type_parameters: Option<&'gc Node<'gc>>)
pub fn type_parameters(&mut self, type_parameters: Option<&'gc Node<'gc>>)
Set the type_parameters field and mark the builder changed.
Trait Implementations§
Auto Trait Implementations§
impl<'gc> !Freeze for FunctionTypeAnnotation<'gc>
impl<'gc> !RefUnwindSafe for FunctionTypeAnnotation<'gc>
impl<'gc> !Send for FunctionTypeAnnotation<'gc>
impl<'gc> !Sync for FunctionTypeAnnotation<'gc>
impl<'gc> !UnwindSafe for FunctionTypeAnnotation<'gc>
impl<'gc> Unpin for FunctionTypeAnnotation<'gc>
impl<'gc> UnsafeUnpin for FunctionTypeAnnotation<'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