Struct cassandra_cpp::Future
[−]
[src]
pub struct Future(_);
A CQL Future representing the status of any asynchronous calls to Cassandra
Methods
impl Future
[src]
unsafe fn set_callback(
&mut self,
callback: FutureCallback,
data: *mut c_void
) -> Result<&mut Self>
&mut self,
callback: FutureCallback,
data: *mut c_void
) -> Result<&mut Self>
Sets a callback that is called when a future is set
fn ready(&mut self) -> bool
Gets the set status of the future.
fn wait(self) -> Result<()>
Wait for the future to be set with either a result or error.
Important: Do not wait in a future callback. Waiting in a future callback will cause a deadlock.
fn wait_timed(&mut self, timeout_us: u64) -> bool
Wait for the future to be set or timeout.
fn get_result(&self) -> CassResult
Gets the result of a successful future. If the future is not ready this method will wait for the future to be set.
fn get_error_result(&self) -> CassErrorResult
Gets the error result from a future that failed as a result of a server error. If the future is not ready this method will wait for the future to be set.
fn error_message(&mut self) -> String
Gets the error message from future. If the future is not ready this method will wait for the future to be set.
fn payload_item_count(&self) -> usize
Gets a the number of custom payload items from a response future. If the future is not ready this method will wait for the future to be set.
fn payload_item(&self, index: usize) -> Result<(String, String)>
Gets a custom payload item from a response future at the specified index. If the future is not ready this method will wait for the future to be set.
Trait Implementations
impl Debug for Future
[src]
impl Drop for Future
[src]
fn drop(&mut self)
Frees a future instance. A future can be freed anytime.