pub trait PartEncoder<Item> {
type Error: EncodeError;
// Required methods
fn restore(&self) -> Result<Self, Self::Error>
where Self: Sized;
fn encode(&mut self, item: Item) -> Result<usize, Self::Error>;
fn flush(&mut self) -> Result<(), Self::Error>;
fn into_body(self) -> Result<PartBody, Self::Error>;
// Provided method
fn clear(&self) -> Result<Self, Self::Error>
where Self: Sized { ... }
}Expand description
Encoding for items in a part of a multipart upload.
Required Associated Types§
Sourcetype Error: EncodeError
type Error: EncodeError
The type of value returned when encoding items is not successful.
Required Methods§
Sourcefn restore(&self) -> Result<Self, Self::Error>where
Self: Sized,
fn restore(&self) -> Result<Self, Self::Error>where
Self: Sized,
Restore this encoder’s state for a new upload.
Provided Methods§
Implementors§
Source§impl<Item: AsRef<str>> PartEncoder<Item> for LinesEncoder
impl<Item: AsRef<str>> PartEncoder<Item> for LinesEncoder
type Error = Infallible
Source§impl<Item: Serialize> PartEncoder<Item> for CsvEncoder
Available on crate feature csv only.
impl<Item: Serialize> PartEncoder<Item> for CsvEncoder
Available on crate feature
csv only.