Trait RefineObjectList

Source
pub trait RefineObjectList<T, Error, ItemErr = Error>
where T: RefineObject<ItemErr>, Error: ListError, ItemErr: StdError + 'static,
{ // Provided methods fn set_name(&mut self, _name: &str) -> Result<(), Error> { ... } fn set_prefix(&mut self, _prefix: &str) -> Result<(), Error> { ... } fn set_common_prefix(&mut self, _list: &[Cow<'_, str>]) -> Result<(), Error> { ... } fn set_max_keys(&mut self, _max_keys: &str) -> Result<(), Error> { ... } fn set_key_count(&mut self, _key_count: &str) -> Result<(), Error> { ... } fn set_next_continuation_token_str( &mut self, _token: &str, ) -> Result<(), Error> { ... } fn set_list(&mut self, _list: Vec<T>) -> Result<(), Error> { ... } fn decode_common_prefix(&mut self, xml: &str) -> Result<(), InnerListError> { ... } fn decode<F>( &mut self, xml: &str, init_object: F, ) -> Result<(), InnerListError> where F: for<'a> Fn(&'a mut Self) -> Option<T> { ... } }
Expand description

将 object 列表写入到 rust 类型

Provided Methods§

Source

fn set_name(&mut self, _name: &str) -> Result<(), Error>

提取 bucket 名

Source

fn set_prefix(&mut self, _prefix: &str) -> Result<(), Error>

提取前缀

Source

fn set_common_prefix(&mut self, _list: &[Cow<'_, str>]) -> Result<(), Error>

提取文件目录

Source

fn set_max_keys(&mut self, _max_keys: &str) -> Result<(), Error>

提取 max_keys

Source

fn set_key_count(&mut self, _key_count: &str) -> Result<(), Error>

提取 key_count

Source

fn set_next_continuation_token_str(&mut self, _token: &str) -> Result<(), Error>

提取翻页信息 token

Source

fn set_list(&mut self, _list: Vec<T>) -> Result<(), Error>

提取 object 列表

Source

fn decode_common_prefix(&mut self, xml: &str) -> Result<(), InnerListError>

用于解析 common prefix

Source

fn decode<F>(&mut self, xml: &str, init_object: F) -> Result<(), InnerListError>
where F: for<'a> Fn(&'a mut Self) -> Option<T>,

§由 xml 转 struct 的底层实现
  • init_object 用于初始化 object 结构体的方法

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<P: PointerFamily, Item: RefineObject<E>, E: Error + 'static> RefineObjectList<Item, ObjectListError, E> for ObjectList<P, Item>