pub enum ClusterChange {
CreateRole(Role),
DropRole {
name: Identifier,
},
AlterRoleAttributes {
name: Identifier,
from: RoleAttributes,
to: RoleAttributes,
},
GrantRoleMembership {
member: Identifier,
role: Identifier,
},
RevokeRoleMembership {
member: Identifier,
role: Identifier,
},
CommentOnRole {
name: Identifier,
comment: Option<String>,
},
CreateTablespace(Tablespace),
DropTablespace {
name: Identifier,
},
AlterTablespaceOwner {
name: Identifier,
owner: Identifier,
},
SetTablespaceOptions {
name: Identifier,
options: BTreeMap<String, String>,
},
CommentOnTablespace {
name: Identifier,
comment: Option<String>,
},
}Expand description
One change to apply to a cluster’s role layout.
Variants§
CreateRole(Role)
Create a new role with the given definition.
DropRole
Drop an existing role by name.
Fields
name: IdentifierName of the role to drop.
AlterRoleAttributes
Alter the attributes of an existing role.
Both from and to are carried so that downstream lint rules (e.g.
role-loses-superuser) can inspect the before state.
Fields
name: IdentifierName of the role being altered.
from: RoleAttributesAttribute values before the change.
to: RoleAttributesAttribute values after the change.
GrantRoleMembership
Grant membership of role to member.
Fields
member: IdentifierWho gains the membership.
role: IdentifierWhich role they become a member of.
RevokeRoleMembership
Revoke membership of role from member.
Fields
member: IdentifierWho loses the membership.
role: IdentifierWhich role they are removed from.
CommentOnRole
Set or clear the comment on a role.
Fields
name: IdentifierName of the role.
CreateTablespace(Tablespace)
CREATE TABLESPACE …
DropTablespace
DROP TABLESPACE … — destructive.
Fields
name: IdentifierName of the tablespace to drop.
AlterTablespaceOwner
ALTER TABLESPACE name OWNER TO owner;
SetTablespaceOptions
ALTER TABLESPACE name SET (k = v, …); — only source-declared options
that differ from live (lenient: live-only options are never reset).
Fields
name: IdentifierName of the tablespace.
CommentOnTablespace
COMMENT ON TABLESPACE name IS …;
Fields
name: IdentifierName of the tablespace.
Trait Implementations§
Source§impl Clone for ClusterChange
impl Clone for ClusterChange
Source§fn clone(&self) -> ClusterChange
fn clone(&self) -> ClusterChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClusterChange
impl Debug for ClusterChange
impl Eq for ClusterChange
Source§impl PartialEq for ClusterChange
impl PartialEq for ClusterChange
Source§fn eq(&self, other: &ClusterChange) -> bool
fn eq(&self, other: &ClusterChange) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClusterChange
Auto Trait Implementations§
impl Freeze for ClusterChange
impl RefUnwindSafe for ClusterChange
impl Send for ClusterChange
impl Sync for ClusterChange
impl Unpin for ClusterChange
impl UnsafeUnpin for ClusterChange
impl UnwindSafe for ClusterChange
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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