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 strCopyright information.
This value will populate the RUBY_COPYRIGHT constant.
§Examples
artichoke - Copyright (c) 2019-2020 Ryan Lopopolo \<rjl@hyperbo.la\>description: &'a strA 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 strThe engine, or VM, used in the current build.
This value will populate the RUBY_ENGINE constant.
§Examples
artichoke-mrubyengine_version: &'a strThe 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.0patchlevel: &'a strThe patch level the current build.
This value will populate the RUBY_PATCHLEVEL constant.
§Examples
0platform: &'a strThe 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-darwinrelease_date: &'a strThe build date of this release.
This value will populate the RUBY_RELEASE_DATE constant.
§Examples
2021-01-12revision: &'a strThe target MRI Ruby version for this build.
This value will populate the RUBY_VERSION constant.
§Examples
3.1.2ruby_version: &'a strThe target MRI Ruby version for this build.
This value will populate the RUBY_VERSION constant.
§Examples
3.1.2compiler_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-darwinImplementations§
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-mrubySourcepub 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.0Sourcepub 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
0Sourcepub 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-darwinSourcepub 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-12Sourcepub 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.2Sourcepub 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.2Sourcepub 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-darwinSourcepub 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-mrubySourcepub 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.0Sourcepub 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
0Sourcepub 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-darwinSourcepub 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-12Sourcepub 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.2Sourcepub 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.2Sourcepub 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-darwinTrait 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