multipart::Part::file: function or associated item not found in Part
#2238
-
I am trying to use I've enabled the reqwest = { version = "0.12", features = ["json", "multipart"] } However, when I try to use a code like this, I get a build error as per the title. let file_part = multipart::Part::file("/foo/bar.out)?.mime_str("foo/bar")?; Creating a text let text_part = multipart::Part::text("footext").mime_str("text/plain")?; According to the docs I had a look into
So I am very puzzled by this. Anyone has any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Oh Ignore me!! I've mixed up the The |
Beta Was this translation helpful? Give feedback.
Oh Ignore me!! I've mixed up the
blocking
andasync
modules. Incredible oversight on my part. It just hit me.The
async
obviously does not have thefile
func:https://docs.rs/reqwest/latest/reqwest/multipart/struct.Part.html