Struct odbc_api::parameter::Out[][src]

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, rather than an input / output parameter.

Example

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

let env = unsafe {
    Environment::new()?
};

let mut conn = env.connect("YourDatabase", "SA", "<YourStrong@Passw0rd>")?;

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

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

Trait Implementations

impl<'a, T> Parameter for Out<'a, T> where
    T: Output
[src]

Mutable references wrapped in Out are bound as output parameters.

unsafe fn bind_parameter(
    self,
    parameter_number: u16,
    stmt: &mut StatementImpl<'_>
) -> Result<(), Error>
[src]

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.