Something went wrong. Try again.
[AWIP] Local-first peer-to-peer connectivity and sharing across Android, Linux and Windows, made with Tauri
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041//! Target-neutral description of the platform adapter boundary.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]pub enum PlatformTarget { Linux, Windows, Android, Unsupported,}
impl PlatformTarget { pub const fn current() -> Self { if cfg!(target_os = "linux") { Self::Linux } else if cfg!(target_os = "windows") { Self::Windows } else if cfg!(target_os = "android") { Self::Android } else { Self::Unsupported } }}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]pub struct PlatformDescriptor { pub target: PlatformTarget,}
impl PlatformDescriptor { pub const fn current() -> Self { Self { target: PlatformTarget::current(), } }
pub const fn target(self) -> PlatformTarget { self.target }}