pub struct ImportRequest {
pub picks: Vec<VariantChoice>,
pub secrets: Vec<SecretChoice>,
pub only: bool,
pub unchosen: Vec<(String, CoreError)>,
}Expand description
What to import (one commit).
Fields§
§picks: Vec<VariantChoice>§secrets: Vec<SecretChoice>§only: boolCopy the definitions without enabling them (no ownership taken).
unchosen: Vec<(String, CoreError)>Candidates left out before staging, with the reason; reported as skipped.
Implementations§
Source§impl ImportRequest
impl ImportRequest
Sourcepub fn defaults(
candidates: &[Candidate],
names: Option<&[String]>,
only: bool,
) -> Self
pub fn defaults( candidates: &[Candidate], names: Option<&[String]>, only: bool, ) -> Self
Every candidate (or those in names) with one variant that can be
imported, under its name. A conflict, or a candidate that cannot be
imported, is left in ImportRequest::unchosen.
Sourcepub fn choose(&mut self, name: &str, picks: Vec<VariantChoice>)
pub fn choose(&mut self, name: &str, picks: Vec<VariantChoice>)
Replaces what is chosen for candidate name by picks (empty:
skip it).
Trait Implementations§
Source§impl Clone for ImportRequest
impl Clone for ImportRequest
Source§impl Debug for ImportRequest
impl Debug for ImportRequest
Auto Trait Implementations§
impl Forget for ImportRequest
impl Freeze for ImportRequestwhere
*const u8 is !null: Freeze,
PhantomData<VariantChoice>: Freeze,
PhantomData<SecretChoice>: Freeze,
PhantomData<(String, CoreError)>: Freeze,
impl Move for ImportRequest
impl RefUnwindSafe for ImportRequest
impl Send for ImportRequestwhere
RawVecInner: Send,
impl Sync for ImportRequestwhere
RawVecInner: Sync,
impl Unpin for ImportRequest
impl UnsafeUnpin for ImportRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<VariantChoice>: UnsafeUnpin,
PhantomData<SecretChoice>: UnsafeUnpin,
PhantomData<(String, CoreError)>: UnsafeUnpin,
impl UnwindSafe for ImportRequestwhere
RawVecInner: UnwindSafe,
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