Struct artichoke::prelude::ReleaseMetadata
source · 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
§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() -> ReleaseMetadata<'a>
sourcepub fn with_ruby_copyright(self, copyright: &'a str) -> ReleaseMetadata<'a>
pub fn with_ruby_copyright(self, copyright: &'a str) -> ReleaseMetadata<'a>
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) -> ReleaseMetadata<'a>
pub fn with_ruby_description(self, description: &'a str) -> ReleaseMetadata<'a>
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) -> ReleaseMetadata<'a>
pub fn with_ruby_engine(self, engine: &'a str) -> ReleaseMetadata<'a>
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
) -> ReleaseMetadata<'a>
pub fn with_ruby_engine_version( self, engine_version: &'a str ) -> ReleaseMetadata<'a>
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) -> ReleaseMetadata<'a>
pub fn with_ruby_patchlevel(self, patchlevel: &'a str) -> ReleaseMetadata<'a>
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) -> ReleaseMetadata<'a>
pub fn with_ruby_platform(self, platform: &'a str) -> ReleaseMetadata<'a>
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
) -> ReleaseMetadata<'a>
pub fn with_ruby_release_date( self, release_date: &'a str ) -> ReleaseMetadata<'a>
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) -> ReleaseMetadata<'a>
pub fn with_ruby_revision(self, revision: &'a str) -> ReleaseMetadata<'a>
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) -> ReleaseMetadata<'a>
pub fn with_ruby_version(self, ruby_version: &'a str) -> ReleaseMetadata<'a>
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>
) -> ReleaseMetadata<'a>
pub fn with_artichoke_compiler_version( self, compiler_version: Option<&'a str> ) -> ReleaseMetadata<'a>
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
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 moresource§impl<'a> Debug for ReleaseMetadata<'a>
impl<'a> Debug for ReleaseMetadata<'a>
source§impl<'a> Default for ReleaseMetadata<'a>
impl<'a> Default for ReleaseMetadata<'a>
source§fn default() -> ReleaseMetadata<'a>
fn default() -> ReleaseMetadata<'a>
source§impl<'a> Hash for ReleaseMetadata<'a>
impl<'a> Hash for ReleaseMetadata<'a>
source§impl<'a> Ord for ReleaseMetadata<'a>
impl<'a> Ord for ReleaseMetadata<'a>
source§fn cmp(&self, other: &ReleaseMetadata<'a>) -> Ordering
fn cmp(&self, other: &ReleaseMetadata<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<'a> PartialEq<ReleaseMetadata<'a>> for ReleaseMetadata<'a>
impl<'a> PartialEq<ReleaseMetadata<'a>> for ReleaseMetadata<'a>
source§fn eq(&self, other: &ReleaseMetadata<'a>) -> bool
fn eq(&self, other: &ReleaseMetadata<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd<ReleaseMetadata<'a>> for ReleaseMetadata<'a>
impl<'a> PartialOrd<ReleaseMetadata<'a>> for ReleaseMetadata<'a>
source§fn partial_cmp(&self, other: &ReleaseMetadata<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &ReleaseMetadata<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more