pub struct RbEnv { /* private fields */ }Expand description
Information about the rb-sys environment.
Implementations§
Source§impl 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 Freeze for RbEnv
impl RefUnwindSafe for RbEnv
impl !Send for RbEnv
impl !Sync for RbEnv
impl Unpin for RbEnv
impl UnwindSafe for RbEnv
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
Mutably borrows from an owned value. Read more