pub struct TargetPlatform {
pub os: String,
pub arch: String,
pub abi: String,
}Expand description
Operating-system, architecture, and ABI selector used for component matching.
Fields§
§os: StringCanonical operating-system name.
arch: StringCanonical architecture name.
abi: StringABI selector, or native when the OS contract has no separate ABI dimension.
Implementations§
Source§impl TargetPlatform
impl TargetPlatform
Sourcepub fn selector(&self) -> String
pub fn selector(&self) -> String
Return the canonical platform selector used by configuration constraints.
Sourcepub fn validate_supported(&self) -> Result<(), ForgeError>
pub fn validate_supported(&self) -> Result<(), ForgeError>
Reject targets outside the release-supported platform matrix.
§Errors
Returns crate::error::ForgeError::Config for an unsupported operating-system,
architecture, or ABI combination.
Trait Implementations§
Source§impl Clone for TargetPlatform
impl Clone for TargetPlatform
Source§fn clone(&self) -> TargetPlatform
fn clone(&self) -> TargetPlatform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TargetPlatform
impl Debug for TargetPlatform
Source§impl<'de> Deserialize<'de> for TargetPlatform
impl<'de> Deserialize<'de> for TargetPlatform
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TargetPlatform
Source§impl PartialEq for TargetPlatform
impl PartialEq for TargetPlatform
Source§impl Serialize for TargetPlatform
impl Serialize for TargetPlatform
impl StructuralPartialEq for TargetPlatform
Auto Trait Implementations§
impl Freeze for TargetPlatform
impl RefUnwindSafe for TargetPlatform
impl Send for TargetPlatform
impl Sync for TargetPlatform
impl Unpin for TargetPlatform
impl UnsafeUnpin for TargetPlatform
impl UnwindSafe for TargetPlatform
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.