Struct python_packaging::resource::PythonPackageResource
source · pub struct PythonPackageResource {
pub leaf_package: String,
pub relative_name: String,
pub data: FileData,
pub is_stdlib: bool,
pub is_test: bool,
}
Expand description
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
sourceimpl PythonPackageResource
impl PythonPackageResource
pub fn description(&self) -> String
pub fn to_memory(&self) -> Result<Self>
pub fn symbolic_name(&self) -> String
sourcepub fn resolve_path(&self, prefix: &str) -> PathBuf
pub fn resolve_path(&self, prefix: &str) -> PathBuf
Resolve filesystem path to this bytecode.
Trait Implementations
sourceimpl Clone for PythonPackageResource
impl Clone for PythonPackageResource
sourcefn clone(&self) -> PythonPackageResource
fn clone(&self) -> PythonPackageResource
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PythonPackageResource
impl Debug for PythonPackageResource
sourceimpl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
impl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
sourcefn from(r: &'a PythonPackageResource) -> Self
fn from(r: &'a PythonPackageResource) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<PythonPackageResource> for PythonResource<'a>
impl<'a> From<PythonPackageResource> for PythonResource<'a>
sourcefn from(r: PythonPackageResource) -> Self
fn from(r: PythonPackageResource) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<PythonPackageResource> for PythonPackageResource
impl PartialEq<PythonPackageResource> for PythonPackageResource
sourcefn eq(&self, other: &PythonPackageResource) -> bool
fn eq(&self, other: &PythonPackageResource) -> bool
impl StructuralPartialEq for PythonPackageResource
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more