Type Alias cuprate_rpc_types::misc::BinaryString

source ·
pub type BinaryString = String;
Expand description

TODO: we need to figure out a type that (de)serializes correctly, String errors with serde_json

use serde::Deserialize;
use serde_json::from_str;
use cuprate_rpc_types::misc::BinaryString;

#[derive(Deserialize)]
struct Key {
    key: BinaryString,
}

let binary = r"�\b����������";
let json = format!("{{\"key\":\"{binary}\"}}");
let key = from_str::<Key>(&json).unwrap();
let binary: BinaryString = key.key;

Aliased Type§

struct BinaryString { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes