Trait odbc_api::parameter::ParameterRef
source · [−]pub unsafe trait ParameterRef {
unsafe fn bind_to(
&mut self,
parameter_number: u16,
stmt: &mut impl Statement
) -> Result<(), Error>;
}
Expand description
Implementers of this trait can be used as individual parameters of in a
crate::ParameterRefCollection
. They can be bound as either input parameters, output
parameters or both.
Safety
Parameters bound to the statement must remain valid for the lifetime of the instance.
Required methods
Bind the parameter in question to a specific parameter_number
.
Safety
Since the parameter is now bound to stmt
callers must take care that it is ensured that
the parameter remains valid while it is used. If the parameter is bound as an output
parameter it must also be ensured that it is exclusively referenced by statement.
Implementations on Foreign Types
sourceimpl<T: ?Sized> ParameterRef for &T where
T: InputParameter,
impl<T: ?Sized> ParameterRef for &T where
T: InputParameter,
Bind immutable references as input parameters.
sourceimpl<T: ?Sized> ParameterRef for &mut T where
T: InputParameter,
impl<T: ?Sized> ParameterRef for &mut T where
T: InputParameter,
Bind mutable references as input parameters.
sourceimpl<T: ?Sized> ParameterRef for Box<T> where
T: InputParameter,
impl<T: ?Sized> ParameterRef for Box<T> where
T: InputParameter,
Bind immutable references as input parameters.
Implementors
impl ParameterRef for &mut BlobParam<'_>
impl<'a, T> ParameterRef for InOut<'a, T> where
T: OutputParameter,
Bind mutable references as input/output parameter.
impl<'a, T> ParameterRef for Out<'a, T> where
T: OutputParameter,
Mutable references wrapped in Out
are bound as output parameters.