Struct python_packaging::resource::PythonPackageResource [−][src]
pub struct PythonPackageResource { pub leaf_package: String, pub relative_name: String, pub data: FileData, pub is_stdlib: bool, pub is_test: bool, }
Python package resource data, agnostic of storage location.
Fields
leaf_package: String
The leaf-most Python package this resource belongs to.
relative_name: String
The relative path within leaf_package
to this resource.
data: FileData
Location of resource data.
is_stdlib: bool
Whether this resource belongs to the Python standard library.
Modules with this set are distributed as part of Python itself.
is_test: bool
Whether this resource belongs to a package that is a test.
Implementations
impl PythonPackageResource
[src]
impl PythonPackageResource
[src]pub fn to_memory(&self) -> Result<Self>
[src]
pub fn symbolic_name(&self) -> String
[src]
pub fn resolve_path(&self, prefix: &str) -> PathBuf
[src]
pub fn resolve_path(&self, prefix: &str) -> PathBuf
[src]Resolve filesystem path to this bytecode.
Trait Implementations
impl Clone for PythonPackageResource
[src]
impl Clone for PythonPackageResource
[src]fn clone(&self) -> PythonPackageResource
[src]
fn clone(&self) -> PythonPackageResource
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for PythonPackageResource
[src]
impl Debug for PythonPackageResource
[src]impl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
[src]
impl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
[src]fn from(r: &'a PythonPackageResource) -> Self
[src]
fn from(r: &'a PythonPackageResource) -> Self
[src]Performs the conversion.
impl<'a> From<PythonPackageResource> for PythonResource<'a>
[src]
impl<'a> From<PythonPackageResource> for PythonResource<'a>
[src]fn from(r: PythonPackageResource) -> Self
[src]
fn from(r: PythonPackageResource) -> Self
[src]Performs the conversion.
impl PartialEq<PythonPackageResource> for PythonPackageResource
[src]
impl PartialEq<PythonPackageResource> for PythonPackageResource
[src]fn eq(&self, other: &PythonPackageResource) -> bool
[src]
fn eq(&self, other: &PythonPackageResource) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &PythonPackageResource) -> bool
[src]
fn ne(&self, other: &PythonPackageResource) -> bool
[src]This method tests for !=
.
impl StructuralPartialEq for PythonPackageResource
[src]
Auto Trait Implementations
impl RefUnwindSafe for PythonPackageResource
impl Send for PythonPackageResource
impl Sync for PythonPackageResource
impl Unpin for PythonPackageResource
impl UnwindSafe for PythonPackageResource
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more