pub enum Platform {
MacosArm64,
MacosX86_64,
LinuxX86_64,
WindowsX86_64,
}Expand description
One of the four platforms that Tableau publishes a hyperd build for.
The variant names encode both OS and architecture and map 1:1 to the
slugs used in the release URL structure and in hyperd-version.toml.
Variants§
MacosArm64
Apple Silicon macOS (aarch64-apple-darwin).
MacosX86_64
Intel macOS (x86_64-apple-darwin).
LinuxX86_64
64-bit Linux (x86_64-unknown-linux-gnu).
WindowsX86_64
64-bit Windows (x86_64-pc-windows-msvc).
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn current() -> Result<Self, Error>
pub fn current() -> Result<Self, Error>
Detects the current host’s platform.
Uses std::env::consts::OS and std::env::consts::ARCH. Returns
Error::UnsupportedPlatform for any combination that has no
published hyperd build.
§Errors
Returns Error::UnsupportedPlatform when the host OS/arch pair
does not match one of the four supported targets.
Sourcepub fn slug(self) -> &'static str
pub fn slug(self) -> &'static str
Returns the kebab-case slug used in release URLs and version metadata
(for example, "macos-arm64").
Sourcepub fn executable_name(self) -> &'static str
pub fn executable_name(self) -> &'static str
Returns the file name of the hyperd executable on this platform
("hyperd.exe" on Windows, "hyperd" elsewhere).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Platform
impl<'de> Deserialize<'de> for Platform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Copy for Platform
impl Eq for Platform
impl StructuralPartialEq for Platform
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnsafeUnpin for Platform
impl UnwindSafe for Platform
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.