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 url.
Trait Implementations§
Source§impl Database for Any
impl Database for Any
Source§type Connection = AnyConnection
type Connection = AnyConnection
The concrete
Connection
implementation for this database.Source§type TransactionManager = AnyTransactionManager
type TransactionManager = AnyTransactionManager
The concrete
TransactionManager
implementation for this database.Source§type QueryResult = AnyQueryResult
type QueryResult = AnyQueryResult
The concrete
QueryResult
implementation for this database.Source§type TypeInfo = AnyTypeInfo
type TypeInfo = AnyTypeInfo
The concrete
TypeInfo
implementation for this database.Source§impl<'r> Decode<'r, Any> for &'r str
impl<'r> Decode<'r, Any> for &'r str
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for String
impl<'r> Decode<'r, Any> for String
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for bool
impl<'r> Decode<'r, Any> for bool
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for f32
impl<'r> Decode<'r, Any> for f32
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for f64
impl<'r> Decode<'r, Any> for f64
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for i16
impl<'r> Decode<'r, Any> for i16
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for i32
impl<'r> Decode<'r, Any> for i32
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'r> Decode<'r, Any> for i64
impl<'r> Decode<'r, Any> for i64
Source§fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
Source§impl<'q> Encode<'q, Any> for &'q str
impl<'q> Encode<'q, Any> for &'q str
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q, T> Encode<'q, Any> for Option<T>where
T: AnyEncode<'q> + 'q,
impl<'q, T> Encode<'q, Any> for Option<T>where
T: AnyEncode<'q> + 'q,
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for String
impl<'q> Encode<'q, Any> for String
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for bool
impl<'q> Encode<'q, Any> for bool
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for f32
impl<'q> Encode<'q, Any> for f32
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for f64
impl<'q> Encode<'q, Any> for f64
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for i16
impl<'q> Encode<'q, Any> for i16
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for i32
impl<'q> Encode<'q, Any> for i32
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> Encode<'q, Any> for i64
impl<'q> Encode<'q, Any> for i64
Source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
Source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<DB::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q> HasArguments<'q> for Any
impl<'q> HasArguments<'q> for Any
type Database = Any
Source§type Arguments = AnyArguments<'q>
type Arguments = AnyArguments<'q>
The concrete
Arguments
implementation for this database.Source§type ArgumentBuffer = AnyArgumentBuffer<'q>
type ArgumentBuffer = AnyArgumentBuffer<'q>
The concrete type used as a buffer for arguments while encoding.
Source§impl<'q> HasStatement<'q> for Any
impl<'q> HasStatement<'q> for Any
Source§impl<'r> HasValueRef<'r> for Any
impl<'r> HasValueRef<'r> for Any
Source§impl Type<Any> for String
impl Type<Any> for String
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for bool
impl Type<Any> for bool
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for f32
impl Type<Any> for f32
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for f64
impl Type<Any> for f64
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for i16
impl Type<Any> for i16
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for i32
impl Type<Any> for i32
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for i64
impl Type<Any> for i64
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
Source§impl Type<Any> for str
impl Type<Any> for str
Source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
Source§fn compatible(ty: &AnyTypeInfo) -> bool
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 Freeze for Any
impl RefUnwindSafe for Any
impl Send for Any
impl Sync for Any
impl Unpin for Any
impl UnwindSafe for Any
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> 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