MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / new

Method new

flow-plugins/src/utils/multipart.rs:22–35  ·  view source on GitHub ↗
(inner: W)

Source from the content-addressed store, hash-verified

20
21impl<W> MultipartWriter<W> {
22 pub fn new(inner: W) -> Self {
23 let mut boundary = String::with_capacity(32);
24 boundary.extend(
25 Alphanumeric
26 .sample_iter(rand::thread_rng())
27 .take(32)
28 .map(|c| c as char),
29 );
30 MultipartWriter {
31 inner,
32 boundary,
33 data_written: false,
34 }
35 }
36
37 fn get_field_header(&self, name: &str, content_type: &Mime) -> String {
38 format!(

Callers

nothing calls this directly

Calls 1

takeMethod · 0.80

Tested by

no test coverage detected