Struct Runner

Source
pub struct Runner { /* private fields */ }

Implementations§

Source§

impl Runner

Source

pub fn new(url: &str, server_id: u32) -> Result<Self, Box<dyn Error>>

Source

pub fn start_sync(&mut self, offset: OffsetConfig) -> Result<(), Box<dyn Error>>

Source

pub fn get_event(&mut self) -> Result<Event, Box<dyn Error>>

Methods from Deref<Target = Conn>§

Source

pub fn connection_id(&self) -> u32

Returns connection identifier.

Source

pub fn affected_rows(&self) -> u64

Returns number of rows affected by the last query.

Source

pub fn last_insert_id(&self) -> u64

Returns last insert id of the last query.

Returns zero if there was no last insert id.

Source

pub fn warnings(&self) -> u16

Returns number of warnings, reported by the server.

Source

pub fn info_ref(&self) -> &[u8]

Info, reported by the server.

Will be empty if not defined.

Source

pub fn info_str(&self) -> Cow<'_, str>

Info, reported by the server.

Will be empty if not defined.

Source

pub fn reset(&mut self) -> Result<(), Error>

Resets MyConn (drops state then reconnects).

Source

pub fn ping(&mut self) -> bool

Executes COM_PING on Conn. Return true on success or false on error.

Source

pub fn select_db(&mut self, schema: &str) -> bool

Executes COM_INIT_DB on Conn.

Source

pub fn start_transaction( &mut self, tx_opts: TxOpts, ) -> Result<Transaction<'_>, Error>

Starts new transaction with provided options. readonly is only available since MySQL 5.6.5.

Source

pub fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)

Sets a callback to handle requests for local files. These are caused by using LOAD DATA LOCAL INFILE queries. The callback is passed the filename, and a Writeable object to receive the contents of that file. Specifying None will reset the handler to the one specified in the Opts for this connection.

Source

pub fn no_backslash_escape(&self) -> bool

Trait Implementations§

Source§

impl Deref for Runner

Source§

type Target = Conn

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Runner

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl Freeze for Runner

§

impl RefUnwindSafe for Runner

§

impl Send for Runner

§

impl Sync for Runner

§

impl Unpin for Runner

§

impl UnwindSafe for Runner

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V