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§
Source§impl 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§
Source§impl Clone for PythonPackageResource
impl Clone for PythonPackageResource
Source§fn clone(&self) -> PythonPackageResource
fn clone(&self) -> PythonPackageResource
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 moreSource§impl Debug for PythonPackageResource
impl Debug for PythonPackageResource
Source§impl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
impl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
Source§fn from(r: &'a PythonPackageResource) -> Self
fn from(r: &'a PythonPackageResource) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PythonPackageResource> for PythonResource<'a>
impl<'a> From<PythonPackageResource> for PythonResource<'a>
Source§fn from(r: PythonPackageResource) -> Self
fn from(r: PythonPackageResource) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PythonPackageResource
impl PartialEq for PythonPackageResource
impl StructuralPartialEq for PythonPackageResource
Auto Trait Implementations§
impl Freeze for PythonPackageResource
impl RefUnwindSafe for PythonPackageResource
impl Send for PythonPackageResource
impl Sync for PythonPackageResource
impl Unpin for PythonPackageResource
impl UnwindSafe for PythonPackageResource
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more