Struct rb_sys_env::RbEnv
source · pub struct RbEnv { /* private fields */ }Expand description
Information about the rb-sys environment.
Implementations
sourceimpl RbEnv
impl RbEnv
sourcepub fn ruby_version(&self) -> RubyVersion
pub fn ruby_version(&self) -> RubyVersion
The current Ruby version.
sourcepub fn ruby_major_minor(&self) -> (u8, u8)
pub fn ruby_major_minor(&self) -> (u8, u8)
The (major, minor) tuple of the current Ruby version.
sourcepub fn get_rbconfig_value(&self, key: &str) -> Option<&str>
pub fn get_rbconfig_value(&self, key: &str) -> Option<&str>
Get a value from the current Ruby’s RbConfig::CONFIG.
sourcepub fn cargo_features(&self) -> Vec<String>
pub fn cargo_features(&self) -> Vec<String>
List the Cargo features of rb-sys
sourcepub fn force_link_ruby(self) -> Self
pub fn force_link_ruby(self) -> Self
Tell Cargo to link to libruby, even if rb-sys decided not to.
pub fn encoded_cargo_args(&self) -> Vec<String>
sourcepub fn is_ruby_static(&self) -> bool
pub fn is_ruby_static(&self) -> bool
Indicates if we are using libruby-static.
sourcepub fn print_cargo_rustc_cfg(&self)
pub fn print_cargo_rustc_cfg(&self)
Prints args for rustc (i.e. cargo:rustc-cfg=...).
sourcepub fn print_encoded_cargo_args(&self)
pub fn print_encoded_cargo_args(&self)
Prints directives for rustc (i.e. cargo:rustc-link-lib=...).
sourcepub fn print_cargo_rerun_if_changed(&self)
pub fn print_cargo_rerun_if_changed(&self)
Prints directives for re-runs (i.e. cargo:rerun-if-env-changed=...)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RbEnv
impl !Send for RbEnv
impl !Sync for RbEnv
impl Unpin for RbEnv
impl UnwindSafe for RbEnv
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more