pub struct FlakeEdit { /* private fields */ }Implementations§
Source§impl FlakeEdit
impl FlakeEdit
pub fn new(changes: Vec<Change>, walker: Walker) -> Self
pub fn from_text(stream: &str) -> Result<Self, FlakeEditError>
pub fn changes(&self) -> &[Change]
pub fn add_change(&mut self, change: Change)
pub fn curr_list(&self) -> &InputMap
Sourcepub fn list(&mut self) -> &InputMap
pub fn list(&mut self) -> &InputMap
Will walk and then list the inputs, for listing the current inputs,
use curr_list().
Sourcepub fn apply_change(
&mut self,
change: Change,
) -> Result<Option<String>, FlakeEditError>
pub fn apply_change( &mut self, change: Change, ) -> Result<Option<String>, FlakeEditError>
Apply a specific change to a walker, on some inputs it will need to walk multiple times, will error, if the edit could not be applied successfully.
pub fn walker(&self) -> &Walker
Auto Trait Implementations§
impl Freeze for FlakeEdit
impl !RefUnwindSafe for FlakeEdit
impl !Send for FlakeEdit
impl !Sync for FlakeEdit
impl Unpin for FlakeEdit
impl !UnwindSafe for FlakeEdit
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> 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