pub struct Any;
Expand description
Opaque database driver. Capable of being used in place of any SQLx database driver. The actual driver used will be selected at runtime, from the connection uri.
Trait Implementations
sourceimpl Database for Any
impl Database for Any
type Connection = AnyConnection
type Connection = AnyConnection
The concrete Connection
implementation for this database.
type TransactionManager = AnyTransactionManager
type TransactionManager = AnyTransactionManager
The concrete TransactionManager
implementation for this database.
type QueryResult = AnyQueryResult
type QueryResult = AnyQueryResult
The concrete QueryResult
implementation for this database.
type TypeInfo = AnyTypeInfo
type TypeInfo = AnyTypeInfo
The concrete TypeInfo
implementation for this database.
sourceimpl<'q> Encode<'q, Any> for &'q str where
&'q str: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for &'q str where
&'q str: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> Encode<'q, Any> for f64 where
f64: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for f64 where
f64: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q, T> Encode<'q, Any> for Option<T> where
T: 'q + AnyEncode<'q>,
impl<'q, T> Encode<'q, Any> for Option<T> where
T: 'q + AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> Encode<'q, Any> for f32 where
f32: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for f32 where
f32: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> Encode<'q, Any> for i32 where
i32: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for i32 where
i32: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> Encode<'q, Any> for String where
String: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for String where
String: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> Encode<'q, Any> for i64 where
i64: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for i64 where
i64: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> Encode<'q, Any> for bool where
bool: AnyEncode<'q>,
impl<'q> Encode<'q, Any> for bool where
bool: AnyEncode<'q>,
sourcepub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
pub fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
sourceimpl<'q> HasArguments<'q> for Any
impl<'q> HasArguments<'q> for Any
type Database = Any
type Arguments = AnyArguments<'q>
type Arguments = AnyArguments<'q>
The concrete Arguments
implementation for this database.
type ArgumentBuffer = AnyArgumentBuffer<'q>
type ArgumentBuffer = AnyArgumentBuffer<'q>
The concrete type used as a buffer for arguments while encoding.
sourceimpl<'q> HasStatement<'q> for Any
impl<'q> HasStatement<'q> for Any
type Database = Any
type Statement = AnyStatement<'q>
type Statement = AnyStatement<'q>
The concrete Statement
implementation for this database.
sourceimpl<'r> HasValueRef<'r> for Any
impl<'r> HasValueRef<'r> for Any
type Database = Any
type ValueRef = AnyValueRef<'r>
type ValueRef = AnyValueRef<'r>
The concrete type used to hold a reference to the not-yet-decoded value that has just been received from the database. Read more
sourceimpl MigrateDatabase for Any
impl MigrateDatabase for Any
pub fn create_database(
uri: &str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send, Global>>
pub fn database_exists(
uri: &str
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send, Global>>
pub fn drop_database(
uri: &str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send, Global>>
sourceimpl Type<Any> for f32
impl Type<Any> for f32
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Any> for f64
impl Type<Any> for f64
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Any> for String
impl Type<Any> for String
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Any> for str
impl Type<Any> for str
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Any> for i32
impl Type<Any> for i32
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Any> for bool
impl Type<Any> for bool
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Any> for i64
impl Type<Any> for i64
sourcepub fn type_info() -> AnyTypeInfo
pub fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcepub fn compatible(ty: &AnyTypeInfo) -> bool
pub fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl HasStatementCache for Any
Auto Trait Implementations
impl RefUnwindSafe for Any
impl Send for Any
impl Sync for Any
impl Unpin for Any
impl UnwindSafe for Any
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more