pub struct FlakeEdit { /* private fields */ }Implementations§
Source§impl FlakeEdit
impl FlakeEdit
pub fn from_text(stream: &str) -> Result<Self, Error>
pub fn source_text(&self) -> String
pub fn curr_list(&self) -> &InputMap
Sourcepub fn list(&mut self) -> &InputMap
pub fn list(&mut self) -> &InputMap
Re-walk the source and return the freshly populated input map. Use
Self::curr_list to read the cached map without re-walking.
Sourcepub fn apply_change(&mut self, change: Change) -> Result<ApplyOutcome, Error>
pub fn apply_change(&mut self, change: Change) -> Result<ApplyOutcome, Error>
Apply change and return the resulting ApplyOutcome.
Some edits require multiple walker passes. This method drives them all.
A fatal validation failure surfaces as
Error::Validation.
§Errors
Returns Error if the underlying walker fails or the change
is rejected (e.g. Error::DuplicateInput,
Error::InputNotFound).
pub fn walker(&self) -> &Walker
Auto Trait Implementations§
impl !RefUnwindSafe for FlakeEdit
impl !Send for FlakeEdit
impl !Sync for FlakeEdit
impl !UnwindSafe for FlakeEdit
impl Freeze for FlakeEdit
impl Unpin for FlakeEdit
impl UnsafeUnpin 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