pub struct HostEnv {
pub surface: Surface,
pub vendor: Option<WebVendor>,
pub os: &'static str,
}Expand description
Where this client runs.
Fields§
§surface: SurfaceWeb vendor host or the user’s machine.
vendor: Option<WebVendor>Which vendor box, when web.
os: &'static strstd::env::consts::OS (linux, macos, windows).
Implementations§
Source§impl HostEnv
impl HostEnv
Sourcepub fn detect_from(
get: impl Fn(&str) -> Option<String>,
exists: impl Fn(&Path) -> bool,
) -> HostEnv
pub fn detect_from( get: impl Fn(&str) -> Option<String>, exists: impl Fn(&Path) -> bool, ) -> HostEnv
Detection with injected lookups (tests).
Order: SURFACE_ENV / WEB_VENDOR_ENV overrides, then vendor
markers: CLAUDE_CODE_REMOTE=true (Claude web container),
<home>/agent-data (Grok Bot box). Anything else is local.
Trait Implementations§
impl Copy for HostEnv
impl Eq for HostEnv
impl StructuralPartialEq for HostEnv
Auto Trait Implementations§
impl Freeze for HostEnv
impl RefUnwindSafe for HostEnv
impl Send for HostEnv
impl Sync for HostEnv
impl Unpin for HostEnv
impl UnsafeUnpin for HostEnv
impl UnwindSafe for HostEnv
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.