pub struct DbSchema { /* private fields */ }Expand description
Schema metadata keyed by logical table name.
Implementations§
Source§impl DbSchema
impl DbSchema
pub fn table(&self, logical_name: &str) -> Option<&DbTable>
Sourcepub fn table_name(&self, table: &str) -> Result<&str, OpenAuthError>
pub fn table_name(&self, table: &str) -> Result<&str, OpenAuthError>
Resolve a logical or physical table name to its physical database name.
Sourcepub fn field_name(
&self,
table: &str,
field: &str,
) -> Result<&str, OpenAuthError>
pub fn field_name( &self, table: &str, field: &str, ) -> Result<&str, OpenAuthError>
Resolve a logical or physical field name to its physical database column name.
Sourcepub fn field(&self, table: &str, field: &str) -> Result<&DbField, OpenAuthError>
pub fn field(&self, table: &str, field: &str) -> Result<&DbField, OpenAuthError>
Resolve field metadata from logical or physical table and field names.
pub fn tables(&self) -> impl Iterator<Item = (&str, &DbTable)>
pub fn insert_plugin_table( &mut self, logical_name: String, table: DbTable, ) -> Result<(), OpenAuthError>
pub fn insert_plugin_field( &mut self, table: &str, logical_name: String, field: DbField, ) -> Result<(), OpenAuthError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DbSchema
impl<'de> Deserialize<'de> for DbSchema
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
impl Eq for DbSchema
impl StructuralPartialEq for DbSchema
Auto Trait Implementations§
impl Freeze for DbSchema
impl RefUnwindSafe for DbSchema
impl Send for DbSchema
impl Sync for DbSchema
impl Unpin for DbSchema
impl UnsafeUnpin for DbSchema
impl UnwindSafe for DbSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.