GithubHelp home page GithubHelp logo

Comments (5)

frol avatar frol commented on May 25, 2024 1

@FrankC01 I see. Let's close this issue. Feel free to create a new one once you have clarity on your side

from borsh-rs.

FrankC01 avatar FrankC01 commented on May 25, 2024

@nearmax Any input to my question above?

from borsh-rs.

frol avatar frol commented on May 25, 2024

@FrankC01 borsh-rs is designed to be static, so it is going to be a completely separate effort to implement a dynamic version of it. It would even make sense to consider using serde and publish it as a new crate.

from borsh-rs.

frol avatar frol commented on May 25, 2024
 let c = B::try_from_slice(&b).unwrap(); // THROWS EXCEPTION

What would be the type of variable c in your example? You cannot expect it to be of type B, right? Type B is an empty struct.

from borsh-rs.

FrankC01 avatar FrankC01 commented on May 25, 2024

So after chatting on Discord I realize that my example was based on a misunderstanding on my part. I'm working on what I needed by parsing the inbound YAML and instantiating necessary constructs which reflect Type and then use standard Borsh deserialize on the input vector

from borsh-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.