pub struct ExcludeConstraint<X: Extension = NoExt> {
pub method: Option<Ident>,
pub elements: ThinVec<ExcludeElement<X>>,
pub include: ThinVec<Ident>,
pub with_params: ThinVec<TableStorageParameter<X>>,
pub index_tablespace: Option<Ident>,
pub predicate: Option<Box<Expr<X>>>,
pub meta: Meta,
}Expand description
The body of a PostgreSQL EXCLUDE exclusion constraint.
EXCLUDE [USING <method>] (<element> [, ...]) [INCLUDE (<col>, ...)] [WITH (<param>, ...)] [USING INDEX TABLESPACE <name>] [WHERE (<predicate>)] — the tail clauses appear in that
fixed PostgreSQL grammar order. Boxed inside TableConstraint::Exclude so the cold clause
does not widen the warm constraint enum.
Fields§
§method: Option<Ident>The USING <method> index access method (gist, btree, …); None for the bare
EXCLUDE (...) form, which PostgreSQL defaults to btree. A single identifier — a
qualified method is a raw-parse error.
elements: ThinVec<ExcludeElement<X>>The exclusion elements, each an index element paired with an operator (c WITH &&);
non-empty (an empty () is a raw-parse error).
include: ThinVec<Ident>include in source order.
with_params: ThinVec<TableStorageParameter<X>>The WITH (<param> [= <value>], ...) index storage parameters (reloptions); empty when
unwritten. Reuses TableStorageParameter, the same element the CREATE TABLE … WITH (…) option list holds.
index_tablespace: Option<Ident>Optional index tablespace for this syntax.
predicate: Option<Box<Expr<X>>>The WHERE (<predicate>) partial-constraint predicate; None when unwritten. Boxed as a
cold clause so an exclusion constraint without a predicate pays only a null pointer.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl<X: Clone + Extension> Clone for ExcludeConstraint<X>
impl<X: Clone + Extension> Clone for ExcludeConstraint<X>
Source§fn clone(&self) -> ExcludeConstraint<X>
fn clone(&self) -> ExcludeConstraint<X>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de, X> Deserialize<'de> for ExcludeConstraint<X>where
X: Deserialize<'de> + Extension,
impl<'de, X> Deserialize<'de> for ExcludeConstraint<X>where
X: Deserialize<'de> + Extension,
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>,
impl<X: Eq + Extension> Eq for ExcludeConstraint<X>
Source§impl<X: Extension + Render> Render for ExcludeConstraint<X>
impl<X: Extension + Render> Render for ExcludeConstraint<X>
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl<X> Serialize for ExcludeConstraint<X>
impl<X> Serialize for ExcludeConstraint<X>
Source§impl<X: Extension> Spanned for ExcludeConstraint<X>
impl<X: Extension> Spanned for ExcludeConstraint<X>
impl<X: PartialEq + Extension> StructuralPartialEq for ExcludeConstraint<X>
Auto Trait Implementations§
impl<X> Freeze for ExcludeConstraint<X>
impl<X> RefUnwindSafe for ExcludeConstraint<X>where
X: RefUnwindSafe,
impl<X> Send for ExcludeConstraint<X>where
X: Send,
impl<X> Sync for ExcludeConstraint<X>where
X: Sync,
impl<X> Unpin for ExcludeConstraint<X>where
X: Unpin,
impl<X> UnsafeUnpin for ExcludeConstraint<X>
impl<X> UnwindSafe for ExcludeConstraint<X>where
X: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.