Struct rad::rados::RadosContext
[−]
[src]
pub struct RadosContext { /* fields omitted */ }
A wrapper around a rados_ioctx_t
, which also counts as a reference to the underlying
RadosConnection
.
Methods
impl RadosContext
[src]
fn get_xattr(&mut self, obj: &str, key: &str, size: usize) -> Result<Vec<u8>>
[src]
Fetch an extended attribute on a given RADOS object using rados_getxattr
.
size
- the size in bytes of the extended attribute.
fn set_xattr(&mut self, obj: &str, key: &str, value: &[u8]) -> Result<()>
[src]
Set an extended attribute on a given RADOS object using rados_setxattr
.
fn write(&mut self, obj: &str, buf: &[u8], offset: u64) -> Result<()>
[src]
Write to a RADOS object using rados_write
.
fn write_full(&mut self, obj: &str, buf: &[u8]) -> Result<()>
[src]
Write the entirety of a RADOS object, overwriting if necessary, using rados_write_full
.
fn append(&mut self, obj: &str, buf: &[u8]) -> Result<()>
[src]
Append to a RADOS object using rados_append
.
fn read(&mut self, obj: &str, buf: &mut [u8], offset: u64) -> Result<usize>
[src]
Read from a RADOS object using rados_read
.
fn remove(&mut self, obj: &str) -> Result<()>
[src]
Delete a RADOS object using rados_remove
.
fn resize(&mut self, obj: &str, size: u64) -> Result<()>
[src]
Resize a RADOS object, filling with zeroes if necessary, using rados_trunc
.
fn stat(&mut self, obj: &str) -> Result<RadosStat>
[src]
Get the statistics of a given RADOS object using rados_stat
.
fn write_async(&mut self, obj: &str, buf: &[u8], offset: u64) -> RadosFuture<()>
[src]
Asynchronously write to a RADOS object using rados_aio_write
.
fn append_async(&mut self, obj: &str, buf: &[u8]) -> RadosFuture<()>
[src]
Asynchronously append to a RADOS object using rados_aio_append
.
fn write_full_async(&mut self, obj: &str, buf: &[u8]) -> RadosFuture<()>
[src]
Asynchronously set the contents of a RADOS object using rados_aio_write_full
.
fn remove_async(&mut self, obj: &str) -> RadosFuture<()>
[src]
Asynchronously remove a RADOS object from the cluster using rados_aio_remove
.
fn read_async<B>(&mut self, obj: &str, buf: B, offset: u64) -> RadosFuture<B> where
B: StableDeref + DerefMut<Target = [u8]>,
[src]
B: StableDeref + DerefMut<Target = [u8]>,
Asynchronously read from a RADOS object using rados_aio_read
.
fn stat_async(
&mut self,
obj: &str
) -> Map<RadosFuture<Box<(u64, time_t)>>, fn(_: Box<(u64, time_t)>) -> RadosStat>
[src]
&mut self,
obj: &str
) -> Map<RadosFuture<Box<(u64, time_t)>>, fn(_: Box<(u64, time_t)>) -> RadosStat>
Asynchronously retrieve statistics of a specific object from the cluster using
rados_aio_stat
.
fn exists(&mut self, obj: &str) -> Result<bool>
[src]
Check whether or not a RADOS object exists under a given name, using rados_stat
and
checking the error code for ENOENT
.
fn exists_async(
&mut self,
obj: &str
) -> Then<RadosFuture<()>, Result<bool>, fn(_: Result<()>) -> Result<bool>>
[src]
&mut self,
obj: &str
) -> Then<RadosFuture<()>, Result<bool>, fn(_: Result<()>) -> Result<bool>>
Asynchronously check for object existence by using rados_aio_stat
and checking for
ENOENT
.
fn flush(&mut self) -> Result<()>
[src]
Flush all asynchronous I/O actions on the given context, blocking until they are complete.
fn flush_async(&mut self) -> RadosFuture<()>
[src]
Construct a future which will complete when all I/O actions on the given context are complete.