pub struct InOut<'a, T>(pub &'a mut T);
Expand description

Wraps a mutable reference. Use this wrapper in order to indicate that a mutable reference should be bound as an input / output parameter.

Example

use odbc_api::{Environment, Out, InOut, Nullable};

let env = Environment::new()?;

let mut conn = env.connect("YourDatabase", "SA", "My@Test@Password1")?;

let mut ret = Nullable::<i32>::null();
let mut param = Nullable::new(7);

conn.execute(
    "{? = call TestParam(?)}",
    (Out(&mut ret), InOut(&mut param)))?;

Tuple Fields

0: &'a mut T

Trait Implementations

Bind mutable references as input/output parameter.

Bind the parameter in question to a specific parameter_number. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.