pub struct Waypoint {
pub config: WaypointConfig,
/* private fields */
}Expand description
Main entry point for the Waypoint library.
Create a Waypoint instance with a config and use its methods to
run migration commands programmatically.
Fields§
§config: WaypointConfigImplementations§
Source§impl Waypoint
impl Waypoint
Sourcepub async fn new(config: WaypointConfig) -> Result<Self>
pub async fn new(config: WaypointConfig) -> Result<Self>
Create a new Waypoint instance, connecting to the database.
If connect_retries is configured, retries with exponential backoff.
Sourcepub fn with_client(config: WaypointConfig, client: Client) -> Self
pub fn with_client(config: WaypointConfig, client: Client) -> Self
Create a new Waypoint instance with an existing database client.
Sourcepub async fn migrate(
&self,
target_version: Option<&str>,
) -> Result<MigrateReport>
pub async fn migrate( &self, target_version: Option<&str>, ) -> Result<MigrateReport>
Apply pending migrations.
Sourcepub async fn info(&self) -> Result<Vec<MigrationInfo>>
pub async fn info(&self) -> Result<Vec<MigrationInfo>>
Show migration status information.
Sourcepub async fn validate(&self) -> Result<ValidateReport>
pub async fn validate(&self) -> Result<ValidateReport>
Validate applied migrations against local files.
Sourcepub async fn repair(&self) -> Result<RepairReport>
pub async fn repair(&self) -> Result<RepairReport>
Repair the schema history table.
Auto Trait Implementations§
impl Freeze for Waypoint
impl !RefUnwindSafe for Waypoint
impl Send for Waypoint
impl Sync for Waypoint
impl Unpin for Waypoint
impl UnsafeUnpin for Waypoint
impl !UnwindSafe for Waypoint
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