pub struct IndexColumn {
pub value: Cow<'static, str>,
pub is_expression: bool,
pub asc: bool,
pub nulls_first: bool,
pub opclass: Option<Opclass>,
}Available on crate feature
std only.Expand description
Runtime index column entity for serde serialization
Fields§
§value: Cow<'static, str>Column name or expression
is_expression: boolWhether this is an expression (vs column name)
asc: boolAscending order (true) or descending (false)
nulls_first: boolNULLS FIRST ordering
opclass: Option<Opclass>Operator class (optional)
Implementations§
Source§impl IndexColumn
impl IndexColumn
Sourcepub fn new(value: impl Into<Cow<'static, str>>) -> IndexColumn
Available on crate features alloc or std only.
pub fn new(value: impl Into<Cow<'static, str>>) -> IndexColumn
alloc or std only.Create a new index column
Sourcepub fn expression(expr: impl Into<Cow<'static, str>>) -> IndexColumn
Available on crate features alloc or std only.
pub fn expression(expr: impl Into<Cow<'static, str>>) -> IndexColumn
alloc or std only.Create an expression-based index column
Sourcepub const fn desc(self) -> IndexColumn
Available on crate features alloc or std only.
pub const fn desc(self) -> IndexColumn
alloc or std only.Set descending order
Sourcepub const fn nulls_first(self) -> IndexColumn
Available on crate features alloc or std only.
pub const fn nulls_first(self) -> IndexColumn
alloc or std only.Set NULLS FIRST
Sourcepub fn with_opclass(self, opclass: Opclass) -> IndexColumn
Available on crate features alloc or std only.
pub fn with_opclass(self, opclass: Opclass) -> IndexColumn
alloc or std only.Set operator class
Trait Implementations§
Source§impl Clone for IndexColumn
impl Clone for IndexColumn
Source§fn clone(&self) -> IndexColumn
fn clone(&self) -> IndexColumn
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 IndexColumn
impl Debug for IndexColumn
Source§impl<'de> Deserialize<'de> for IndexColumn
impl<'de> Deserialize<'de> for IndexColumn
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexColumn, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexColumn, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IndexColumn
Source§impl From<IndexColumnDef> for IndexColumn
impl From<IndexColumnDef> for IndexColumn
Source§fn from(def: IndexColumnDef) -> IndexColumn
fn from(def: IndexColumnDef) -> IndexColumn
Converts to this type from the input type.
Source§impl PartialEq for IndexColumn
impl PartialEq for IndexColumn
Source§impl Serialize for IndexColumn
impl Serialize for IndexColumn
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for IndexColumn
Auto Trait Implementations§
impl Freeze for IndexColumn
impl RefUnwindSafe for IndexColumn
impl Send for IndexColumn
impl Sync for IndexColumn
impl Unpin for IndexColumn
impl UnsafeUnpin for IndexColumn
impl UnwindSafe for IndexColumn
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