Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-293

How to use custom binary with bson ?

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:

      Unable to find source-code formatter for language: rust. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      struct Foo {
      #[serde(with = "serde_bytes")]
         raw: Vec<u8>,
      }
      

      Hi! I would like to stock binary raw ethernet packets, currently use serde_bytes but it looks like base 64 encoded. Can I avoid it and use custom u8 ?

      https://docs.rs/bson/0.14.0/bson/spec/enum.BinarySubtype.html

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            silloddelattre@gmail.com Monochrome L.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: