Comments (2)
After having fiddled around with the problem for a while, I realized I never needed to serialize the tarkov Item to begin with. I ended up placing the properties I needed into a new hashmap, writing this new hashmap to a file with serde.
I'm pretty new to Rust and keep learning as I go, so I will close this issue. Feel free to comment still, if you have anything to add!
In case anyone else encounters this issue, and wants to know how I went about solving it, here's that part of the code:
// Fetch items and write to file
let items = sess.get_items().await?;
let mut map_items = HashMap::new();
for (k, v) in items {
map_items.insert(v.name, v.id);
}
let file_items = File::create("items.txt")?;
serde_json::to_writer(file_items, &map_items)?;
I get the feeling I was trying to use tarkov::constant::Item in a way it was never meant to be used, so this was probably a non-issue to begin with.
from tarkov.
Serialize
trait is not implemented for that type: https://docs.rs/tarkov/0.1.1/tarkov/constant/struct.Item.html
I’ll “fix” this eventually.
from tarkov.
Related Issues (20)
- Fetch all flea market pages HOT 1
- Have a way to inspect attachments on items in ragfair? HOT 1
- profile is locked HOT 1
- How do i enter the captcha when authenticating using new hwid?
- How to get the price a trader is giving me for a specific item? HOT 4
- get_items() with #[no_mangle] causes cargo build to hang
- Is this still relevant HOT 1
- How to get session from EFT launcher? HOT 3
- Grab session from EFT launcher.
- Got "UnknownAPIError(232)" HOT 4
- Will project live with new SSL security feautre? HOT 1
- 'multiple rmeta candidates for tarkov...' 'cant find crate for tarkov' HOT 8
- failed to resolve: could not find `___rt` in quote HOT 3
- Lock down dependency versions in `Cargo.toml`
- Own offers list? HOT 1
- JSON Error - Invalid Type Integer HOT 2
- Not work now (NotAuthorized) should update UNITY version i think
- Character level restrictions HOT 2
- nvm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tarkov.