pub struct Out<'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 output parameter only.
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
sourceimpl<'a, T> ParameterRef for Out<'a, T> where
T: OutputParameter,
impl<'a, T> ParameterRef for Out<'a, T> where
T: OutputParameter,
Mutable references wrapped in Out
are bound as output parameters.
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Out<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for Out<'a, T> where
T: Send,
impl<'a, T> Sync for Out<'a, T> where
T: Sync,
impl<'a, T> Unpin for Out<'a, T>
impl<'a, T> !UnwindSafe for Out<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more