pub struct RuntimeLanguageVersion { /* private fields */ }Expand description
One supported language runtime selected for a workspace.
Implementations§
Source§impl RuntimeLanguageVersion
impl RuntimeLanguageVersion
Sourcepub fn parse(spec: &str) -> Result<Self, RuntimeSpecError>
pub fn parse(spec: &str) -> Result<Self, RuntimeSpecError>
Parse a runtime language specification.
§Arguments
spec- Runtime spec inlanguage:versionform.
§Returns
A validated runtime language version.
§Errors
Returns RuntimeSpecError when the spec format, language, or version is unsupported.
Sourcepub const fn language(&self) -> RuntimeLanguage
pub const fn language(&self) -> RuntimeLanguage
Sourcepub fn version(&self) -> &str
pub fn version(&self) -> &str
Return the selected runtime version.
§Returns
The exact version string supported by Codex Universal.
Sourcepub fn environment_variable(&self) -> RuntimeEnvironmentVariable
pub fn environment_variable(&self) -> RuntimeEnvironmentVariable
Convert this runtime spec into a Docker environment variable.
§Returns
The CODEX_ENV_* variable consumed by Codex Universal.
Trait Implementations§
Source§impl Clone for RuntimeLanguageVersion
impl Clone for RuntimeLanguageVersion
Source§fn clone(&self) -> RuntimeLanguageVersion
fn clone(&self) -> RuntimeLanguageVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuntimeLanguageVersion
impl Debug for RuntimeLanguageVersion
impl Eq for RuntimeLanguageVersion
Source§impl PartialEq for RuntimeLanguageVersion
impl PartialEq for RuntimeLanguageVersion
Source§fn eq(&self, other: &RuntimeLanguageVersion) -> bool
fn eq(&self, other: &RuntimeLanguageVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RuntimeLanguageVersion
Auto Trait Implementations§
impl Freeze for RuntimeLanguageVersion
impl RefUnwindSafe for RuntimeLanguageVersion
impl Send for RuntimeLanguageVersion
impl Sync for RuntimeLanguageVersion
impl Unpin for RuntimeLanguageVersion
impl UnsafeUnpin for RuntimeLanguageVersion
impl UnwindSafe for RuntimeLanguageVersion
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.