pub struct Prelude<'a> {
pub line: &'a str,
}Expand description
Optional file-format prelude prepended ahead of the block when install has to fresh-create a file (or when appending to a file that lacks it).
Markdown surfaces pass None. The git-hook surface passes
Some(Prelude { line: SHEBANG }) so a fresh hook starts with an
interpreter line and a hook authored without one gains it.
Fields§
§line: &'a strThe prelude line (e.g. a shebang), inserted without a trailing
newline — install_block adds the separator.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Prelude<'a>
impl<'a> RefUnwindSafe for Prelude<'a>
impl<'a> Send for Prelude<'a>
impl<'a> Sync for Prelude<'a>
impl<'a> Unpin for Prelude<'a>
impl<'a> UnsafeUnpin for Prelude<'a>
impl<'a> UnwindSafe for Prelude<'a>
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