pub struct Package { /* private fields */ }
Expand description
A struct contains package manifest and its root path.
Implementations§
Source§impl Package
impl Package
Sourcepub fn from_path(path: PathBuf) -> Result<Self, TomlReadError>
pub fn from_path(path: PathBuf) -> Result<Self, TomlReadError>
Creates a package from the specified path.
Sourcepub fn from_manifest_and_path(manifest: Manifest, path: PathBuf) -> Self
pub fn from_manifest_and_path(manifest: Manifest, path: PathBuf) -> Self
Creates a package from the manifest and package path.
Sourcepub fn relative_readme_path(&self) -> Option<&Path>
pub fn relative_readme_path(&self) -> Option<&Path>
Returns package relative readme path.
Sourcepub fn default_relative_readme_path(&self) -> Option<&Path>
pub fn default_relative_readme_path(&self) -> Option<&Path>
Returns package relative default readme path.
Trait Implementations§
impl Eq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.