pub trait MigrationStep:
Send
+ Sync
+ 'static {
// Required methods
fn from_version(&self) -> u32;
fn to_version(&self) -> u32;
fn up(&self, tx: &Tx<'_>) -> Result<()>;
// Provided method
fn down(&self, _tx: &Tx<'_>) -> Result<()> { ... }
}Expand description
수동 코드 스텝 trait — (from,to) 쌍 모델 [C-3] (명세 §8.3)
Required Methods§
Sourcefn from_version(&self) -> u32
fn from_version(&self) -> u32
시작 버전 (명세 [C-3] 확정 이름 — 관례 린트 예외)
Sourcefn to_version(&self) -> u32
fn to_version(&self) -> u32
도착 버전
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".