pub struct Walker { /* private fields */ }Implementations§
Source§impl<'a> Walker
impl<'a> Walker
pub fn new(stream: &'a str) -> Self
Sourcepub fn from_root(root: SyntaxNode) -> Self
pub fn from_root(root: SyntaxNode) -> Self
Build a walker around an already-parsed root, skipping the rnix parse. Lets callers that ran a parse for validation share the result.
Sourcepub fn walk(
&mut self,
change: &Change,
) -> Result<Option<SyntaxNode>, WalkerError>
pub fn walk( &mut self, change: &Change, ) -> Result<Option<SyntaxNode>, WalkerError>
Apply change to the parsed flake.nix, returning the rebuilt root if
the tree was modified.
Expects the parsed root to be an attrset with description, inputs, and
outputs keys.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Walker
impl !Send for Walker
impl !Sync for Walker
impl !UnwindSafe for Walker
impl Freeze for Walker
impl Unpin for Walker
impl UnsafeUnpin for Walker
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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