[][src]Trait multipart_rfc7578::BoundaryGenerator

pub trait BoundaryGenerator {
    fn generate_boundary() -> String;
}

A BoundaryGenerator is a policy to generate a random string to use as a part boundary.

The default generator will build a random string of 6 ascii characters. If you need more complexity, you can implement this, and use it with Form::new.

Examples

use multipart_rfc7578::BoundaryGenerator;

struct TestGenerator;

impl BoundaryGenerator for TestGenerator {
    fn generate_boundary() -> String {
        "test".to_string()
    }
}

Required methods

fn generate_boundary() -> String

Generates a String to use as a boundary.

Loading content...

Implementors

impl BoundaryGenerator for RandomAsciiGenerator[src]

fn generate_boundary() -> String[src]

Creates a boundary of 6 ascii characters.

Loading content...