pub struct SeedPlan {
pub seed: u64,
pub default_count: Option<usize>,
pub counts: Vec<(String, usize)>,
pub relations: Vec<(String, String, usize)>,
pub skips: Vec<String>,
pub reset: bool,
}Expand description
The parsed --count, --relation and --skip arguments.
Fields§
§seed: u64--seed.
default_count: Option<usize>A bare --count N.
counts: Vec<(String, usize)>--count TABLE=N.
relations: Vec<(String, String, usize)>--relation PARENT:CHILD=N.
skips: Vec<String>--skip TABLE.
reset: bool--reset.
Implementations§
Source§impl SeedPlan
impl SeedPlan
Sourcepub fn from_options(opts: &SeedOptions) -> Result<Self, CliError>
pub fn from_options(opts: &SeedOptions) -> Result<Self, CliError>
Parses the seed options.
§Errors
Returns CliError::Other for a malformed --count or --relation
value, or two bare --counts.
Trait Implementations§
impl Eq for SeedPlan
impl StructuralPartialEq for SeedPlan
Auto Trait Implementations§
impl Freeze for SeedPlan
impl RefUnwindSafe for SeedPlan
impl Send for SeedPlan
impl Sync for SeedPlan
impl Unpin for SeedPlan
impl UnsafeUnpin for SeedPlan
impl UnwindSafe for SeedPlan
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