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,
) -> Self
pub fn detect_from( get: impl Fn(&str) -> Option<String>, exists: impl Fn(&Path) -> bool, ) -> Self
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