Skip to main content

SQLIndexInfo

Trait SQLIndexInfo 

Source
pub trait SQLIndexInfo:
    Any
    + Send
    + Sync {
    // Required methods
    fn table(&self) -> &'static TableRef;
    fn name(&self) -> &'static str;
    fn columns(&self) -> &'static [&'static str];

    // Provided methods
    fn is_unique(&self) -> bool { ... }
    fn where_clause(&self) -> Option<&'static str> { ... }
}
Expand description

Runtime metadata of an index, usable as a trait object.

Required Methods§

Source

fn table(&self) -> &'static TableRef

The indexed table.

Source

fn name(&self) -> &'static str

The index name.

Source

fn columns(&self) -> &'static [&'static str]

Column names included in this index, in definition order.

Provided Methods§

Source

fn is_unique(&self) -> bool

Whether this is a unique index.

Source

fn where_clause(&self) -> Option<&'static str>

The WHERE predicate of a partial index, as SQL text.

Trait Implementations§

Source§

impl Debug for dyn SQLIndexInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§