Struct Any
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§
§impl Database for Any
 
impl Database for Any
§const URL_SCHEMES: &'static [&'static str]
 
const URL_SCHEMES: &'static [&'static str]
The schemes for database URLs that should match this driver.
§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.§type Value = AnyValue
 
type Value = AnyValue
The concrete type used to hold an owned copy of the not-yet-decoded value that was
received from the database.
§type ValueRef<'r> = AnyValueRef<'r>
 
type ValueRef<'r> = AnyValueRef<'r>
The concrete type used to hold a reference to the not-yet-decoded value that has just been
received from the database.
§type Arguments<'q> = AnyArguments<'q>
 
type Arguments<'q> = AnyArguments<'q>
The concrete 
Arguments implementation for this database.§type ArgumentBuffer<'q> = AnyArgumentBuffer<'q>
 
type ArgumentBuffer<'q> = AnyArgumentBuffer<'q>
The concrete type used as a buffer for arguments while encoding.
§type Statement<'q> = AnyStatement<'q>
 
type Statement<'q> = AnyStatement<'q>
The concrete 
Statement implementation for this database.§impl<'a> Encode<'a, Any> for &'a str
 
impl<'a> Encode<'a, Any> for &'a str
§fn encode(
    self,
    buf: &mut <Any as Database>::ArgumentBuffer<'a>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode( self, buf: &mut <Any as Database>::ArgumentBuffer<'a>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Writes the value of 
self into buf in the expected format for the database.§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'a>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'a>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
§impl<'q> Encode<'q, Any> for &'q [u8]
 
impl<'q> Encode<'q, Any> for &'q [u8]
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q, T> Encode<'q, Any> for Option<T>
 
impl<'q, T> Encode<'q, Any> for Option<T>
§fn encode_by_ref(
    &self,
    buf: &mut AnyArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut AnyArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for String
 
impl<'q> Encode<'q, Any> for String
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for Vec<u8>
 
impl<'q> Encode<'q, Any> for Vec<u8>
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for bool
 
impl<'q> Encode<'q, Any> for bool
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for f32
 
impl<'q> Encode<'q, Any> for f32
§fn encode_by_ref(
    &self,
    buf: &mut AnyArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut AnyArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for f64
 
impl<'q> Encode<'q, Any> for f64
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for i16
 
impl<'q> Encode<'q, Any> for i16
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for i32
 
impl<'q> Encode<'q, Any> for i32
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl<'q> Encode<'q, Any> for i64
 
impl<'q> Encode<'q, Any> for i64
§fn encode_by_ref(
    &self,
    buf: &mut <Any as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
 
fn encode_by_ref( &self, buf: &mut <Any as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
§fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
 
fn encode(
    self,
    buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
    Self: Sized,
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
§impl MigrateDatabase for Any
 
impl MigrateDatabase for Any
fn create_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn database_exists( url: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + '_>>
fn drop_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn force_drop_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
§impl Type<Any> for [u8]
 
impl Type<Any> for [u8]
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§impl Type<Any> for String
 
impl Type<Any> for String
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§impl Type<Any> for Vec<u8>
 
impl Type<Any> for Vec<u8>
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§impl Type<Any> for bool
 
impl Type<Any> for bool
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§impl Type<Any> for f32
 
impl Type<Any> for f32
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§impl Type<Any> for f64
 
impl Type<Any> for f64
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§impl Type<Any> for i16
 
impl Type<Any> for i16
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§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 Type<Any> for i32
 
impl Type<Any> for i32
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§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 Type<Any> for i64
 
impl Type<Any> for i64
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§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 Type<Any> for str
 
impl Type<Any> for str
§fn type_info() -> AnyTypeInfo
 
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust 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
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§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