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

Method write_field_header

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

Source from the content-addressed store, hash-verified

52
53impl<W: std::io::Write> MultipartWriter<W> {
54 fn write_field_header(&mut self, name: &str, content_type: &Mime) -> std::io::Result<()> {
55 let mut header = std::io::Cursor::new(self.get_field_header(name, content_type));
56 std::io::copy(&mut header, &mut self.inner)?;
57 self.data_written = true;
58 Ok(())
59 }
60
61 pub fn write_field_with<F>(
62 &mut self,

Callers 2

write_field_withMethod · 0.80
write_fieldMethod · 0.80

Calls 1

get_field_headerMethod · 0.80

Tested by

no test coverage detected