#[non_exhaustive]pub struct Runtime {
pub name: String,
pub display_name: String,
pub stage: RuntimeStage,
pub warnings: Vec<String>,
pub environment: Environment,
pub deprecation_date: Option<Date>,
pub decommission_date: Option<Date>,
/* private fields */
}
Expand description
Describes a runtime and any special information (e.g., deprecation status) related to it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The name of the runtime, e.g., ‘go113’, ‘nodejs12’, etc.
display_name: String
The user facing name, eg ‘Go 1.13’, ‘Node.js 12’, etc.
stage: RuntimeStage
The stage of life this runtime is in, e.g., BETA, GA, etc.
warnings: Vec<String>
Warning messages, e.g., a deprecation warning.
environment: Environment
The environment for the runtime.
deprecation_date: Option<Date>
Deprecation date for the runtime.
decommission_date: Option<Date>
Decommission date for the runtime.
Implementations§
Source§impl Runtime
impl Runtime
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_stage<T: Into<RuntimeStage>>(self, v: T) -> Self
pub fn set_stage<T: Into<RuntimeStage>>(self, v: T) -> Self
Sets the value of stage.
Sourcepub fn set_warnings<T, V>(self, v: T) -> Self
pub fn set_warnings<T, V>(self, v: T) -> Self
Sets the value of warnings.
Sourcepub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
pub fn set_environment<T: Into<Environment>>(self, v: T) -> Self
Sets the value of environment.
Sourcepub fn set_deprecation_date<T>(self, v: T) -> Self
pub fn set_deprecation_date<T>(self, v: T) -> Self
Sets the value of deprecation_date.
Sourcepub fn set_or_clear_deprecation_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deprecation_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of deprecation_date.
Sourcepub fn set_decommission_date<T>(self, v: T) -> Self
pub fn set_decommission_date<T>(self, v: T) -> Self
Sets the value of decommission_date.
Sourcepub fn set_or_clear_decommission_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_decommission_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of decommission_date.
Trait Implementations§
impl StructuralPartialEq for Runtime
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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