pub struct CallTime;
Expand description
A type parameter for Connection::oci_attr
to get OCI_ATTR_CALL_TIME
as Duration
,
which is the server-side time for the preceding call
Set true
to CollectCallTime
in advance.
§Examples
use oracle::oci_attr::CallTime;
use oracle::oci_attr::CollectCallTime;
use std::time::Duration;
// Enable CollectCallTime
conn.set_oci_attr::<CollectCallTime>(&true)?;
// This SQL consumes one second in the server-side.
conn.execute("begin dbms_session.sleep(1); end;", &[])?;
let call_time = conn.oci_attr::<CallTime>()?;
assert!(call_time >= Duration::from_secs(1), "call_time is {:?}.", call_time);
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CallTime
impl Send for CallTime
impl Sync for CallTime
impl Unpin for CallTime
impl UnwindSafe for CallTime
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