pub struct FieldResolver { /* private fields */ }Expand description
Per-table field name resolver.
Implementations§
Source§impl FieldResolver
impl FieldResolver
pub fn new() -> Self
pub fn register_field( &self, definition: impl Into<FieldDefinition>, ) -> Result<FieldId>
pub fn field_id(&self, name: &str) -> Option<FieldId>
pub fn field_name(&self, id: FieldId) -> Option<String>
pub fn field_exists(&self, name: &str) -> bool
pub fn field_count(&self) -> usize
pub fn field_names(&self) -> Vec<String>
pub fn field_constraints(&self, id: FieldId) -> Option<FieldConstraints>
pub fn field_constraints_by_name(&self, name: &str) -> Option<FieldConstraints>
pub fn set_field_unique(&self, name: &str, unique: bool) -> Result<()>
pub fn rename_field(&self, old_name: &str, new_name: &str) -> Result<()>
pub fn field_info(&self, id: FieldId) -> Option<FieldInfo>
pub fn field_info_by_name(&self, name: &str) -> Option<FieldInfo>
pub fn export_state(&self) -> FieldResolverState
pub fn from_state(state: FieldResolverState) -> Result<Self>
Trait Implementations§
Source§impl Clone for FieldResolver
impl Clone for FieldResolver
Source§fn clone(&self) -> FieldResolver
fn clone(&self) -> FieldResolver
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 FieldResolver
impl Debug for FieldResolver
Auto Trait Implementations§
impl Freeze for FieldResolver
impl RefUnwindSafe for FieldResolver
impl Send for FieldResolver
impl Sync for FieldResolver
impl Unpin for FieldResolver
impl UnwindSafe for FieldResolver
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more