pub struct MethodDefinition<'gc> { /* private fields */ }Expand description
Clone-with-changes builder for super::MethodDefinition.
Implementations§
Source§impl<'gc> MethodDefinition<'gc>
impl<'gc> MethodDefinition<'gc>
Sourcepub fn from_node(node: &'gc MethodDefinition<'gc>) -> Self
pub fn from_node(node: &'gc MethodDefinition<'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 value(&mut self, value: &'gc Node<'gc>)
pub fn value(&mut self, value: &'gc Node<'gc>)
Set the value field and mark the builder changed.
Sourcepub fn decorators(&mut self, decorators: NodeList<'gc>)
pub fn decorators(&mut self, decorators: NodeList<'gc>)
Set the decorators field and mark the builder changed.
Trait Implementations§
Auto Trait Implementations§
impl<'gc> !Freeze for MethodDefinition<'gc>
impl<'gc> !RefUnwindSafe for MethodDefinition<'gc>
impl<'gc> !Send for MethodDefinition<'gc>
impl<'gc> !Sync for MethodDefinition<'gc>
impl<'gc> !UnwindSafe for MethodDefinition<'gc>
impl<'gc> Unpin for MethodDefinition<'gc>
impl<'gc> UnsafeUnpin for MethodDefinition<'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