pub struct Link<'a>(/* private fields */);Implementations§
Source§impl<'a> Link<'a>
Builder for link files
impl<'a> Link<'a>
Builder for link files
Sourcepub fn targeting(target: &'a Path) -> Self
pub fn targeting(target: &'a Path) -> Self
Prepares a new link that when opened runs the given executable.
Sourcepub fn set_icon(&mut self, icon: &'a Path) -> &mut Self
pub fn set_icon(&mut self, icon: &'a Path) -> &mut Self
Updates the path to the icon to use for this link
Sourcepub fn set_arguments(&mut self, arguments: &'a str) -> &mut Self
pub fn set_arguments(&mut self, arguments: &'a str) -> &mut Self
Updates the arguments to be passed to the program when started
Sourcepub fn set_working_directory(
&mut self,
working_directory: &'a Path,
) -> &mut Self
pub fn set_working_directory( &mut self, working_directory: &'a Path, ) -> &mut Self
Updates the working directory for this link.
Sourcepub fn save(&mut self, at: &Path) -> Result<(), Error>
pub fn save(&mut self, at: &Path) -> Result<(), Error>
Saves the link at the specified location.
If a file extension is necessary for the platform, it will be appended to the path.
§Errors
The specific errors depend on the platform, but if there is an error, the link won’t be saved.
Makes the link available to the platform’s conventional application menu.
§Errors
The specific errors depend on the platform, but if there is an error, the link won’t be saved.
Trait Implementations§
impl<'a> Eq for Link<'a>
impl<'a> StructuralPartialEq for Link<'a>
Auto Trait Implementations§
impl<'a> Freeze for Link<'a>
impl<'a> RefUnwindSafe for Link<'a>
impl<'a> Send for Link<'a>
impl<'a> Sync for Link<'a>
impl<'a> Unpin for Link<'a>
impl<'a> UnwindSafe for Link<'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