[−][src]Struct yukikaze::client::request::multipart::Form
Multipart Form.
Default boundary is yuki
.
Fields
boundary: &'static str
Boundary to use.
Implementations
impl Form
[src]
pub fn new() -> Self
[src]
Creates new instance of form.
pub fn with_boundary(boundary: &'static str) -> Self
[src]
Creates new instance with provided boundary.
Panic
In debug builds, it asserts whether string contains only ASCII characters or not.
pub fn add_field(&mut self, name: String, data: &[u8])
[src]
Adds new field with jsut name.
pub fn add_file_field(
&mut self,
field_name: String,
file_name: String,
mime: &Mime,
data: &[u8]
)
[src]
&mut self,
field_name: String,
file_name: String,
mime: &Mime,
data: &[u8]
)
Adds new field with file.
pub fn add_file<P: AsRef<Path>>(
&mut self,
field_name: String,
path: P
) -> Result<()>
[src]
&mut self,
field_name: String,
path: P
) -> Result<()>
Adds file to the form.
Note
It reads entire file into buffer.
IO Error
If error happens file copying content of file, then content of storage shall be restored to its state before starting the operation.
pub fn finish(self) -> (u64, Bytes)
[src]
Finishes creating form and produces body with its length
Auto Trait Implementations
impl RefUnwindSafe for Form
impl Send for Form
impl Sync for Form
impl Unpin for Form
impl UnwindSafe for Form
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,