pub struct Data {
pub interpreter: PathBuf,
pub args: Vec<OsString>,
}
Expand description
Shebang information as parsed from a buffer that should contain at least one line.
§Deviation
According to the shebang documentation, it will only consider the path of the executable, along with the arguments as the consecutive portion after the space that separates them. Argument splitting would then have to be done elsewhere, probably in the kernel.
To make that work without the kernel, we perform the splitting while Git just ignores options. For now it seems more compatible to not ignore options, but if it is important this could be changed.
Fields§
§interpreter: PathBuf
The interpreter to run.
args: Vec<OsString>
The remainder of the line past the space after interpreter
, without leading or trailing whitespace,
as pre-split arguments just like a shell would do it.
Note that we accept that illformed UTF-8 will prevent argument splitting.
Trait Implementations§
source§impl Ord for Data
impl Ord for Data
source§impl PartialOrd for Data
impl PartialOrd for Data
impl Eq for Data
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)