pub enum CastChange {
Create(Cast),
Replace {
from: Cast,
to: Cast,
},
Drop {
source: QualifiedName,
target: QualifiedName,
},
CommentOn {
source: QualifiedName,
target: QualifiedName,
comment: Option<String>,
},
}Expand description
A change to a single cast (identity = (source, target)).
Casts are global (non-schema-scoped) objects with no owner.
Any structural difference requires DROP CAST + CREATE CAST
because Postgres has no ALTER CAST for method or context changes.
Variants§
Create(Cast)
CREATE CAST (source AS target) …
Replace
DROP CAST (source AS target); CREATE CAST (source AS target) …;
— any structural change has no in-place ALTER.
Drop
DROP CAST (source AS target);
Fields
§
source: QualifiedNameSource type (part of identity).
§
target: QualifiedNameTarget type (part of identity).
CommentOn
COMMENT ON CAST (source AS target) IS …;
Fields
§
source: QualifiedNameSource type (part of identity).
§
target: QualifiedNameTarget type (part of identity).
Trait Implementations§
Source§impl Clone for CastChange
impl Clone for CastChange
Source§fn clone(&self) -> CastChange
fn clone(&self) -> CastChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CastChange
impl Debug for CastChange
Source§impl<'de> Deserialize<'de> for CastChange
impl<'de> Deserialize<'de> for CastChange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CastChange
Source§impl PartialEq for CastChange
impl PartialEq for CastChange
Source§fn eq(&self, other: &CastChange) -> bool
fn eq(&self, other: &CastChange) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CastChange
impl Serialize for CastChange
impl StructuralPartialEq for CastChange
Auto Trait Implementations§
impl Freeze for CastChange
impl RefUnwindSafe for CastChange
impl Send for CastChange
impl Sync for CastChange
impl Unpin for CastChange
impl UnsafeUnpin for CastChange
impl UnwindSafe for CastChange
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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