rsocket_rust 0.6.0

rsocket-rust is an implementation of the RSocket protocol in Rust.
Documentation
1
2
3
4
5
6
7
8
9
use bytes::Bytes;

#[inline]
pub(crate) fn bytes_to_utf8(input: &Option<Bytes>) -> Option<&str> {
    match input {
        Some(b) => std::str::from_utf8(b).ok(),
        None => None,
    }
}