fn read_str(input: &mut InputBuffer) -> Result<String, ValueReadError> {
  rmp::decode::read_str(input, &mut Vec::new())
    .map_err(|err| match err {
      rmp::decode::DecodeStringError::InvalidMarkerRead(err) => ValueReadError::InvalidMarkerRead(err),
      rmp::decode::DecodeStringError::InvalidDataRead(err) => ValueReadError::InvalidDataRead(err),
      rmp::decode::DecodeStringError::TypeMismatch(marker) => ValueReadError::TypeMismatch(marker),
      DecodeStringError::BufferSizeTooSmall(_) => ValueReadError::TypeMismatch(rmp::Marker::Str8),
      DecodeStringError::InvalidUtf8(_, _) => ValueReadError::TypeMismatch(rmp::Marker::Str8),
    })
    .map(|s| s.to_string())
}
/// Read a string value from a buffer
Read a string value from a buffer
Read a string value from a buffer
fn read_str(input: &mut InputBuffer) -> Result<String, ValueReadError> {
  rmp::decode::read_str(input, &mut Vec::new())
    .map_err(|err| match err {
      rmp::decode::DecodeStringError::InvalidMarkerRead(err) => ValueReadError::InvalidMarkerRead(err),
      rmp::decode::DecodeStringError::InvalidDataRead(err) => ValueReadError::InvalidDataRead(err),
      rmp::decode::DecodeStringError::TypeMismatch(marker) => ValueReadError::TypeMismatch(marker),
      DecodeStringError::BufferSizeTooSmall(_) => ValueReadError::TypeMismatch(rmp::Marker::Str8),
      DecodeStringError::InvalidUtf8(_, _) => ValueReadError::TypeMismatch(rmp::Marker::Str8),
    })
    .map(|s| s.to_string())
}
fn read_str ( input : & mut InputBuffer ) -> Result < String , ValueReadError > { rmp :: decode :: read_str ( input , & mut Vec :: new ( ) ) . map_err ( | err | match err { rmp :: decode :: DecodeStringError :: InvalidMarkerRead ( err ) => ValueReadError :: InvalidMarkerRead ( err ) , rmp :: decode :: DecodeStringError :: InvalidDataRead ( err ) => ValueReadError :: InvalidDataRead ( err ) , rmp :: decode :: DecodeStringError :: TypeMismatch ( marker ) => ValueReadError :: TypeMismatch ( marker ) , DecodeStringError :: BufferSizeTooSmall ( _ ) => ValueReadError :: TypeMismatch ( rmp :: Marker :: Str8 ) , DecodeStringError :: InvalidUtf8 ( _ , _ ) => ValueReadError :: TypeMismatch ( rmp :: Marker :: Str8 ) , } ) . map ( | s | s . to_string ( ) ) }
Read a string value from a buffer
Read a string value from a buffer
input
&mut InputBuffer
input
&mut InputBuffer