pub struct Selection {
pub distro: Option<Distro>,
pub triple: Option<String>,
pub glibc: Option<GlibcVersion>,
pub kernel: Option<KernelVersion>,
}Expand description
A validated selection.
Fields§
§distro: Option<Distro>The preset, when one was chosen.
triple: Option<String>Rust target triple without any glibc suffix, when one was given.
glibc: Option<GlibcVersion>glibc floor; None means the host’s glibc.
kernel: Option<KernelVersion>Kernel floor; None means the kernel is not simulated (host kernel).
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn resolve(req: &Request<'_>) -> Result<Self, String>
pub fn resolve(req: &Request<'_>) -> Result<Self, String>
Applies the selection rules:
distroexcludesglibc,kernel, and a versionedtarget.- A versioned
target(TRIPLE.X.Y) sets the glibc floor; it must agree withglibcif both are given. It never implies a kernel. - Anything not given stays
None: host glibc, host kernel.
Trait Implementations§
impl Eq for Selection
impl StructuralPartialEq for Selection
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl UnwindSafe for Selection
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