Open ildar opened 3 years ago
If you want to send actual binary data, I think it's better to write directly to the channel. The printing facility is really only meant for printing text. If it's actually text, you can use core::str::from_utf8
to convert it to an str
for printing.
the
set_print_channel()
consumes the channel hencewrite(channel, buf: &[u8])
can't be used. Andrtt_print()
doesn't accept&[u8]
. The situation when I need to write [u8] is trivial: to echo bytes I receive withread()
from down channel.