Struct cairo_lang_defs::patcher::PatchBuilder
source · pub struct PatchBuilder<'a> {
pub db: &'a dyn SyntaxGroup,
/* private fields */
}Fields§
§db: &'a dyn SyntaxGroupImplementations§
source§impl<'a> PatchBuilder<'a>
impl<'a> PatchBuilder<'a>
sourcepub fn new(db: &'a dyn SyntaxGroup, origin: &impl TypedSyntaxNode) -> Self
pub fn new(db: &'a dyn SyntaxGroup, origin: &impl TypedSyntaxNode) -> Self
Creates a new patch builder, originating from origin node.
sourcepub fn build(self) -> (String, Vec<CodeMapping>)
pub fn build(self) -> (String, Vec<CodeMapping>)
Builds the resulting code and code mappings.
pub fn add_char(&mut self, c: char)
pub fn add_str(&mut self, s: &str)
pub fn add_modified(&mut self, node: RewriteNode)
pub fn add_node(&mut self, node: SyntaxNode)
Auto Trait Implementations§
impl<'a> Freeze for PatchBuilder<'a>
impl<'a> !RefUnwindSafe for PatchBuilder<'a>
impl<'a> !Send for PatchBuilder<'a>
impl<'a> !Sync for PatchBuilder<'a>
impl<'a> Unpin for PatchBuilder<'a>
impl<'a> !UnwindSafe for PatchBuilder<'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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more