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, ConnectionOptions};
let env = Environment::new()?;
let mut conn = env.connect(
"YourDatabase", "SA", "My@Test@Password1",
ConnectionOptions::default()
)?;
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§
Source§impl<'a, T> ParameterTupleElement for InOut<'a, T>where
T: OutputParameter + InputParameter,
impl<'a, T> ParameterTupleElement for InOut<'a, T>where
T: OutputParameter + InputParameter,
Bind mutable references as input/output parameter.
Auto Trait Implementations§
impl<'a, T> Freeze for InOut<'a, T>
impl<'a, T> RefUnwindSafe for InOut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for InOut<'a, T>where
T: Send,
impl<'a, T> Sync for InOut<'a, T>where
T: Sync,
impl<'a, T> Unpin for InOut<'a, T>
impl<'a, T> !UnwindSafe for InOut<'a, T>
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