2 ms·
Thanks, there are some good pain points there. > - The strict string handling. What about strings that should be UTF-8 but come over a network protocol? From
by creata 6y ago
Thanks, there are some good pain points there.
> - The strict string handling. What about strings that should be UTF-8 but come over a network protocol?
From your description, it looks like you're looking for String::{from_utf8,from_utf8_lossy,from_utf8_unchecked}[0], but I'm guessing you've seen those already, so I'm confused.
> - Combining async code with non-async code. Also, how do you write a library that does I/O and supports both sync and async?
I think you'll have to just duplicate the code, but I'd be happy to be proven wrong.
[0]: https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8 https://doc.rust-lang.org/std/string/struct.String.html#meth...