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

Method write_field_with

flow-plugins/src/utils/multipart.rs:61–74  ·  view source on GitHub ↗
(
        &mut self,
        name: &str,
        content_type: &Mime,
        f: F,
    )

Source from the content-addressed store, hash-verified

59 }
60
61 pub fn write_field_with<F>(
62 &mut self,
63 name: &str,
64 content_type: &Mime,
65 f: F,
66 ) -> std::io::Result<&mut Self>
67 where
68 F: Fn(&mut W) -> std::io::Result<()>,
69 {
70 self.write_field_header(name, content_type)?;
71 f(&mut self.inner)?;
72 self.inner.write_all(b"\r\n")?;
73 Ok(self)
74 }
75
76 pub fn write_field<R: std::io::Read>(
77 &mut self,

Callers

nothing calls this directly

Calls 1

write_field_headerMethod · 0.80

Tested by

no test coverage detected