pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub fn new() -> Result<Self, Error>
pub async fn ping(&self) -> Result<bool, Error>
pub async fn execute( &self, sql: impl AsRef<str>, settings: impl Into<Option<Settings<'_>>>, ) -> Result<(), Error>
pub async fn respond_execute<PreRF>( &self, sql: impl AsRef<str>, settings: impl Into<Option<Settings<'_>>>, pre_respond_fn: PreRF, ) -> Result<Response<AsyncBody>, Error>
pub async fn insert_with_format<I: Input>( &self, sql_prefix: impl AsRef<str>, input: I, settings: impl Into<Option<Settings<'_>>>, ) -> Result<(), Error>
pub async fn respond_insert_with_format<I: Input, PreRF>( &self, sql_prefix: impl AsRef<str>, input: I, settings: impl Into<Option<Settings<'_>>>, pre_respond_fn: PreRF, ) -> Result<Response<AsyncBody>, Error>
pub async fn insert_with_format_bytes( &self, sql_prefix: impl AsRef<str>, format_name: FormatName, format_bytes: Vec<u8>, settings: impl Into<Option<Settings<'_>>>, ) -> Result<(), Error>
pub async fn respond_insert_with_format_bytes<PreRF>( &self, sql_prefix: impl AsRef<str>, format_name: FormatName, format_bytes: Vec<u8>, settings: impl Into<Option<Settings<'_>>>, pre_respond_fn: PreRF, ) -> Result<Response<AsyncBody>, Error>
pub async fn select_with_format<O: Output>( &self, sql: impl AsRef<str>, output: O, settings: impl Into<Option<Settings<'_>>>, ) -> Result<(Vec<O::Row>, O::Info), Error>
pub async fn internal_select_with_format<O: Output, PreRF>( &self, sql: impl AsRef<str>, output: O, settings: impl Into<Option<Settings<'_>>>, pre_respond_fn: PreRF, ) -> Result<(ResponseParts, (Vec<O::Row>, O::Info)), Error>
Methods from Deref<Target = ClientConfig>§
pub fn set_url(&mut self, val: impl AsRef<str>) -> Result<&mut Self, ParseError>
pub fn set_database_to_url_parameter( &mut self, val: impl AsRef<str>, ) -> &mut Self
pub fn set_database_to_header( &mut self, val: impl AsRef<str>, ) -> Result<&mut Self, InvalidHeaderValue>
pub fn set_username_to_url_parameter( &mut self, val: impl AsRef<str>, ) -> &mut Self
pub fn set_username_to_header( &mut self, val: impl AsRef<str>, ) -> Result<&mut Self, InvalidHeaderValue>
pub fn set_password_to_url_parameter( &mut self, val: impl AsRef<str>, ) -> &mut Self
pub fn set_password_to_header( &mut self, val: impl AsRef<str>, ) -> Result<&mut Self, InvalidHeaderValue>
pub fn set_http_server_default_response( &mut self, val: impl Into<String>, ) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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