pub enum Change {
None,
Add {
id: Option<ChangeId>,
uri: Option<String>,
flake: bool,
},
Remove {
ids: Vec<ChangeId>,
},
Change {
id: Option<ChangeId>,
uri: Option<String>,
},
Follows {
input: ChangeId,
target: AttrPath,
},
Toggle {
id: ChangeId,
uri: String,
previous: String,
},
ToggleRemove {
id: ChangeId,
uri: String,
activate: Option<String>,
},
}Variants§
None
Add
Remove
Change
Follows
Redirect a nested input to follow another input.
Applying Follows { input: "rust-overlay.nixpkgs", target: "nixpkgs" }
writes rust-overlay.inputs.nixpkgs.follows = "nixpkgs";.
Fields
Toggle
Make uri the active url of an input, keeping the previously
active url as a commented alternate on the adjacent line.
When uri matches a stored alternate, that comment is uncommented
in place. Otherwise the new url is written directly below the
deactivated one. Lines never move, only the comment marker.
Fields
ToggleRemove
Delete a stored variant’s line from an input.
When uri names a commented alternate, its line is deleted and the
active url stays put. When uri names the active url, activate
names the stored alternate that is uncommented in its place and the
previously active line is deleted rather than kept as a comment.
Implementations§
Source§impl Change
impl Change
pub fn id(&self) -> Option<ChangeId>
pub fn ids(&self) -> Vec<ChangeId>
pub fn is_remove(&self) -> bool
pub fn is_follows(&self) -> bool
pub fn uri(&self) -> Option<&String>
pub fn follows_target(&self) -> Option<&AttrPath>
pub fn success_messages(&self) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Change
impl UnwindSafe for Change
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
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> ⓘ
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> ⓘ
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