pub struct ReleaseMetadata<'a> {
pub copyright: &'a str,
pub description: &'a str,
pub engine: &'a str,
pub engine_version: &'a str,
pub patchlevel: &'a str,
pub platform: &'a str,
pub release_date: &'a str,
pub revision: &'a str,
pub ruby_version: &'a str,
pub compiler_version: Option<&'a str>,
}
Expand description
Information about an Artichoke build.
This build information is injected into artichoke-backend
by the
artichoke
crate at interpreter initialization time.
Fields§
§copyright: &'a str
Copyright information.
This value will populate the RUBY_COPYRIGHT
constant.
§Examples
artichoke - Copyright (c) 2019-2020 Ryan Lopopolo \<rjl@hyperbo.la\>
description: &'a str
A description of the current build.
This value will populate the RUBY_DESCRIPTION
constant.
§Examples
artichoke 0.1.0-pre.0 (2021-01-12 revision 4009) [x86_64-apple-darwin]
engine: &'a str
The engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE
constant.
§Examples
artichoke-mruby
engine_version: &'a str
The version of the engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE_VERSION
constant.
§Examples
0.1.0-pre.0
patchlevel: &'a str
The patch level the current build.
This value will populate the RUBY_PATCHLEVEL
constant.
§Examples
0
platform: &'a str
The target triple of the platform this build targets.
The platform will be a Rust or LLVM target triple.
This value will populate the RUBY_PLATFORM
constant.
§Examples
x86_64-apple-darwin
release_date: &'a str
The build date of this release.
This value will populate the RUBY_RELEASE_DATE
constant.
§Examples
2021-01-12
revision: &'a str
The target MRI Ruby version for this build.
This value will populate the RUBY_VERSION
constant.
§Examples
3.1.2
ruby_version: &'a str
The target MRI Ruby version for this build.
This value will populate the RUBY_VERSION
constant.
§Examples
3.1.2
compiler_version: Option<&'a str>
A description of the compiler used to build Artichoke.
This value will populate the ARTICHOKE_COMPILER_VERSION
constant.
§Examples
rustc 1.49.0 (e1884a8e3 2020-12-29) on x86_64-apple-darwin
Implementations§
Source§impl<'a> ReleaseMetadata<'a>
impl<'a> ReleaseMetadata<'a>
pub const fn new() -> Self
Sourcepub fn with_ruby_copyright(self, copyright: &'a str) -> Self
pub fn with_ruby_copyright(self, copyright: &'a str) -> Self
Set copyright information.
This value will populate the RUBY_COPYRIGHT
constant.
§Examples
artichoke - Copyright (c) 2019-2020 Ryan Lopopolo \<rjl@hyperbo.la\>
Sourcepub fn with_ruby_description(self, description: &'a str) -> Self
pub fn with_ruby_description(self, description: &'a str) -> Self
Set a description of the current build.
This value will populate the RUBY_DESCRIPTION
constant.
§Examples
artichoke 0.1.0-pre.0 (2021-01-12 revision 4009) [x86_64-apple-darwin]
Sourcepub fn with_ruby_engine(self, engine: &'a str) -> Self
pub fn with_ruby_engine(self, engine: &'a str) -> Self
Set the engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE
constant.
§Examples
artichoke-mruby
Sourcepub fn with_ruby_engine_version(self, engine_version: &'a str) -> Self
pub fn with_ruby_engine_version(self, engine_version: &'a str) -> Self
Set the version of the engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE_VERSION
constant.
§Examples
0.1.0-pre.0
Sourcepub fn with_ruby_patchlevel(self, patchlevel: &'a str) -> Self
pub fn with_ruby_patchlevel(self, patchlevel: &'a str) -> Self
Set the patch level the current build.
This value will populate the RUBY_PATCHLEVEL
constant.
§Examples
0
Sourcepub fn with_ruby_platform(self, platform: &'a str) -> Self
pub fn with_ruby_platform(self, platform: &'a str) -> Self
Set the target triple of the platform this build targets.
The platform will be a Rust or LLVM target triple.
This value will populate the RUBY_PLATFORM
constant.
§Examples
x86_64-apple-darwin
Sourcepub fn with_ruby_release_date(self, release_date: &'a str) -> Self
pub fn with_ruby_release_date(self, release_date: &'a str) -> Self
Set the build date of this release.
This value will populate the RUBY_RELEASE_DATE
constant.
§Examples
2021-01-12
Sourcepub fn with_ruby_revision(self, revision: &'a str) -> Self
pub fn with_ruby_revision(self, revision: &'a str) -> Self
Set the target MRI Ruby version for this build.
This value will populate the RUBY_VERSION
constant.
§Examples
3.1.2
Sourcepub fn with_ruby_version(self, ruby_version: &'a str) -> Self
pub fn with_ruby_version(self, ruby_version: &'a str) -> Self
Set the target MRI Ruby version for this build.
This value will populate the RUBY_VERSION
constant.
§Examples
3.1.2
Sourcepub fn with_artichoke_compiler_version(
self,
compiler_version: Option<&'a str>,
) -> Self
pub fn with_artichoke_compiler_version( self, compiler_version: Option<&'a str>, ) -> Self
Set a description of the compiler used to build Artichoke.
This value will populate the ARTICHOKE_COMPILER_VERSION
constant.
§Examples
rustc 1.49.0 (e1884a8e3 2020-12-29) on x86_64-apple-darwin
Sourcepub const fn ruby_copyright(&self) -> &str
pub const fn ruby_copyright(&self) -> &str
Copyright information.
This value will populate the RUBY_COPYRIGHT
constant.
§Examples
artichoke - Copyright (c) 2019-2020 Ryan Lopopolo \<rjl@hyperbo.la\>
Sourcepub const fn ruby_description(&self) -> &str
pub const fn ruby_description(&self) -> &str
A description of the current build.
This value will populate the RUBY_DESCRIPTION
constant.
§Examples
artichoke 0.1.0-pre.0 (2021-01-12 revision 4009) [x86_64-apple-darwin]
Sourcepub const fn ruby_engine(&self) -> &str
pub const fn ruby_engine(&self) -> &str
The engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE
constant.
§Examples
artichoke-mruby
Sourcepub const fn ruby_engine_version(&self) -> &str
pub const fn ruby_engine_version(&self) -> &str
The version of the engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE_VERSION
constant.
§Examples
0.1.0-pre.0
Sourcepub const fn ruby_patchlevel(&self) -> &str
pub const fn ruby_patchlevel(&self) -> &str
The patch level the current build.
This value will populate the RUBY_PATCHLEVEL
constant.
§Examples
0
Sourcepub const fn ruby_platform(&self) -> &str
pub const fn ruby_platform(&self) -> &str
The target triple of the platform this build targets.
The platform will be a Rust or LLVM target triple.
This value will populate the RUBY_PLATFORM
constant.
§Examples
x86_64-apple-darwin
Sourcepub const fn ruby_release_date(&self) -> &str
pub const fn ruby_release_date(&self) -> &str
The build date of this release.
This value will populate the RUBY_RELEASE_DATE
constant.
§Examples
2021-01-12
Sourcepub const fn ruby_revision(&self) -> &str
pub const fn ruby_revision(&self) -> &str
The target MRI Ruby version for this build.
This value will populate the RUBY_VERSION
constant.
§Examples
3.1.2
Sourcepub const fn ruby_version(&self) -> &str
pub const fn ruby_version(&self) -> &str
The target MRI Ruby version for this build.
This value will populate the RUBY_VERSION
constant.
§Examples
3.1.2
Sourcepub const fn artichoke_compiler_version(&self) -> Option<&str>
pub const fn artichoke_compiler_version(&self) -> Option<&str>
A description of the compiler used to build Artichoke.
This value will populate the ARTICHOKE_COMPILER_VERSION
constant.
§Examples
rustc 1.49.0 (e1884a8e3 2020-12-29) on x86_64-apple-darwin
Trait Implementations§
Source§impl<'a> Clone for ReleaseMetadata<'a>
impl<'a> Clone for ReleaseMetadata<'a>
Source§fn clone(&self) -> ReleaseMetadata<'a>
fn clone(&self) -> ReleaseMetadata<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more