Struct lapce_plugin::VoltEnvironment
source · pub struct VoltEnvironment {}
Expand description
Helper struct abstracting environment variables names used in lapce to provide revelant host environment information, so plugin maintainers don’t have to hardcode specific variable names
Implementations§
source§impl VoltEnvironment
impl VoltEnvironment
sourcepub fn operating_system() -> Result<String, VarError>
pub fn operating_system() -> Result<String, VarError>
Operating system name as provided by std::env::consts::OS
sourcepub fn architecture() -> Result<String, VarError>
pub fn architecture() -> Result<String, VarError>
Processor architecture name as provided by std::env::consts::ARCH
sourcepub fn libc() -> Result<String, VarError>
pub fn libc() -> Result<String, VarError>
C library used on host detected by parsing ldd output provided because of musl-based linux distros and distros that need statically linked binaries due to how linking works (e.g. nixOS) Currently only 2 options are available: glibc | musl This function will return empty string on non-linux hosts
Auto Trait Implementations§
impl RefUnwindSafe for VoltEnvironment
impl Send for VoltEnvironment
impl Sync for VoltEnvironment
impl Unpin for VoltEnvironment
impl UnwindSafe for VoltEnvironment
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