pub struct ResolverMarkerEnvironment(/* private fields */);Expand description
A wrapper type around MarkerEnvironment that ensures the Python version markers are
release-only, to match the resolver’s semantics.
Implementations§
Source§impl ResolverMarkerEnvironment
impl ResolverMarkerEnvironment
Sourcepub fn markers(&self) -> &MarkerEnvironment
pub fn markers(&self) -> &MarkerEnvironment
Returns the underlying MarkerEnvironment.
Methods from Deref<Target = MarkerEnvironment>§
Sourcepub fn get_version(&self, key: CanonicalMarkerValueVersion) -> &Version
pub fn get_version(&self, key: CanonicalMarkerValueVersion) -> &Version
Returns of the PEP 440 version typed value of the key in the current environment
Sourcepub fn get_string(&self, key: CanonicalMarkerValueString) -> &str
pub fn get_string(&self, key: CanonicalMarkerValueString) -> &str
Returns of the stringly typed value of the key in the current environment
Sourcepub fn implementation_name(&self) -> &str
pub fn implementation_name(&self) -> &str
Returns the name of the Python implementation for this environment.
This is equivalent to sys.implementation.name.
Some example values are: cpython.
Sourcepub fn implementation_version(&self) -> &StringVersion
pub fn implementation_version(&self) -> &StringVersion
Returns the Python implementation version for this environment.
This value is derived from sys.implementation.version. See PEP 508
environment markers for full details.
This is equivalent to sys.implementation.name.
Some example values are: 3.4.0, 3.5.0b1.
Sourcepub fn os_name(&self) -> &str
pub fn os_name(&self) -> &str
Returns the name of the operating system for this environment.
This is equivalent to os.name.
Some example values are: posix, java.
Sourcepub fn platform_machine(&self) -> &str
pub fn platform_machine(&self) -> &str
Returns the name of the machine for this environment’s platform.
This is equivalent to platform.machine().
Some example values are: x86_64.
Sourcepub fn platform_python_implementation(&self) -> &str
pub fn platform_python_implementation(&self) -> &str
Returns the name of the Python implementation for this environment’s platform.
This is equivalent to platform.python_implementation().
Some example values are: CPython, Jython.
Sourcepub fn platform_release(&self) -> &str
pub fn platform_release(&self) -> &str
Returns the release for this environment’s platform.
This is equivalent to platform.release().
Some example values are: 3.14.1-x86_64-linode39, 14.5.0, 1.8.0_51.
Sourcepub fn platform_system(&self) -> &str
pub fn platform_system(&self) -> &str
Returns the system for this environment’s platform.
This is equivalent to platform.system().
Some example values are: Linux, Windows, Java.
Sourcepub fn platform_version(&self) -> &str
pub fn platform_version(&self) -> &str
Returns the version for this environment’s platform.
This is equivalent to platform.version().
Some example values are: #1 SMP Fri Apr 25 13:07:35 EDT 2014,
Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Oracle Corporation,
Darwin Kernel Version 14.5.0: Wed Jul 29 02:18:53 PDT 2015; root:xnu-2782.40.9~2/RELEASE_X86_64.
Sourcepub fn python_full_version(&self) -> &StringVersion
pub fn python_full_version(&self) -> &StringVersion
Returns the full version of Python for this environment.
This is equivalent to platform.python_version().
Some example values are: 3.4.0, 3.5.0b1.
Sourcepub fn python_version(&self) -> &StringVersion
pub fn python_version(&self) -> &StringVersion
Returns the version of Python for this environment.
This is equivalent to '.'.join(platform.python_version_tuple()[:2]).
Some example values are: 3.4, 2.7.
Sourcepub fn sys_platform(&self) -> &str
pub fn sys_platform(&self) -> &str
Returns the name of the system platform for this environment.
This is equivalent to sys.platform.
Some example values are: linux, linux2, darwin, java1.8.0_51
(note that linux is from Python3 and linux2 from Python2).
Trait Implementations§
Source§impl Clone for ResolverMarkerEnvironment
impl Clone for ResolverMarkerEnvironment
Source§fn clone(&self) -> ResolverMarkerEnvironment
fn clone(&self) -> ResolverMarkerEnvironment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolverMarkerEnvironment
impl Debug for ResolverMarkerEnvironment
Source§impl Deref for ResolverMarkerEnvironment
impl Deref for ResolverMarkerEnvironment
Source§impl From<MarkerEnvironment> for ResolverMarkerEnvironment
impl From<MarkerEnvironment> for ResolverMarkerEnvironment
Source§fn from(value: MarkerEnvironment) -> Self
fn from(value: MarkerEnvironment) -> Self
impl Eq for ResolverMarkerEnvironment
impl StructuralPartialEq for ResolverMarkerEnvironment
Auto Trait Implementations§
impl Freeze for ResolverMarkerEnvironment
impl RefUnwindSafe for ResolverMarkerEnvironment
impl Send for ResolverMarkerEnvironment
impl Sync for ResolverMarkerEnvironment
impl Unpin for ResolverMarkerEnvironment
impl UnwindSafe for ResolverMarkerEnvironment
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.