pub struct PythonPackageMetadata { /* private fields */ }
Expand description
Represents a Python METADATA file.
Implementations§
Source§impl PythonPackageMetadata
impl PythonPackageMetadata
Sourcepub fn from_metadata(data: &[u8]) -> Result<PythonPackageMetadata>
pub fn from_metadata(data: &[u8]) -> Result<PythonPackageMetadata>
Create an instance from data in a METADATA file.
Sourcepub fn find_first_header(&self, key: &str) -> Option<&str>
pub fn find_first_header(&self, key: &str) -> Option<&str>
Find the first value of a specified header.
Sourcepub fn find_all_headers(&self, key: &str) -> Vec<&str>
pub fn find_all_headers(&self, key: &str) -> Vec<&str>
Find all values of a specified header.
pub fn name(&self) -> Option<&str>
pub fn version(&self) -> Option<&str>
pub fn license(&self) -> Option<&str>
Auto Trait Implementations§
impl Freeze for PythonPackageMetadata
impl RefUnwindSafe for PythonPackageMetadata
impl Send for PythonPackageMetadata
impl Sync for PythonPackageMetadata
impl Unpin for PythonPackageMetadata
impl UnwindSafe for PythonPackageMetadata
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> 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