pub struct SeedManager { /* private fields */ }Expand description
种子管理器
Implementations§
Source§impl SeedManager
impl SeedManager
Sourcepub fn allow_production(self) -> Self
pub fn allow_production(self) -> Self
允许生产环境执行
Sourcepub fn load_seeds(
&mut self,
templates: Vec<FixtureTemplate>,
) -> Result<(), SeedError>
pub fn load_seeds( &mut self, templates: Vec<FixtureTemplate>, ) -> Result<(), SeedError>
从目录加载种子文件
Sourcepub fn seed(&mut self) -> Result<SeedReport, SeedError>
pub fn seed(&mut self) -> Result<SeedReport, SeedError>
执行 seeding(编排:环境检查 → 拓扑排序 → 执行 → 记录)
Sourcepub fn executed_versions(&self) -> &HashSet<String>
pub fn executed_versions(&self) -> &HashSet<String>
获取已执行版本
Sourcepub fn seed_count(&self) -> usize
pub fn seed_count(&self) -> usize
获取种子数量
Auto Trait Implementations§
impl Freeze for SeedManager
impl RefUnwindSafe for SeedManager
impl Send for SeedManager
impl Sync for SeedManager
impl Unpin for SeedManager
impl UnsafeUnpin for SeedManager
impl UnwindSafe for SeedManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more