pub struct CreateRule {
pub name: Ident,
pub event: RuleEvent,
pub table: ObjectName,
pub condition: Option<Expr>,
pub instead: bool,
pub action: RuleAction,
}Expand description
A CREATE RULE statement.
Note: this is a PostgreSQL-specific statement. https://www.postgresql.org/docs/current/sql-createrule.html
Fields§
§name: IdentThe rule name.
event: RuleEventThe event that triggers the rule.
table: ObjectNameThe table the rule applies to.
condition: Option<Expr>Optional WHERE condition clause.
instead: boolWhether the rule is INSTEAD (true) or ALSO (false).
action: RuleActionThe action(s) taken by the rule.
Trait Implementations§
Source§impl Clone for CreateRule
impl Clone for CreateRule
Source§fn clone(&self) -> CreateRule
fn clone(&self) -> CreateRule
Returns a duplicate of the value. Read more
1.0.0 · 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 CreateRule
impl Debug for CreateRule
Source§impl<'de> Deserialize<'de> for CreateRule
impl<'de> Deserialize<'de> for CreateRule
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
Source§impl Display for CreateRule
impl Display for CreateRule
Source§impl From<CreateRule> for Statement
impl From<CreateRule> for Statement
Source§fn from(v: CreateRule) -> Self
fn from(v: CreateRule) -> Self
Converts to this type from the input type.
Source§impl Hash for CreateRule
impl Hash for CreateRule
Source§impl Ord for CreateRule
impl Ord for CreateRule
Source§fn cmp(&self, other: &CreateRule) -> Ordering
fn cmp(&self, other: &CreateRule) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CreateRule
impl PartialEq for CreateRule
Source§impl PartialOrd for CreateRule
impl PartialOrd for CreateRule
Source§impl Serialize for CreateRule
impl Serialize for CreateRule
Source§impl Visit for CreateRule
impl Visit for CreateRule
Source§impl VisitMut for CreateRule
impl VisitMut for CreateRule
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided
VisitorMut. Read moreimpl Eq for CreateRule
impl StructuralPartialEq for CreateRule
Auto Trait Implementations§
impl Freeze for CreateRule
impl RefUnwindSafe for CreateRule
impl Send for CreateRule
impl Sync for CreateRule
impl Unpin for CreateRule
impl UnsafeUnpin for CreateRule
impl UnwindSafe for CreateRule
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