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 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§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 for ReleaseMetadata<'a>
impl<'a> PartialEq for ReleaseMetadata<'a>
source§impl<'a> PartialOrd for ReleaseMetadata<'a>
impl<'a> PartialOrd for ReleaseMetadata<'a>
source§impl<'a> ReleaseMetadata for ReleaseMetadata<'a>
impl<'a> ReleaseMetadata for ReleaseMetadata<'a>
source§fn ruby_copyright(&self) -> &str
fn ruby_copyright(&self) -> &str
source§fn ruby_description(&self) -> &str
fn ruby_description(&self) -> &str
source§fn ruby_engine(&self) -> &str
fn ruby_engine(&self) -> &str
source§fn ruby_engine_version(&self) -> &str
fn ruby_engine_version(&self) -> &str
source§fn ruby_patchlevel(&self) -> &str
fn ruby_patchlevel(&self) -> &str
source§fn ruby_platform(&self) -> &str
fn ruby_platform(&self) -> &str
source§fn ruby_release_date(&self) -> &str
fn ruby_release_date(&self) -> &str
source§fn ruby_revision(&self) -> &str
fn ruby_revision(&self) -> &str
source§fn ruby_version(&self) -> &str
fn ruby_version(&self) -> &str
impl<'a> Copy for ReleaseMetadata<'a>
impl<'a> Eq for ReleaseMetadata<'a>
impl<'a> StructuralPartialEq for ReleaseMetadata<'a>
Auto Trait Implementations§
impl<'a> Freeze for ReleaseMetadata<'a>
impl<'a> RefUnwindSafe for ReleaseMetadata<'a>
impl<'a> Send for ReleaseMetadata<'a>
impl<'a> Sync for ReleaseMetadata<'a>
impl<'a> Unpin for ReleaseMetadata<'a>
impl<'a> UnwindSafe for ReleaseMetadata<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)