Struct Container

Source
pub struct Container { /* private fields */ }
Expand description

this defines the container resource

Implementations§

Source§

impl Container

Source

pub fn name(&self) -> Result<String, Error>

returns container name

Source§

impl Container

Source

pub fn info(&self) -> Result<ContainerMetadata, Error>

returns container metadata

Source§

impl Container

Source

pub fn get_data( &self, name: &str, start: u64, end: u64, ) -> Result<IncomingValue, Error>

retrieves an object or portion of an object, as a resource. Start and end offsets are inclusive. Once a data-blob resource has been created, the underlying bytes are held by the blobstore service for the lifetime of the data-blob resource, even if the object they came from is later deleted.

Source§

impl Container

Source

pub fn write_data(&self, name: &str, data: &OutgoingValue) -> Result<(), Error>

creates or replaces an object with the data blob.

Source§

impl Container

Source

pub fn list_objects(&self) -> Result<StreamObjectNames, Error>

returns list of objects in the container. Order is undefined.

Source§

impl Container

Source

pub fn delete_object(&self, name: &str) -> Result<(), Error>

deletes object. does not return error if object did not exist.

Source§

impl Container

Source

pub fn delete_objects(&self, names: &[ObjectName]) -> Result<(), Error>

deletes multiple objects in the container

Source§

impl Container

Source

pub fn has_object(&self, name: &str) -> Result<bool, Error>

returns true if the object exists in this container

Source§

impl Container

Source

pub fn object_info(&self, name: &str) -> Result<ObjectMetadata, Error>

returns metadata for the object

Source§

impl Container

Source

pub fn clear(&self) -> Result<(), Error>

removes all objects within the container, leaving the container empty.

Trait Implementations§

Source§

impl Debug for Container

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> TupleOrUnit<()> for T

Source§

fn into(self)