pub struct ResolveConfig { /* private fields */ }migrate only.Expand description
Configuration for migration resolution using ResolveWith.
Implementationsยง
Sourceยงimpl ResolveConfig
impl ResolveConfig
Sourcepub fn new() -> ResolveConfig
pub fn new() -> ResolveConfig
Return a default, empty configuration.
Sourcepub fn ignore_char(&mut self, c: char) -> &mut ResolveConfig
pub fn ignore_char(&mut self, c: char) -> &mut ResolveConfig
Ignore a character when hashing migrations.
The migration SQL string itself will still contain the character, but it will not be included when calculating the checksum.
This can be used to ignore whitespace characters so changing formatting does not change the checksum.
Adding the same char more than once is a no-op.
ยงNote: Changes Migration Checksum
This will change the checksum of resolved migrations, which may cause problems with existing deployments.
Use at your own risk.
Sourcepub fn ignore_chars(
&mut self,
chars: impl IntoIterator<Item = char>,
) -> &mut ResolveConfig
pub fn ignore_chars( &mut self, chars: impl IntoIterator<Item = char>, ) -> &mut ResolveConfig
Ignore one or more characters when hashing migrations.
The migration SQL string itself will still contain these characters, but they will not be included when calculating the checksum.
This can be used to ignore whitespace characters so changing formatting does not change the checksum.
Adding the same char more than once is a no-op.
ยงNote: Changes Migration Checksum
This will change the checksum of resolved migrations, which may cause problems with existing deployments.
Use at your own risk.
Sourcepub fn ignored_chars(&self) -> impl Iterator<Item = char>
pub fn ignored_chars(&self) -> impl Iterator<Item = char>
Iterate over the set of ignored characters.
Duplicate chars are not included.
Trait Implementationsยง
Sourceยงimpl Debug for ResolveConfig
impl Debug for ResolveConfig
Sourceยงimpl Default for ResolveConfig
impl Default for ResolveConfig
Sourceยงfn default() -> ResolveConfig
fn default() -> ResolveConfig
Auto Trait Implementationsยง
impl Freeze for ResolveConfig
impl RefUnwindSafe for ResolveConfig
impl Send for ResolveConfig
impl Sync for ResolveConfig
impl Unpin for ResolveConfig
impl UnwindSafe for ResolveConfig
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
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> โ
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> โ
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