[−][src]Enum python_packaging::resource::PythonResource
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.
An arbitrary file and its data.
Implementations
impl<'a> PythonResource<'a>
[src]
pub fn full_name(&self) -> String
[src]
Resolves the fully qualified resource name.
pub fn is_in_packages(&self, packages: &[String]) -> bool
[src]
pub fn to_memory(&self) -> Result<Self>
[src]
Create a new instance that is guaranteed to be backed by memory.
Trait Implementations
impl<'a> Clone for PythonResource<'a>
[src]
fn clone(&self) -> PythonResource<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for PythonResource<'a>
[src]
impl<'a> From<&'a FileData> for PythonResource<'a>
[src]
impl<'a> From<&'a PythonEggFile> for PythonResource<'a>
[src]
fn from(e: &'a PythonEggFile) -> Self
[src]
impl<'a> From<&'a PythonExtensionModule> for PythonResource<'a>
[src]
fn from(r: &'a PythonExtensionModule) -> Self
[src]
impl<'a> From<&'a PythonModuleBytecode> for PythonResource<'a>
[src]
fn from(m: &'a PythonModuleBytecode) -> Self
[src]
impl<'a> From<&'a PythonModuleBytecodeFromSource> for PythonResource<'a>
[src]
fn from(m: &'a PythonModuleBytecodeFromSource) -> Self
[src]
impl<'a> From<&'a PythonModuleSource> for PythonResource<'a>
[src]
fn from(m: &'a PythonModuleSource) -> Self
[src]
impl<'a> From<&'a PythonPackageDistributionResource> for PythonResource<'a>
[src]
fn from(r: &'a PythonPackageDistributionResource) -> Self
[src]
impl<'a> From<&'a PythonPackageResource> for PythonResource<'a>
[src]
fn from(r: &'a PythonPackageResource) -> Self
[src]
impl<'a> From<&'a PythonPathExtension> for PythonResource<'a>
[src]
fn from(e: &'a PythonPathExtension) -> Self
[src]
impl<'a> From<FileData> for PythonResource<'a>
[src]
impl<'a> From<PythonEggFile> for PythonResource<'a>
[src]
fn from(e: PythonEggFile) -> Self
[src]
impl<'a> From<PythonExtensionModule> for PythonResource<'a>
[src]
fn from(r: PythonExtensionModule) -> Self
[src]
impl<'a> From<PythonModuleBytecode> for PythonResource<'a>
[src]
fn from(m: PythonModuleBytecode) -> Self
[src]
impl<'a> From<PythonModuleBytecodeFromSource> for PythonResource<'a>
[src]
fn from(m: PythonModuleBytecodeFromSource) -> Self
[src]
impl<'a> From<PythonModuleSource> for PythonResource<'a>
[src]
fn from(m: PythonModuleSource) -> Self
[src]
impl<'a> From<PythonPackageDistributionResource> for PythonResource<'a>
[src]
fn from(r: PythonPackageDistributionResource) -> Self
[src]
impl<'a> From<PythonPackageResource> for PythonResource<'a>
[src]
fn from(r: PythonPackageResource) -> Self
[src]
impl<'a> From<PythonPathExtension> for PythonResource<'a>
[src]
fn from(e: PythonPathExtension) -> Self
[src]
impl<'a> PartialEq<PythonResource<'a>> for PythonResource<'a>
[src]
fn eq(&self, other: &PythonResource<'a>) -> bool
[src]
fn ne(&self, other: &PythonResource<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for PythonResource<'a>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,