pub trait FromSqlBase<'a>: Sized {
// Required method
fn accepts_postgres_type(oid: i32) -> bool;
// Provided methods
fn accepts(field: &FieldDescription) -> bool { ... }
fn accepts_with_registry(
field: &FieldDescription,
_registry: &EnumTypeRegistry,
) -> bool { ... }
fn from_null(field: &FieldDescription) -> Result<Self, ElefantClientError> { ... }
}Expand description
Base trait providing shared functionality for both binary and text format trait implementations
Required Methods§
fn accepts_postgres_type(oid: i32) -> bool
Provided Methods§
fn accepts(field: &FieldDescription) -> bool
Sourcefn accepts_with_registry(
field: &FieldDescription,
_registry: &EnumTypeRegistry,
) -> bool
fn accepts_with_registry( field: &FieldDescription, _registry: &EnumTypeRegistry, ) -> bool
Extended accepts check with access to the enum type registry.
Override for enum types and collections of enums.
Default delegates to the static accepts check.
fn from_null(field: &FieldDescription) -> Result<Self, ElefantClientError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".