pub struct Platform {
pub platform: &'static str,
pub id: u32,
pub name: &'static str,
pub build_name: &'static str,
pub target: &'static str,
pub tapi_target: &'static str,
pub marketing: &'static str,
pub sdk: Option<&'static str>,
}Expand description
Static metadata for a single Apple platform.
All string fields borrow from 'static storage; there is no lifetime
parameter. Obtain instances via ApplePlatform::metadata() or the
From / TryFrom conversions below.
Fields§
§platform: &'static strEnum-style name (e.g. "MACOS").
id: u32Mach-O platform ID.
name: &'static strLowercase name (e.g. "macos").
build_name: &'static strBuild name (e.g. "macos").
target: &'static strClang target OS component (e.g. "macos", "ios-simulator").
tapi_target: &'static strTAPI target (e.g. "macos", "maccatalyst").
marketing: &'static strMarketing name (e.g. "macOS", "iOS Simulator").
sdk: Option<&'static str>SDK name for xcrun --sdk <name> (e.g. "macosx", "iphoneos").
None for the Unknown platform.
Trait Implementations§
Source§impl From<ApplePlatform> for Platform
impl From<ApplePlatform> for Platform
Source§fn from(value: ApplePlatform) -> Self
fn from(value: ApplePlatform) -> Self
Converts to this type from the input type.
Source§impl TryFrom<Platform> for ApplePlatform
Convert a Platform back to an ApplePlatform by its numeric ID.
impl TryFrom<Platform> for ApplePlatform
Convert a Platform back to an ApplePlatform by its numeric ID.
Fails if p.id does not correspond to a known platform.
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
Mutably borrows from an owned value. Read more