pub struct PackageFile { /* private fields */ }Expand description
Represents a single file in a Wick package.
Implementations§
Source§impl PackageFile
impl PackageFile
pub fn new( package_path: PathBuf, hash: String, media_type: String, contents: Bytes, ) -> Self
Sourcepub const fn package_path(&self) -> &PathBuf
pub const fn package_path(&self) -> &PathBuf
Get path for the file.
Sourcepub fn media_type(&self) -> &str
pub fn media_type(&self) -> &str
Get media type for the file.
Sourcepub fn into_contents(self) -> Bytes
pub fn into_contents(self) -> Bytes
Get contents for the file.
Trait Implementations§
Source§impl Clone for PackageFile
impl Clone for PackageFile
Source§fn clone(&self) -> PackageFile
fn clone(&self) -> PackageFile
Returns a duplicate 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 !Freeze for PackageFile
impl RefUnwindSafe for PackageFile
impl Send for PackageFile
impl Sync for PackageFile
impl Unpin for PackageFile
impl UnwindSafe for PackageFile
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