owengage / fastnbt

Fast serde serializer and deserializer for Minecraft's NBT and Anvil formats
MIT License
197 stars 37 forks source link

`Deserializer::from_reader` returns a private type, resulting compile error #118

Closed JieningYu closed 2 months ago

JieningYu commented 2 months ago

Trying to call the from_reader function results:

error: type `fastnbt::input::Reader<R>` is private
   --> crates/test/global/src/lib.rs:102:28
    |
102 |         let deserializer = fastnbt::de::Deserializer::from_reader(reader, fastnbt::DeOpts::new());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type

This should be same to from_bytes function (#117 )