Skip to main content

PartAlg

Trait PartAlg 

Source
pub trait PartAlg {
    type Content;

    // Required methods
    fn part_name(&self) -> Option<&str>;
    fn part_file_name(&self) -> Option<&str>;
    fn part_media_type(&self) -> Option<&str>;
    fn part_content(self) -> Self::Content;
}
Expand description

States one part of a body that arrives as parts.

A part states what it was sent under, and it carries a body like any other. What it carries is produced over time, so reading it is ChunksAlg again, one level down: a body of parts is a sequence, and so is each part’s content.

Required Associated Types§

Source

type Content

What this part carries, read as the chunks it arrives in.

Required Methods§

Source

fn part_name(&self) -> Option<&str>

Returns the name this part was sent under, where it states one.

Source

fn part_file_name(&self) -> Option<&str>

Returns the file name this part was sent under, where it states one.

Source

fn part_media_type(&self) -> Option<&str>

Returns the media type this part states, where it states one.

Source

fn part_content(self) -> Self::Content

Reads what this part carries.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§