pub struct BinFile {
pub base_name: CompactString,
pub source: PathBuf,
pub archive_source_path: PathBuf,
pub dest: PathBuf,
pub link: Option<PathBuf>,
}
Fields§
§base_name: CompactString
§source: PathBuf
§archive_source_path: PathBuf
§dest: PathBuf
§link: Option<PathBuf>
Implementations§
Source§impl BinFile
impl BinFile
Sourcepub fn new(
data: &Data<'_>,
base_name: &str,
tt: &Template<'_>,
no_symlinks: bool,
) -> Result<Self, Error>
pub fn new( data: &Data<'_>, base_name: &str, tt: &Template<'_>, no_symlinks: bool, ) -> Result<Self, Error>
tt
- must have a template with name “bin_dir”
pub fn preview_bin(&self) -> impl Display + '_
pub fn preview_link(&self) -> impl Display + '_
Sourcepub fn check_source_exists(
&self,
has_file: &mut dyn FnMut(&Path) -> bool,
) -> Result<(), Error>
pub fn check_source_exists( &self, has_file: &mut dyn FnMut(&Path) -> bool, ) -> Result<(), Error>
Return Ok
if the source exists, otherwise Err
.
pub fn install_bin(&self) -> Result<(), Error>
pub fn install_bin_noclobber(&self) -> Result<(), Error>
pub fn install_link(&self) -> Result<(), Error>
pub fn install_link_noclobber(&self) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for BinFile
impl RefUnwindSafe for BinFile
impl Send for BinFile
impl Sync for BinFile
impl Unpin for BinFile
impl UnwindSafe for BinFile
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