pub struct Fragment {
pub id: &'static str,
pub file: &'static str,
pub role: &'static str,
pub placement: &'static str,
pub anchor: Anchor,
pub text: String,
pub present: Option<bool>,
}Expand description
One fragment: what to add, where, and whether it is already there.
Fields§
§id: &'static strThe stable name: flake-input, outputs-argument,
devshell-package, or envrc-sync.
file: &'static strThe file it goes into, relative to the target.
role: &'static strWhat it is for, one phrase.
placement: &'static strHow it goes in: insert-into-attrset, add-to-function-head,
append-to-list, or append-line.
anchor: AnchorWhere it goes in the file.
text: StringThe text to add, rendered.
present: Option<bool>Whether the file already carries it; omitted where the file could not be judged.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fragment
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnsafeUnpin for Fragment
impl UnwindSafe for Fragment
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