pub struct Platform {
pub os: Os,
pub arch: Arch,
pub variant: Option<String>,
}Expand description
Target platform for OCI image resolution.
Used to select the correct manifest from a multi-platform OCI index.
Fields§
§os: OsOperating system (always linux for microsandbox).
arch: ArchCPU architecture (e.g., amd64, arm64).
variant: Option<String>Optional architecture variant (e.g., v7 for armv7).
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn with_variant(
os: impl Into<Os>,
arch: impl Into<Arch>,
variant: impl Into<String>,
) -> Self
pub fn with_variant( os: impl Into<Os>, arch: impl Into<Arch>, variant: impl Into<String>, ) -> Self
Create a new platform with variant.
Sourcepub fn host_linux() -> Self
pub fn host_linux() -> Self
Returns the platform for the current host, with OS forced to linux.
Architecture detected via std::env::consts::ARCH:
x86_64 -> amd64, aarch64 -> arm64.
Trait Implementations§
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