pub struct Runtime {
pub language: Language,
pub name: String,
pub version: Option<String>,
pub version_source: Option<String>,
pub package_manager: Option<PackageManagerInfo>,
pub framework: Option<String>,
pub language_config: Option<LanguageConfig>,
pub output_dir: Option<String>,
pub install: Option<String>,
pub build: Option<String>,
pub start: Option<String>,
pub dev: Option<String>,
}Expand description
One language runtime within a service. A Rails+React service has two: one for Ruby, one for Node.
Fields§
§language: Language§name: StringTool name for provisioning (e.g. “node”, “ruby”, “deno”, “bun”).
version: Option<String>§version_source: Option<String>§package_manager: Option<PackageManagerInfo>§framework: Option<String>§language_config: Option<LanguageConfig>§output_dir: Option<String>§install: Option<String>§build: Option<String>§start: Option<String>§dev: Option<String>Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn from_context(ctx: &DirContext) -> Option<Self>
pub fn from_context(ctx: &DirContext) -> Option<Self>
Convert a DirContext into a Runtime. Returns None if the context has no language and no recognizable runtime name.
Sourcepub fn to_context(&self, dir: &str) -> DirContext
pub fn to_context(&self, dir: &str) -> DirContext
Convert back to a DirContext (for layering derived services onto explicit ones).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Runtime
impl<'de> Deserialize<'de> for Runtime
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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