Enum python_packaging::resource::PythonResource
source · [−]pub enum PythonResource<'a> {
ModuleSource(Cow<'a, PythonModuleSource>),
ModuleBytecodeRequest(Cow<'a, PythonModuleBytecodeFromSource>),
ModuleBytecode(Cow<'a, PythonModuleBytecode>),
PackageResource(Cow<'a, PythonPackageResource>),
PackageDistributionResource(Cow<'a, PythonPackageDistributionResource>),
ExtensionModule(Cow<'a, PythonExtensionModule>),
EggFile(Cow<'a, PythonEggFile>),
PathExtension(Cow<'a, PythonPathExtension>),
File(Cow<'a, File>),
}
Expand description
Represents a resource that can be read by Python somehow.
Variants
ModuleSource(Cow<'a, PythonModuleSource>)
A module defined by source code.
ModuleBytecodeRequest(Cow<'a, PythonModuleBytecodeFromSource>)
A module defined by a request to generate bytecode from source.
ModuleBytecode(Cow<'a, PythonModuleBytecode>)
A module defined by existing bytecode.
PackageResource(Cow<'a, PythonPackageResource>)
A non-module resource file.
PackageDistributionResource(Cow<'a, PythonPackageDistributionResource>)
A file in a Python package distribution metadata collection.
ExtensionModule(Cow<'a, PythonExtensionModule>)
An extension module.
EggFile(Cow<'a, PythonEggFile>)
A self-contained Python egg.
PathExtension(Cow<'a, PythonPathExtension>)
A path extension.
File(Cow<'a, File>)
An arbitrary file and its data.
Implementations
sourceimpl<'a> PythonResource<'a>
impl<'a> PythonResource<'a>
Trait Implementations
sourceimpl<'a> Clone for PythonResource<'a>
impl<'a> Clone for PythonResource<'a>
sourcefn clone(&self) -> PythonResource<'a>
fn clone(&self) -> PythonResource<'a>
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 more
sourceimpl<'a> Debug for PythonResource<'a>
impl<'a> Debug for PythonResource<'a>
sourceimpl<'a> From<&'a File> for PythonResource<'a>
impl<'a> From<&'a File> for PythonResource<'a>
sourceimpl<'a> From<&'a PythonEggFile> for PythonResource<'a>
impl<'a> From<&'a PythonEggFile> for PythonResource<'a>
sourcefn from(e: &'a PythonEggFile) -> Self
fn from(e: &'a PythonEggFile) -> Self
Performs the conversion.
sourceimpl<'a> From<&'a PythonExtensionModule> for PythonResource<'a>
impl<'a> From<&'a PythonExtensionModule> for PythonResource<'a>
sourcefn from(r: &'a PythonExtensionModule) -> Self
fn from(r: &'a PythonExtensionModule) -> Self
Performs the conversion.
sourceimpl<'a> From<&'a PythonModuleBytecode> for PythonResource<'a>
impl<'a> From<&'a PythonModuleBytecode> for PythonResource<'a>
sourcefn from(m: &'a PythonModuleBytecode) -> Self
fn from(m: &'a PythonModuleBytecode) -> Self
Performs the conversion.
sourceimpl<'a> From<&'a PythonModuleBytecodeFromSource> for PythonResource<'a>
impl<'a> From<&'a PythonModuleBytecodeFromSource> for PythonResource<'a>
sourcefn from(m: &'a PythonModuleBytecodeFromSource) -> Self
fn from(m: &'a PythonModuleBytecodeFromSource) -> Self
Performs the conversion.
sourceimpl<'a> From<&'a PythonModuleSource> for PythonResource<'a>
impl<'a> From<&'a PythonModuleSource> for PythonResource<'a>
sourcefn from(m: &'a PythonModuleSource) -> Self
fn from(m: &'a PythonModuleSource) -> Self
Performs the conversion.
sourceimpl<'a> From<&'a PythonPackageDistributionResource> for PythonResource<'a>
impl<'a> From<&'a PythonPackageDistributionResource> for PythonResource<'a>
sourcefn from(r: &'a PythonPackageDistributionResource) -> Self
fn from(r: &'a PythonPackageDistributionResource) -> Self
Performs the conversion.
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
Performs the conversion.
sourceimpl<'a> From<&'a PythonPathExtension> for PythonResource<'a>
impl<'a> From<&'a PythonPathExtension> for PythonResource<'a>
sourcefn from(e: &'a PythonPathExtension) -> Self
fn from(e: &'a PythonPathExtension) -> Self
Performs the conversion.
sourceimpl<'a> From<File> for PythonResource<'a>
impl<'a> From<File> for PythonResource<'a>
sourceimpl<'a> From<PythonEggFile> for PythonResource<'a>
impl<'a> From<PythonEggFile> for PythonResource<'a>
sourcefn from(e: PythonEggFile) -> Self
fn from(e: PythonEggFile) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonExtensionModule> for PythonResource<'a>
impl<'a> From<PythonExtensionModule> for PythonResource<'a>
sourcefn from(r: PythonExtensionModule) -> Self
fn from(r: PythonExtensionModule) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonModuleBytecode> for PythonResource<'a>
impl<'a> From<PythonModuleBytecode> for PythonResource<'a>
sourcefn from(m: PythonModuleBytecode) -> Self
fn from(m: PythonModuleBytecode) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonModuleBytecodeFromSource> for PythonResource<'a>
impl<'a> From<PythonModuleBytecodeFromSource> for PythonResource<'a>
sourcefn from(m: PythonModuleBytecodeFromSource) -> Self
fn from(m: PythonModuleBytecodeFromSource) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonModuleSource> for PythonResource<'a>
impl<'a> From<PythonModuleSource> for PythonResource<'a>
sourcefn from(m: PythonModuleSource) -> Self
fn from(m: PythonModuleSource) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonPackageDistributionResource> for PythonResource<'a>
impl<'a> From<PythonPackageDistributionResource> for PythonResource<'a>
sourcefn from(r: PythonPackageDistributionResource) -> Self
fn from(r: PythonPackageDistributionResource) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonPackageResource> for PythonResource<'a>
impl<'a> From<PythonPackageResource> for PythonResource<'a>
sourcefn from(r: PythonPackageResource) -> Self
fn from(r: PythonPackageResource) -> Self
Performs the conversion.
sourceimpl<'a> From<PythonPathExtension> for PythonResource<'a>
impl<'a> From<PythonPathExtension> for PythonResource<'a>
sourcefn from(e: PythonPathExtension) -> Self
fn from(e: PythonPathExtension) -> Self
Performs the conversion.
sourceimpl<'a> PartialEq<PythonResource<'a>> for PythonResource<'a>
impl<'a> PartialEq<PythonResource<'a>> for PythonResource<'a>
sourcefn eq(&self, other: &PythonResource<'a>) -> bool
fn eq(&self, other: &PythonResource<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PythonResource<'a>) -> bool
fn ne(&self, other: &PythonResource<'a>) -> bool
This method tests for !=
.
impl<'a> StructuralPartialEq for PythonResource<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for PythonResource<'a>
impl<'a> Send for PythonResource<'a>
impl<'a> Sync for PythonResource<'a>
impl<'a> Unpin for PythonResource<'a>
impl<'a> UnwindSafe for PythonResource<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more