Enum cargo_deb::manifest::AssetSource
source · pub enum AssetSource {
Path(PathBuf),
Symlink(PathBuf),
Data(Vec<u8>),
}
Variants§
Path(PathBuf)
Copy file from the path (and strip binary if needed).
Symlink(PathBuf)
A symlink existing in the file system
Data(Vec<u8>)
Write data to destination as-is.
Implementations§
source§impl AssetSource
impl AssetSource
sourcepub fn from_path(
path: impl Into<PathBuf>,
preserve_existing_symlink: bool
) -> Self
pub fn from_path( path: impl Into<PathBuf>, preserve_existing_symlink: bool ) -> Self
Symlink must exist on disk to be preserved
pub fn path(&self) -> Option<&Path>
pub fn archive_as_symlink_only(&self) -> bool
pub fn file_size(&self) -> Option<u64>
pub fn data(&self) -> CDResult<Cow<'_, [u8]>>
sourcepub fn debug_source(&self) -> Option<PathBuf>
pub fn debug_source(&self) -> Option<PathBuf>
Return the file that will hold debug symbols for this asset.
This is just <original-file>.debug
Trait Implementations§
source§impl Clone for AssetSource
impl Clone for AssetSource
source§fn clone(&self) -> AssetSource
fn clone(&self) -> AssetSource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for AssetSource
impl Send for AssetSource
impl Sync for AssetSource
impl Unpin for AssetSource
impl UnwindSafe for AssetSource
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