Copy disabled (too large)
Download .txt
Showing preview only (36,570K chars total). Download the full file to get everything.
Repository: only-cliches/NoProto
Branch: master
Commit: 827ebb964480
Files: 475
Total size: 157.8 MB
Directory structure:
gitextract_swrs5c9q/
├── .gitignore
├── .idea/
│ ├── .gitignore
│ ├── NoProto.iml
│ ├── modules.xml
│ └── vcs.xml
├── LICENSE
├── README.md
├── bench/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── bench.fbs
│ ├── bench_fb.rs
│ ├── bench_pb.proto
│ ├── bench_pb.rs
│ ├── main.rs
│ ├── run_bench_abomonation.rs
│ ├── run_bench_avro.rs
│ ├── run_bench_bincode.rs
│ ├── run_bench_bson.rs
│ ├── run_bench_flatbuffers.rs
│ ├── run_bench_flexbuffers.rs
│ ├── run_bench_json.rs
│ ├── run_bench_messagepack.rs
│ ├── run_bench_messagepack_rs.rs
│ ├── run_bench_no_proto.rs
│ ├── run_bench_postcard.rs
│ ├── run_bench_prost.rs
│ ├── run_bench_protocol_buffers.rs
│ ├── run_bench_rawbson.rs
│ ├── run_bench_rkyv.rs
│ └── run_bench_serde_json.rs
├── examples/
│ └── quick.rs
├── idl.graphql
├── no_proto_js/
│ ├── Cargo.toml
│ ├── out.txt
│ └── src/
│ ├── buffer.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── table.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── hashmap.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── lib_wasm.rs
│ ├── memory.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ └── uuid.rs
│ ├── rpc.rs
│ ├── schema.rs
│ └── utils.rs
├── no_proto_rs/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── modules.xml
│ │ ├── no_proto_rs.iml
│ │ └── vcs.xml
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── buffer/
│ │ └── mod.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── struc.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── map.rs
│ ├── memory.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── portal.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ ├── union.rs
│ │ └── uuid.rs
│ ├── schema/
│ │ ├── args.rs
│ │ ├── ast.rs
│ │ ├── mod.rs
│ │ ├── parser.rs
│ │ └── tests.rs
│ ├── types.rs
│ ├── utils.rs
│ └── values/
│ └── mod.rs
└── no_proto_rs_old/
├── .idea/
│ ├── .gitignore
│ ├── modules.xml
│ ├── no_proto_rs.iml
│ └── vcs.xml
├── CHANGELOG.md
├── Cargo.toml
├── README.md
├── src/
│ ├── buffer.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── struc.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── hashmap.rs
│ ├── idl.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── memory.rs
│ ├── new_idl.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── portal.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ ├── union.rs
│ │ └── uuid.rs
│ ├── rpc.rs
│ ├── schema.rs
│ └── utils.rs
└── target/
├── .rustc_info.json
├── CACHEDIR.TAG
├── debug/
│ ├── .cargo-lock
│ ├── .fingerprint/
│ │ ├── no_proto-087b92dbcadb4e9e/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-1f12470dc8aab137/
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-2620c8dfffee77c5/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-2b9c306cf5e321b2/
│ │ │ └── invoked.timestamp
│ │ ├── no_proto-3cb4c0b2e234d1a3/
│ │ │ └── invoked.timestamp
│ │ ├── no_proto-42633ea97bf6e77b/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-441091bf4a4eb675/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-45445c9cceb28ae6/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-56746ab113abb4bf/
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-7ecb4680266c38b6/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-8d483704a5a1fdf6/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-aa3c6589db10b605/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-ae791f23982352cd/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-test-lib-no_proto
│ │ ├── no_proto-ba940134b4c1a3ac/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-c73899fa9d5a4e2e/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-test-lib-no_proto
│ │ ├── no_proto-d8cf3dffddd77550/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ └── no_proto-efe2ce7d02f8f240/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ └── deps/
│ ├── libno_proto-2b9c306cf5e321b2.rmeta
│ ├── libno_proto-3cb4c0b2e234d1a3.rmeta
│ ├── libno_proto-aa3c6589db10b605.rmeta
│ ├── libno_proto-efe2ce7d02f8f240.rmeta
│ ├── no_proto-087b92dbcadb4e9e.d
│ ├── no_proto-1f12470dc8aab137.d
│ ├── no_proto-2620c8dfffee77c5.d
│ ├── no_proto-2b9c306cf5e321b2.d
│ ├── no_proto-3cb4c0b2e234d1a3.d
│ ├── no_proto-42633ea97bf6e77b.d
│ ├── no_proto-441091bf4a4eb675.d
│ ├── no_proto-45445c9cceb28ae6.d
│ ├── no_proto-56746ab113abb4bf.d
│ ├── no_proto-7ecb4680266c38b6.d
│ ├── no_proto-8d483704a5a1fdf6.d
│ ├── no_proto-aa3c6589db10b605.d
│ ├── no_proto-ae791f23982352cd.d
│ ├── no_proto-ba940134b4c1a3ac.d
│ ├── no_proto-c73899fa9d5a4e2e.d
│ ├── no_proto-d8cf3dffddd77550.d
│ └── no_proto-efe2ce7d02f8f240.d
├── package/
│ ├── no_proto-0.9.60/
│ │ ├── .cargo_vcs_info.json
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── Cargo.toml.orig
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── buffer.rs
│ │ │ ├── collection/
│ │ │ │ ├── list.rs
│ │ │ │ ├── map.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── struc.rs
│ │ │ │ └── tuple.rs
│ │ │ ├── error.rs
│ │ │ ├── format.rs
│ │ │ ├── hashmap.rs
│ │ │ ├── idl.rs
│ │ │ ├── json_flex.rs
│ │ │ ├── lib.rs
│ │ │ ├── memory.rs
│ │ │ ├── pointer/
│ │ │ │ ├── any.rs
│ │ │ │ ├── bool.rs
│ │ │ │ ├── bytes.rs
│ │ │ │ ├── date.rs
│ │ │ │ ├── dec.rs
│ │ │ │ ├── geo.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── numbers.rs
│ │ │ │ ├── option.rs
│ │ │ │ ├── portal.rs
│ │ │ │ ├── string.rs
│ │ │ │ ├── ulid.rs
│ │ │ │ ├── union.rs
│ │ │ │ └── uuid.rs
│ │ │ ├── rpc.rs
│ │ │ ├── schema.rs
│ │ │ └── utils.rs
│ │ └── target/
│ │ ├── .rustc_info.json
│ │ ├── CACHEDIR.TAG
│ │ └── debug/
│ │ ├── .cargo-lock
│ │ ├── .fingerprint/
│ │ │ └── no_proto-d6c73808cf700296/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ └── lib-no_proto.json
│ │ ├── deps/
│ │ │ ├── libno_proto-d6c73808cf700296.rlib
│ │ │ ├── libno_proto-d6c73808cf700296.rmeta
│ │ │ └── no_proto-d6c73808cf700296.d
│ │ ├── incremental/
│ │ │ └── no_proto-3qu5d9195s2fa/
│ │ │ └── s-fx3rzdmmjm-18bks5k-2wqptzkhpfymz/
│ │ │ ├── 100zvx8sqgms7yao.o
│ │ │ ├── 11iag95g9k1r5eyg.o
│ │ │ ├── 11tt942yw3gl6w6j.o
│ │ │ ├── 11ubkt5vvp9qbq43.o
│ │ │ ├── 11vzpm5hf9bu8ymh.o
│ │ │ ├── 12n00tmiwnwxw4x5.o
│ │ │ ├── 12pwx2d3uqq2r7o3.o
│ │ │ ├── 13dgwjju0yyewxmu.o
│ │ │ ├── 14ro4lhdo34go3qh.o
│ │ │ ├── 14uydr737kwwqz1q.o
│ │ │ ├── 15bz6fbntl54m71v.o
│ │ │ ├── 15mh39nwjbcwzr96.o
│ │ │ ├── 17egp2whd2dugblv.o
│ │ │ ├── 18yyw1f532xcx611.o
│ │ │ ├── 1a6vq3jdbzpyqqzz.o
│ │ │ ├── 1bc3iz38mizgeurh.o
│ │ │ ├── 1bdkg9t4p7aa49mg.o
│ │ │ ├── 1cv9jk54xzbnkwwe.o
│ │ │ ├── 1gr7eaghjq6kh66w.o
│ │ │ ├── 1h9is57o6ueyr5yf.o
│ │ │ ├── 1hr8wozsrc0odsce.o
│ │ │ ├── 1kqemq46qhw91gde.o
│ │ │ ├── 1mm6jxl26kv2w5w.o
│ │ │ ├── 1oymp58xviu6kmdu.o
│ │ │ ├── 1p4tcqfz5qu64k1n.o
│ │ │ ├── 1tgdp93nk518p6lb.o
│ │ │ ├── 1u5en7gmon0stbjq.o
│ │ │ ├── 1uk09aus98x1fcdw.o
│ │ │ ├── 1zmfcdjd6gq5f76m.o
│ │ │ ├── 1zp47p9gvxkhg8rm.o
│ │ │ ├── 2041j4rd2c9vdtto.o
│ │ │ ├── 21x8hkxtjr93ocqa.o
│ │ │ ├── 22ksb9qfaojzkllm.o
│ │ │ ├── 23mytnugnofvpc1k.o
│ │ │ ├── 24g6fdg97fut59vz.o
│ │ │ ├── 25kqzwyxydzzmmfc.o
│ │ │ ├── 26rbdnzkddcfjn80.o
│ │ │ ├── 26z5s3uj6mgqu27o.o
│ │ │ ├── 273mtih8297mnhl.o
│ │ │ ├── 29rn58rlaxsmsdhh.o
│ │ │ ├── 2d92zzp7r2f2srg5.o
│ │ │ ├── 2h8memxx5w2ab8xa.o
│ │ │ ├── 2hzk6pkxh20qeyvo.o
│ │ │ ├── 2let3agjhes8hszq.o
│ │ │ ├── 2m4tz6iais3g6j8b.o
│ │ │ ├── 2nbyu8u7q9z8a7yq.o
│ │ │ ├── 2o5vtcg93b721b5w.o
│ │ │ ├── 2ob9m2ejmx9ta2kw.o
│ │ │ ├── 2oyschmdm8g4u3bq.o
│ │ │ ├── 2py65dwypimh54kd.o
│ │ │ ├── 2qnpbkpws3t61kd0.o
│ │ │ ├── 2rfgf26q748w8nda.o
│ │ │ ├── 2x7m2uim8dwt9ryx.o
│ │ │ ├── 2z4qe9ekl19e0nd6.o
│ │ │ ├── 2zoqal84hc1awxga.o
│ │ │ ├── 31k2qrnb96tdgzub.o
│ │ │ ├── 33jdmgjoup032j7d.o
│ │ │ ├── 33vm7ej7323a41w3.o
│ │ │ ├── 34sbj8qjnibb5vzk.o
│ │ │ ├── 35zi6bk0xq2t2a4r.o
│ │ │ ├── 38p7zh4prhcgtpym.o
│ │ │ ├── 39gs90pwr4ahejjs.o
│ │ │ ├── 39pt1bds4zeun3zv.o
│ │ │ ├── 3aw9xzy9urdgk277.o
│ │ │ ├── 3ca4z7optpq48sgf.o
│ │ │ ├── 3cqm8mc5s3w3jwbm.o
│ │ │ ├── 3dvo9vke2xp54az4.o
│ │ │ ├── 3f4h6h5a8u4psnxj.o
│ │ │ ├── 3fidzw8bo2xkn9qk.o
│ │ │ ├── 3funw30c4u8qcptj.o
│ │ │ ├── 3gpl5n74vl16dp1l.o
│ │ │ ├── 3hr6jjpend1fbnpx.o
│ │ │ ├── 3j5v6eqri4apvf0y.o
│ │ │ ├── 3jt1l7j0355uw8y8.o
│ │ │ ├── 3oe7o7pbwk6wbcfq.o
│ │ │ ├── 3ojb2ffhbpjvxt53.o
│ │ │ ├── 3p7m31na2sy1q3i2.o
│ │ │ ├── 3powsrsng6z9nwos.o
│ │ │ ├── 3qbp8vjygwoqyuuh.o
│ │ │ ├── 3skfd8w031qa9kff.o
│ │ │ ├── 3tf22gdcijvxj3y4.o
│ │ │ ├── 3ui1enrtka3f8psq.o
│ │ │ ├── 3vfw8hbs6041fe5s.o
│ │ │ ├── 3wooguttztqa99fa.o
│ │ │ ├── 3x9u5md7ioqd1e07.o
│ │ │ ├── 3xtms7x4n7yzohz7.o
│ │ │ ├── 3y20ttprujzichlw.o
│ │ │ ├── 40hh2p17ds70ezmq.o
│ │ │ ├── 40nsve19lm6mu2h9.o
│ │ │ ├── 43db2joh49ui8n4n.o
│ │ │ ├── 45r51elk92slqab3.o
│ │ │ ├── 46qflx5rbs9omtev.o
│ │ │ ├── 4730d2pomhow1bi0.o
│ │ │ ├── 48nf0owqn4lpindz.o
│ │ │ ├── 49twenxbswx7duz3.o
│ │ │ ├── 49u03kk1zzywsaaw.o
│ │ │ ├── 4bgapmze4epxook3.o
│ │ │ ├── 4cpa7sdc6cgp7t19.o
│ │ │ ├── 4ep2v5goyyhunnwj.o
│ │ │ ├── 4gglmv630h9orj05.o
│ │ │ ├── 4h3hqc86r40b5z6e.o
│ │ │ ├── 4i606q14g552vn2l.o
│ │ │ ├── 4jclbqt2cp5gyk1i.o
│ │ │ ├── 4jw1mhh26n6aug1p.o
│ │ │ ├── 4jz9pkgivbifer3j.o
│ │ │ ├── 4mi6ryztsb1jfj0x.o
│ │ │ ├── 4mwzhnescddvwetf.o
│ │ │ ├── 4mxmeblapqty0l6p.o
│ │ │ ├── 4n1s6swmhxaydea4.o
│ │ │ ├── 4p3iqe3zrx2b52d0.o
│ │ │ ├── 4q35ka4r1s48t9pt.o
│ │ │ ├── 4r4p190yu5mccdal.o
│ │ │ ├── 4rfmo4m0kaajsqjm.o
│ │ │ ├── 4rl82w5reifn9kgp.o
│ │ │ ├── 4sdnuqssdshysvt4.o
│ │ │ ├── 4subn6gdy3a0ggvs.o
│ │ │ ├── 4trz4jwr83gq0uh0.o
│ │ │ ├── 4vjpv8hbj9h5ja0m.o
│ │ │ ├── 4x7qrrsbv2eizn8m.o
│ │ │ ├── 4y3x960eu0904pon.o
│ │ │ ├── 4y4otpmmjho1x33s.o
│ │ │ ├── 4ytyxcz7xcz75hww.o
│ │ │ ├── 4zxqm4gbs67z9dxz.o
│ │ │ ├── 54hxyp93wpr3w2xh.o
│ │ │ ├── 57hmggqjfsqr1v09.o
│ │ │ ├── 58epi6n1rcquht6l.o
│ │ │ ├── 5biabrm9k90uk13i.o
│ │ │ ├── 5c530q0vz0vjt9g4.o
│ │ │ ├── 5c692wk1ti7iqhe4.o
│ │ │ ├── 5cb1xx7shw45lknz.o
│ │ │ ├── 5cjucmbxyynp2r67.o
│ │ │ ├── 5dbl5mjj8wkpsjgf.o
│ │ │ ├── 5evzxbtdt4l764qw.o
│ │ │ ├── 5frn0tcv0iny5pki.o
│ │ │ ├── 6xxtzj7rzihpmdx.o
│ │ │ ├── d4arbz7m98pdqoh.o
│ │ │ ├── ddj6ocdj6r4403e.o
│ │ │ ├── ecne6g4n0c28n94.o
│ │ │ ├── h5cwo8s7wezxhxn.o
│ │ │ ├── hgb5w3f9ivs0xca.o
│ │ │ ├── i4kyy20hoy1k0d2.o
│ │ │ ├── kymb80dlee7p7mg.o
│ │ │ ├── ng7tjeh1zyosfsj.o
│ │ │ ├── oxm053hhs2ij6im.o
│ │ │ ├── peyndyzl8jkh94k.o
│ │ │ ├── r6z7oj1jfl0jxqt.o
│ │ │ ├── s8m0rdhqo3uso4f.o
│ │ │ ├── td46wacb1m1wq8h.o
│ │ │ ├── yq9ovk1sauo3ske.o
│ │ │ ├── z0p1vtjbuwd9uz9.o
│ │ │ └── zxwh8vegkl4qe5j.o
│ │ ├── libno_proto.d
│ │ └── libno_proto.rlib
│ └── no_proto-0.9.60.crate
└── rls/
├── .rustc_info.json
├── CACHEDIR.TAG
└── debug/
├── .cargo-lock
├── .fingerprint/
│ ├── no_proto-087b92dbcadb4e9e/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-42633ea97bf6e77b/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-441091bf4a4eb675/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-45445c9cceb28ae6/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-7ecb4680266c38b6/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-8d483704a5a1fdf6/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-aa3c6589db10b605/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ └── no_proto-efe2ce7d02f8f240/
│ ├── dep-lib-no_proto
│ ├── invoked.timestamp
│ ├── lib-no_proto
│ └── lib-no_proto.json
└── deps/
├── libno_proto-aa3c6589db10b605.rmeta
├── libno_proto-efe2ce7d02f8f240.rmeta
├── no_proto-087b92dbcadb4e9e.d
├── no_proto-42633ea97bf6e77b.d
├── no_proto-441091bf4a4eb675.d
├── no_proto-45445c9cceb28ae6.d
├── no_proto-7ecb4680266c38b6.d
├── no_proto-8d483704a5a1fdf6.d
├── no_proto-aa3c6589db10b605.d
├── no_proto-efe2ce7d02f8f240.d
└── save-analysis/
├── libno_proto-087b92dbcadb4e9e.json
└── no_proto-441091bf4a4eb675.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
no_proto_rs/target
**/*.rs.bk
no_proto_rs/Cargo.lock
test.json
bench/target/**/*
no_proto_js/target/**/*
target/**/*
================================================
FILE: .idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
================================================
FILE: .idea/NoProto.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/no_proto_rs/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/no_proto_rs/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/NoProto.iml" filepath="$PROJECT_DIR$/.idea/NoProto.iml" />
</modules>
</component>
</project>
================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 Scott Lott
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
## NoProto: Flexible, Fast & Compact Serialization with RPC
<img src="https://github.com/only-cliches/NoProto/raw/master/logo_small.png"/>
[Github](https://github.com/only-cliches/NoProto) | [Crates.io](https://crates.io/crates/no_proto) | [Documentation](https://docs.rs/no_proto)
[](https://lbesson.mit-license.org/)
[](https://crates.io/crates/no_proto)
[](https://docs.rs/no_proto/latest/no_proto/)
[](https://GitHub.com/only-cliches/NoProto/stargazers/)
### Features
**Lightweight**<br/>
- Zero dependencies
- `no_std` support, WASM ready
- Most compact non compiling storage format
**Stable**<br/>
- Safely accept untrusted buffers
- Passes Miri compiler safety checks
- Panic and unwrap free
**Easy**<br/>
- Extensive Documentation & Testing
- Full interop with JSON, Import and Export JSON values
- [Thoroughly documented](https://docs.rs/no_proto/latest/no_proto/format/index.html) & simple data storage format
**Fast**<br/>
- Zero copy deserialization
- Most updates are append only
- Deserialization is incrimental
**Powerful**<br/>
- Native byte-wise sorting
- Supports recursive data types
- Supports most common native data types
- Supports collections (list, map, struct & tuple)
- Supports arbitrary nesting of collection types
- Schemas support default values and non destructive updates
- Transport agnostic [RPC Framework](https://docs.rs/no_proto/latest/no_proto/rpc/index.html).
### Why ANOTHER Serialization Format?
1. NoProto combines the **performance** of compiled formats with the **flexibilty** of dynamic formats:
**Compiled** formats like Flatbuffers, CapN Proto and bincode have amazing performance and extremely compact buffers, but you MUST compile the data types into your application. This means if the schema of the data changes the application must be recompiled to accomodate the new schema.
**Dynamic** formats like JSON, MessagePack and BSON give flexibilty to store any data with any schema at runtime but the buffers are fat and performance is somewhere between horrible and hopefully acceptable.
NoProto takes the performance advantages of compiled formats and implements them in a flexible format.
2. NoProto is a **key-value database focused format**:
**Byte Wise Sorting** Ever try to store a signed integer as a sortable key in a database? NoProto can do that. Almost every data type is stored in the buffer as byte-wise sortable, meaning buffers can be compared at the byte level for sorting *without deserializing*.
**Primary Key Management** Compound sortable keys are extremely easy to generate, maintain and update with NoProto. You don't need a custom sort function in your key-value store, you just need this library.
**UUID & ULID Support** NoProto is one of the few formats that come with first class suport for these popular primary key data types. It can easily encode, decode and generate these data types.
**Fastest Updates** NoProto is the only format that supports *all mutations* without deserializng. It can do the common database read -> update -> write operation between 50x - 300x faster than other dynamic formats. [Benchamrks](#benchmarks)
### Comparison With Other Formats
<br/>
<details>
<summary><b>Compared to Apache Avro</b></summary>
- Far more space efficient<br/>
- Significantly faster serialization & deserialization<br/>
- All values are optional (no void or null type)<br/>
- Supports more native types (like unsigned ints)<br/>
- Updates without deserializng/serializing<br/>
- Works with `no_std`.<br/>
- Safely handle untrusted data.<br/>
</details>
<br/>
<details>
<summary><b>Compared to Protocol Buffers</b></summary>
- Comparable serialization & deserialization performance<br/>
- Updating buffers is an order of magnitude faster<br/>
- Schemas are dynamic at runtime, no compilation step<br/>
- All values are optional<br/>
- Supports more types and better nested type support<br/>
- Byte-wise sorting is first class operation<br/>
- Updates without deserializng/serializing<br/>
- Safely handle untrusted data.<br/>
- All values are optional and can be inserted in any order.<br/>
</details>
<br/>
<details>
<summary><b>Compared to JSON / BSON</b></summary>
- Far more space efficient<br/>
- Significantly faster serialization & deserialization<br/>
- Deserializtion is zero copy<br/>
- Has schemas / type safe<br/>
- Supports byte-wise sorting<br/>
- Supports raw bytes & other native types<br/>
- Updates without deserializng/serializing<br/>
- Works with `no_std`.<br/>
- Safely handle untrusted data.<br/>
</details>
<br/>
<details>
<summary><b>Compared to Flatbuffers / Bincode</b></summary>
- Data types can change or be created at runtime<br/>
- Updating buffers is an order of magnitude faster<br/>
- Supports byte-wise sorting<br/>
- Updates without deserializng/serializing<br/>
- Works with `no_std`.<br/>
- Safely handle untrusted data.<br/>
- All values are optional and can be inserted in any order.<br/>
</details>
<br/><br/>
| Format | Zero-Copy | Size Limit | Mutable | Schemas | Byte-wise Sorting |
|------------------|-----------|------------|---------|----------|-------------------|
| **Runtime Libs** | | | | | |
| *NoProto* | ✓ | ~4GB | ✓ | ✓ | ✓ |
| Apache Avro | ✗ | 2^63 Bytes | ✗ | ✓ | ✓ |
| JSON | ✗ | Unlimited | ✓ | ✗ | ✗ |
| BSON | ✗ | ~16MB | ✓ | ✗ | ✗ |
| MessagePack | ✗ | Unlimited | ✓ | ✗ | ✗ |
| **Compiled Libs**| | | | | |
| FlatBuffers | ✓ | ~2GB | ✗ | ✓ | ✗ |
| Bincode | ✓ | ? | ✓ | ✓ | ✗ |
| Protocol Buffers | ✗ | ~2GB | ✗ | ✓ | ✗ |
| Cap'N Proto | ✓ | 2^64 Bytes | ✗ | ✓ | ✗ |
| Veriform | ✗ | ? | ✗ | ✗ | ✗ |
# Quick Example
```rust
use no_proto::error::NP_Error;
use no_proto::NP_Factory;
// An ES6 like IDL is used to describe schema for the factory
// Each factory represents a single schema
// One factory can be used to serialize/deserialize any number of buffers
let user_factory = NP_Factory::new(r#"
struct({ fields: {
name: string(),
age: u16({ default: 0 }),
tags: list({ of: string() })
}})
"#)?;
// create a new empty buffer
let mut user_buffer = user_factory.new_buffer(None); // optional capacity
// set the "name" field
user_buffer.set(&["name"], "Billy Joel")?;
// read the "name" field
let name = user_buffer.get::<&str>(&["name"])?;
assert_eq!(name, Some("Billy Joel"));
// set a nested value, the first tag in the tag list
user_buffer.set(&["tags", "0"], "first tag")?;
// read the first tag from the tag list
let tag = user_buffer.get::<&str>(&["tags", "0"])?;
assert_eq!(tag, Some("first tag"));
// close buffer and get internal bytes
let user_bytes: Vec<u8> = user_buffer.finish().bytes();
// open the buffer again
let user_buffer = user_factory.open_buffer(user_bytes);
// read the "name" field again
let name = user_buffer.get::<&str>(&["name"])?;
assert_eq!(name, Some("Billy Joel"));
// get the age field
let age = user_buffer.get::<u16>(&["age"])?;
// returns default value from schema
assert_eq!(age, Some(0u16));
// close again
let user_bytes: Vec<u8> = user_buffer.finish().bytes();
// we can now save user_bytes to disk,
// send it over the network, or whatever else is needed with the data
# Ok::<(), NP_Error>(())
```
## Guided Learning / Next Steps:
1. [`Schemas`](https://docs.rs/no_proto/latest/no_proto/schema/index.html) - Learn how to build & work with schemas.
2. [`Factories`](https://docs.rs/no_proto/latest/no_proto/struct.NP_Factory.html) - Parsing schemas into something you can work with.
3. [`Buffers`](https://docs.rs/no_proto/latest/no_proto/buffer/struct.NP_Buffer.html) - How to create, update & compact buffers/data.
4. [`RPC Framework`](https://docs.rs/no_proto/latest/no_proto/rpc/index.html) - How to use the RPC Framework APIs.
5. [`Data & Schema Format`](https://docs.rs/no_proto/latest/no_proto/format/index.html) - Learn how data is saved into the buffer and schemas.
## Benchmarks
While it's difficult to properly benchmark libraries like these in a fair way, I've made an attempt in the graph below. These benchmarks are available in the `bench` folder and you can easily run them yourself with `cargo run --release`.
The format and data used in the benchmarks were taken from the `flatbuffers` benchmarks github repo. You should always benchmark/test your own use case for each library before making any choices on what to use.
**Legend**: Ops / Millisecond, higher is better
| Format / Lib | Encode | Decode All | Decode 1 | Update 1 | Size (bytes) | Size (Zlib) |
|------------------------------------------------------------|---------|------------|----------|----------|--------------|-------------|
| **Runtime Libs** | | | | | | |
| *NoProto* | | | | | | |
| [no_proto](https://crates.io/crates/no_proto) | 1393 | 1883 | 55556 | 9524 | 308 | 198 |
| Apache Avro | | | | | | |
| [avro-rs](https://crates.io/crates/avro-rs) | 156 | 57 | 56 | 40 | 702 | 337 |
| FlexBuffers | | | | | | |
| [flexbuffers](https://crates.io/crates/flexbuffers) | 444 | 962 | 24390 | 294 | 490 | 309 |
| JSON | | | | | | |
| [json](https://crates.io/crates/json) | 609 | 481 | 607 | 439 | 439 | 184 |
| [serde_json](https://crates.io/crates/serde_json) | 938 | 646 | 644 | 403 | 446 | 198 |
| BSON | | | | | | |
| [bson](https://crates.io/crates/bson) | 129 | 116 | 123 | 90 | 414 | 216 |
| [rawbson](https://crates.io/crates/rawbson) | 130 | 1117 | 17857 | 89 | 414 | 216 |
| MessagePack | | | | | | |
| [rmp](https://crates.io/crates/rmp) | 661 | 623 | 832 | 202 | 311 | 193 |
| [messagepack-rs](https://crates.io/crates/messagepack-rs) | 152 | 266 | 284 | 138 | 296 | 187 |
| **Compiled Libs** | | | | | | |
| Flatbuffers | | | | | | |
| [flatbuffers](https://crates.io/crates/flatbuffers) | 3165 | 16393 | 250000 | 2532 | 264 | 181 |
| Bincode | | | | | | |
| [bincode](https://crates.io/crates/bincode) | 6757 | 9259 | 10000 | 4115 | 163 | 129 |
| Postcard | | | | | | |
| [postcard](https://crates.io/crates/postcard) | 3067 | 7519 | 7937 | 2469 | 128 | 119 |
| Protocol Buffers | | | | | | |
| [protobuf](https://crates.io/crates/protobuf) | 953 | 1305 | 1312 | 529 | 154 | 141 |
| [prost](https://crates.io/crates/prost) | 1464 | 2020 | 2232 | 1040 | 154 | 142 |
| Abomonation | | | | | | |
| [abomonation](https://crates.io/crates/abomonation) | 2342 | 125000 | 500000 | 2183 | 261 | 160 |
| Rkyv | | | | | | |
| [rkyv](https://crates.io/crates/rkyv) | 1605 | 37037 | 200000 | 1531 | 180 | 154 |
- **Encode**: Transfer a collection of fields of test data into a serialized `Vec<u8>`.
- **Decode All**: Deserialize the test object from the `Vec<u8>` into all fields.
- **Decode 1**: Deserialize the test object from the `Vec<u8>` into one field.
- **Update 1**: Deserialize, update a single field, then serialize back into `Vec<u8>`.
**Runtime VS Compiled Libs**: Some formats require data types to be compiled into the application, which increases performance but means data types *cannot change at runtime*. If data types need to mutate during runtime or can't be known before the application is compiled (like with databases), you must use a format that doesn't compile data types into the application, like JSON or NoProto.
Complete benchmark source code is available [here](https://github.com/only-cliches/NoProto/tree/master/bench). Suggestions for improving the quality of these benchmarks is appreciated.
## NoProto Strengths
If your use case fits any of the points below, NoProto might be a good choice for your application.
1. Flexible At Runtime<br/>
If you need to work with data types that will change or be created at runtime, you normally have to pick something like JSON since highly optimized formats like Flatbuffers and Bincode depend on compiling the data types into your application (making everything fixed at runtime). When it comes to formats that can change/implement data types at runtime, NoProto is fastest format we're aware of (if you know if one that might be faster, let us know!).
2. Safely Accept Untrusted Data</br>
The worse case failure mode for NoProto buffers is junk data. While other formats can cause denial of service attacks or allow unsafe memory access, there is no such failure case with NoProto. There is no way to construct a NoProto buffer that would cause any detrement in performance to the host application or lead to unsafe memory access. Also, there is no panic causing code in the library, meaning it will never crash your application.
3. Extremely Fast Updates<br/>
If you have a workflow in your application that is read -> modify -> write with buffers, NoProto will usually outperform every other format, including Bincode and Flatbuffers. This is because NoProto never actually deserializes, it doesn't need to. This includes complicated mutations like pushing a value onto a nested list or replacing entire structs.
4. All Fields Optional, Insert/Update In Any Order<br/>
Many formats require that all values be present to close the buffer, further they may require data to be inserted in a specific order to accomodate the encoding/decoding scheme. With NoProto, all fields are optional and any update/insert can happen in any order.
5. Incremental Deserializing<br/>
You only pay for the fields you read, no more. There is no deserializing step in NoProto, opening a buffer performs no operations. Once you start asking for fields, the library will navigate the buffer using the format rules to get just what you asked for and nothing else. If you have a workflow in your application where you read a buffer and only grab a few fields inside it, NoProto will outperform most other libraries.
6. Bytewise Sorting<br/>
Almost all of NoProto's data types are designed to serialize into bytewise sortable values, *including signed integers*. When used with Tuples, making database keys with compound sorting is extremly easy. When you combine that with first class support for `UUID`s and `ULID`s NoProto makes an excellent tool for parsing and creating primary keys for databases like RocksDB, LevelDB and TiKV.
7. `no_std` Support<br/>
If you need a serialization format with low memory usage that works in `no_std` environments, NoProto is one of the few good choices.
8. Stable<br/>
NoProto will never cause a panic in your application. It has *zero* panics or unwraps, meaning there is no code path that could lead to a panic. Fallback behavior is to provide a sane default path or bubble an error up to the caller.
9. CPU Independent<br/>
All numbers and pointers in NoProto buffers are always stored in big endian, so you can safely create buffers on any CPU architecture and know that they will work with any other CPU architecture.
### When to use Flatbuffers / Bincode / CapN Proto
If you can safely compile all your data types into your application, all the buffers/data is trusted, and you don't intend to mutate buffers after they're created, Bincode/Flatbuffers/CapNProto is a better choice for you.
### When to use JSON / BSON / MessagePack
If your data changes so often that schemas don't really make sense or the format you use must be self describing, JSON/BSON/MessagePack is a better choice. Although I'd argue that if you *can* make schemas work you should. Once you can use a format with schemas you save a ton of space in the resulting buffers and performance far better.
## Limitations
- Structs and Tuples cannot have more than 255 items.
- Lists and Maps cannot have more than 2^16 (~64k) items.
- You cannot nest more than 255 levels deep.
- Struct field names cannot be longer than 255 UTF8 bytes.
- Enum/Option types are limited to 255 options and each option cannot be more than 255 UTF8 Bytes.
- Map keys cannot be larger than 255 UTF8 bytes.
- Buffers cannot be larger than 2^32 bytes or ~4GB.
## Unsafe
This library makes use of `unsafe` to get better performance. Generally speaking, it's not possible to have a high performance serialization library without `unsafe`. It is only used where performance improvements are significant and additional checks are performed so that the worst case for any `unsafe` block is it leads to junk data in a buffer.
----------------------
MIT License
Copyright (c) 2021 Scott Lott
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: bench/Cargo.toml
================================================
[package]
name = "bench"
version = "0.1.0"
authors = ["scottlott"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
abomonation = "0.7.3"
abomonation_derive = "0.5.0"
avro-rs = "0.12.0"
bincode = "1.3.1"
bson = "1.1.0"
bytes = "1.0.0"
flatbuffers = "0.7.0"
flate2 = "1.0.19"
flexbuffers = "0.2.1"
json = "0.12.4"
messagepack-rs = "0.8.0"
no_proto = { path = "../no_proto_rs" }
postcard = { version = "0.5.2", features = ["use-std"] }
prost = "0.7.0"
protobuf = "2.18.1"
rand = "0.7.3"
rawbson = "0.2.0"
rkyv = "0.3.0"
rmp = "0.8.9"
rmp-serde = "0.15.1"
rmpv = "0.4.6"
serde = "1.0.118"
serde_json = "1.0.61"
[target.x86_64-apple-darwin]
rustflags = ["-Ctarget-cpu=native"]
================================================
FILE: bench/README.md
================================================
# NoProto Benchmarks
The benchmarks in this folder are used to record performance progress and provide entirely subjective comparisons to other similar projects.
All libraries are working with an object that contains the same data and fields. Data types are matched as much as possible.
### Size Benchmark
The example object is encoded once, and it's size in bytes is recorded as well as it's size in bytes with zlib compression.
### Encode Benchmark
The example object is encoded/serialized into the format supported by the various libraries. Specifically, the benchmark measures how long it takes to get an owned `Vec<u8>` out of the library.
### Decode All Benchmark
A single object is encoded, then the library decodes that object into it's parts 1,000,000 times. Copying of the original buffer is only perfomed if it's needed by the library to complete decoding. This measures how long it takes to go from a `Vec<u8>` to a shared immutable reference to all properties/values in the object.
### Decode One Benchmark
A single object is encoded, then the library decodes a single property of that object 1,000,000 times. Copying of the original buffer is only perfomed if it's needed by the library to complete decoding. This measures how long it takes to go from a `Vec<u8>` to a shared immutable reference of a single value in the object.
### Update One Benchmark
A single object is encoded, then the library should decode, update one property on the object then re encode the object 1,000,000 times. The benchmark measures how long it takes to get from a deserialized buffer into another deserialized buffer with a single update performed in the new buffer.
Benchmarks can be ran with `cargo run --release`.
## Benchmark Rules
It's challenging to provide a level playing field for every library and implementation. As much as possible, the following guidelines are followed with building the benchmarks:
1. **Allocation is avoided wherever possible.** With serialization and deserialization the cost of allocation is usually the most expensive part of encoding or decoding a message. If a library provides an API that avoids allocation, that one is used where possible.
2. **Dynamic Array types must be used**. Some libraries can avoid allocation by using a fixed size array in the benchmark, isntead of a dynamic one. Since almost every library/format supports lists that can change in size, this optimization is not allowed even if it's possible. The spirit of the benchmark is to test how quickly a dynamically sized array of items can be encoded/decoded, not a fixed size array (even though a fixed size is used).
# Benchmarks Histry
## Feb 8, 2021
### 0.9.4
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 308b, zlib: 198b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Postcard: size: 128b, zlib: 119b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 311b, zlib: 193b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 337b
Flexbuffers: size: 490b, zlib: 309b
Abomonation: size: 261b, zlib: 160b
Rkyv: size: 180b, zlib: 154b
Raw BSON: size: 414b, zlib: 216b
MessagePack: size: 296b, zlib: 187b
Serde JSON: size: 446b, zlib: 198b
======== ENCODE BENCHMARK ========
NoProto: 1393 ops/ms 1.00
Flatbuffers: 3165 ops/ms 2.27
Bincode: 6757 ops/ms 4.84
Postcard: 3067 ops/ms 2.20
Protobuf: 953 ops/ms 0.68
MessagePack: 661 ops/ms 0.47
JSON: 609 ops/ms 0.44
BSON: 129 ops/ms 0.09
Prost: 1464 ops/ms 1.05
Avro: 156 ops/ms 0.11
Flexbuffers: 444 ops/ms 0.32
Abomonation: 2342 ops/ms 1.68
Rkyv: 1605 ops/ms 1.15
Raw BSON: 130 ops/ms 0.09
MessagePack: 152 ops/ms 0.11
Serde JSON: 938 ops/ms 0.67
======== DECODE BENCHMARK ========
NoProto: 1883 ops/ms 1.00
Flatbuffers: 16393 ops/ms 8.57
Bincode: 9259 ops/ms 4.90
Postcard: 7519 ops/ms 3.99
Protobuf: 1305 ops/ms 0.69
MessagePack: 623 ops/ms 0.33
JSON: 481 ops/ms 0.26
BSON: 116 ops/ms 0.06
Prost: 2020 ops/ms 1.07
Avro: 57 ops/ms 0.03
Flexbuffers: 962 ops/ms 0.51
Abomonation: 125000 ops/ms 61.66
Rkyv: 37037 ops/ms 19.16
Raw BSON: 1117 ops/ms 0.59
MessagePack: 266 ops/ms 0.14
Serde JSON: 646 ops/ms 0.34
====== DECODE ONE BENCHMARK ======
NoProto: 55556 ops/ms 1.00
Flatbuffers: 250000 ops/ms 3.88
Bincode: 10000 ops/ms 0.18
Postcard: 7937 ops/ms 0.14
Protobuf: 1312 ops/ms 0.02
MessagePack: 832 ops/ms 0.02
JSON: 607 ops/ms 0.01
BSON: 123 ops/ms 0.00
Prost: 2232 ops/ms 0.04
Avro: 56 ops/ms 0.00
Flexbuffers: 24390 ops/ms 0.44
Abomonation: 500000 ops/ms 7.54
Rkyv: 200000 ops/ms 3.36
Raw BSON: 17857 ops/ms 0.32
MessagePack: 284 ops/ms 0.01
Serde JSON: 644 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 9524 ops/ms 1.00
Flatbuffers: 2532 ops/ms 0.27
Bincode: 4115 ops/ms 0.43
Postcard: 2469 ops/ms 0.26
Protobuf: 529 ops/ms 0.06
MessagePack: 202 ops/ms 0.02
JSON: 439 ops/ms 0.05
BSON: 90 ops/ms 0.01
Prost: 1040 ops/ms 0.11
Avro: 40 ops/ms 0.00
Flexbuffers: 294 ops/ms 0.03
Abomonation: 2183 ops/ms 0.23
Rkyv: 1531 ops/ms 0.16
Raw BSON: 89 ops/ms 0.01
MessagePack: 138 ops/ms 0.01
Serde JSON: 403 ops/ms 0.04
```
## Feb 7, 2021
### 0.9.3
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Postcard: size: 128b, zlib: 119b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 311b, zlib: 193b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 339b
Flexbuffers: size: 490b, zlib: 309b
Abomonation: size: 261b, zlib: 163b
Rkyv: size: 180b, zlib: 152b
Raw BSON: size: 414b, zlib: 216b
MessagePack: size: 296b, zlib: 187b
Serde JSON: size: 446b, zlib: 198b
======== ENCODE BENCHMARK ========
NoProto: 1258 ops/ms 1.00
Flatbuffers: 3086 ops/ms 2.45
Bincode: 6849 ops/ms 5.44
Postcard: 2841 ops/ms 2.26
Protobuf: 956 ops/ms 0.76
MessagePack: 661 ops/ms 0.53
JSON: 616 ops/ms 0.49
BSON: 129 ops/ms 0.10
Prost: 1570 ops/ms 1.25
Avro: 155 ops/ms 0.12
Flexbuffers: 455 ops/ms 0.36
Abomonation: 2347 ops/ms 1.86
Rkyv: 1684 ops/ms 1.34
Raw BSON: 129 ops/ms 0.10
MessagePack: 149 ops/ms 0.12
Serde JSON: 929 ops/ms 0.74
======== DECODE BENCHMARK ========
NoProto: 1901 ops/ms 1.00
Flatbuffers: 16393 ops/ms 8.54
Bincode: 9524 ops/ms 4.98
Postcard: 7634 ops/ms 4.00
Protobuf: 1269 ops/ms 0.67
MessagePack: 657 ops/ms 0.35
JSON: 497 ops/ms 0.26
BSON: 116 ops/ms 0.06
Prost: 2096 ops/ms 1.10
Avro: 56 ops/ms 0.03
Flexbuffers: 955 ops/ms 0.50
Abomonation: 125000 ops/ms 61.13
Rkyv: 37037 ops/ms 19.34
Raw BSON: 1134 ops/ms 0.60
MessagePack: 263 ops/ms 0.14
Serde JSON: 640 ops/ms 0.34
====== DECODE ONE BENCHMARK ======
NoProto: 55556 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.03
Bincode: 10204 ops/ms 0.19
Postcard: 7937 ops/ms 0.15
Protobuf: 1252 ops/ms 0.02
MessagePack: 879 ops/ms 0.02
JSON: 619 ops/ms 0.01
BSON: 124 ops/ms 0.00
Prost: 2151 ops/ms 0.04
Avro: 57 ops/ms 0.00
Flexbuffers: 24390 ops/ms 0.45
Abomonation: 500000 ops/ms 7.56
Rkyv: 200000 ops/ms 3.31
Raw BSON: 17857 ops/ms 0.33
MessagePack: 283 ops/ms 0.01
Serde JSON: 650 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 12821 ops/ms 1.00
Flatbuffers: 2551 ops/ms 0.20
Bincode: 4310 ops/ms 0.34
Postcard: 2273 ops/ms 0.18
Protobuf: 533 ops/ms 0.04
MessagePack: 213 ops/ms 0.02
JSON: 456 ops/ms 0.04
BSON: 90 ops/ms 0.01
Prost: 1079 ops/ms 0.08
Avro: 41 ops/ms 0.00
Flexbuffers: 297 ops/ms 0.02
Abomonation: 2041 ops/ms 0.16
Rkyv: 1560 ops/ms 0.12
Raw BSON: 90 ops/ms 0.01
MessagePack: 135 ops/ms 0.01
Serde JSON: 405 ops/ms 0.03
```
## Jan 13, 2021
### 0.9.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 311b, zlib: 193b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 336b
Flexbuffers: size: 490b, zlib: 309b
Abomonation: size: 261b, zlib: 159b
Rkyv: size: 180b, zlib: 151b
Raw BSON: size: 414b, zlib: 216b
MessagePack: size: 296b, zlib: 187b
Serde JSON: size: 446b, zlib: 198b
======== ENCODE BENCHMARK ========
NoProto: 998 ops/ms 1.00
Flatbuffers: 3205 ops/ms 3.21
Bincode: 6135 ops/ms 6.15
Protobuf: 1011 ops/ms 1.01
MessagePack: 681 ops/ms 0.68
JSON: 622 ops/ms 0.62
BSON: 130 ops/ms 0.13
Prost: 1548 ops/ms 1.55
Avro: 158 ops/ms 0.16
Flexbuffers: 447 ops/ms 0.45
Abomonation: 2710 ops/ms 2.71
Rkyv: 1658 ops/ms 1.66
Raw BSON: 128 ops/ms 0.13
MessagePack: 151 ops/ms 0.15
Serde JSON: 948 ops/ms 0.95
======== DECODE BENCHMARK ========
NoProto: 1645 ops/ms 1.00
Flatbuffers: 16393 ops/ms 9.95
Bincode: 9804 ops/ms 5.93
Protobuf: 1294 ops/ms 0.79
MessagePack: 627 ops/ms 0.38
JSON: 491 ops/ms 0.30
BSON: 115 ops/ms 0.07
Prost: 2075 ops/ms 1.26
Avro: 57 ops/ms 0.03
Flexbuffers: 950 ops/ms 0.58
Abomonation: 125000 ops/ms 71.37
Rkyv: 37037 ops/ms 22.23
Raw BSON: 1130 ops/ms 0.69
MessagePack: 246 ops/ms 0.15
Serde JSON: 650 ops/ms 0.39
====== DECODE ONE BENCHMARK ======
NoProto: 45455 ops/ms 1.00
Flatbuffers: 200000 ops/ms 3.97
Bincode: 10417 ops/ms 0.23
Protobuf: 1266 ops/ms 0.03
MessagePack: 833 ops/ms 0.02
JSON: 606 ops/ms 0.01
BSON: 122 ops/ms 0.00
Prost: 2151 ops/ms 0.05
Avro: 56 ops/ms 0.00
Flexbuffers: 25000 ops/ms 0.54
Abomonation: 500000 ops/ms 9.05
Rkyv: 200000 ops/ms 4.06
Raw BSON: 17544 ops/ms 0.39
MessagePack: 263 ops/ms 0.01
Serde JSON: 648 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 11905 ops/ms 1.00
Flatbuffers: 2500 ops/ms 0.21
Bincode: 4329 ops/ms 0.36
Protobuf: 539 ops/ms 0.05
MessagePack: 209 ops/ms 0.02
JSON: 441 ops/ms 0.04
BSON: 90 ops/ms 0.01
Prost: 1072 ops/ms 0.09
Avro: 41 ops/ms 0.00
Flexbuffers: 294 ops/ms 0.02
Abomonation: 2288 ops/ms 0.19
Rkyv: 1672 ops/ms 0.14
Raw BSON: 90 ops/ms 0.01
MessagePack: 130 ops/ms 0.01
Serde JSON: 407 ops/ms 0.03
```
## Jan 12, 2021
### 0.9.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 337b
Flexbuffers: size: 490b, zlib: 309b
Raw BSON: size: 414b, zlib: 216b
======== ENCODE BENCHMARK ========
NoProto: 1032 ops/ms 1.00
Flatbuffers: 3195 ops/ms 3.09
Bincode: 6135 ops/ms 5.94
Protobuf: 981 ops/ms 0.95
MessagePack: 156 ops/ms 0.15
JSON: 618 ops/ms 0.60
BSON: 131 ops/ms 0.13
Prost: 1567 ops/ms 1.52
Avro: 158 ops/ms 0.15
Flexbuffers: 447 ops/ms 0.43
Raw BSON: 130 ops/ms 0.13
======== DECODE BENCHMARK ========
NoProto: 1608 ops/ms 1.00
Flatbuffers: 16393 ops/ms 10.15
Bincode: 9804 ops/ms 6.07
Protobuf: 1245 ops/ms 0.77
MessagePack: 253 ops/ms 0.16
JSON: 489 ops/ms 0.30
BSON: 117 ops/ms 0.07
Prost: 2105 ops/ms 1.31
Avro: 58 ops/ms 0.04
Flexbuffers: 943 ops/ms 0.59
Raw BSON: 441 ops/ms 0.27
====== DECODE ONE BENCHMARK ======
NoProto: 47619 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.58
Bincode: 10204 ops/ms 0.22
Protobuf: 1264 ops/ms 0.03
MessagePack: 264 ops/ms 0.01
JSON: 587 ops/ms 0.01
BSON: 125 ops/ms 0.00
Prost: 2304 ops/ms 0.05
Avro: 57 ops/ms 0.00
Flexbuffers: 25000 ops/ms 0.54
Raw BSON: 18519 ops/ms 0.41
====== UPDATE ONE BENCHMARK ======
NoProto: 11628 ops/ms 1.00
Flatbuffers: 2506 ops/ms 0.22
Bincode: 4525 ops/ms 0.39
Protobuf: 546 ops/ms 0.05
MessagePack: 134 ops/ms 0.01
JSON: 433 ops/ms 0.04
BSON: 91 ops/ms 0.01
Prost: 1064 ops/ms 0.09
Avro: 40 ops/ms 0.00
Flexbuffers: 294 ops/ms 0.03
Raw BSON: 90 ops/ms 0.01
```
## Jan 10, 2021
### v0.9.0
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 337b
Flexbuffers: size: 490b, zlib: 309b
======== ENCODE BENCHMARK ========
NoProto: 920 ops/ms 1.00
Flatbuffers: 1062 ops/ms 1.15
Bincode: 5882 ops/ms 6.37
Protobuf: 876 ops/ms 0.95
MessagePack: 136 ops/ms 0.15
JSON: 546 ops/ms 0.59
BSON: 115 ops/ms 0.13
Prost: 1361 ops/ms 1.48
Avro: 140 ops/ms 0.15
Flexbuffers: 399 ops/ms 0.43
======== DECODE BENCHMARK ========
NoProto: 1397 ops/ms 1.00
Flatbuffers: 14925 ops/ms 10.68
Bincode: 8621 ops/ms 6.17
Protobuf: 1140 ops/ms 0.82
MessagePack: 223 ops/ms 0.16
JSON: 436 ops/ms 0.31
BSON: 103 ops/ms 0.07
Prost: 1855 ops/ms 1.33
Avro: 51 ops/ms 0.04
Flexbuffers: 843 ops/ms 0.60
====== DECODE ONE BENCHMARK ======
NoProto: 41667 ops/ms 1.00
Flatbuffers: 250000 ops/ms 5.01
Bincode: 9174 ops/ms 0.23
Protobuf: 1155 ops/ms 0.03
MessagePack: 236 ops/ms 0.01
JSON: 533 ops/ms 0.01
BSON: 109 ops/ms 0.00
Prost: 1942 ops/ms 0.05
Avro: 51 ops/ms 0.00
Flexbuffers: 22727 ops/ms 0.56
====== UPDATE ONE BENCHMARK ======
NoProto: 10526 ops/ms 1.00
Flatbuffers: 1057 ops/ms 0.10
Bincode: 4000 ops/ms 0.38
Protobuf: 474 ops/ms 0.05
MessagePack: 121 ops/ms 0.01
JSON: 400 ops/ms 0.04
BSON: 80 ops/ms 0.01
Prost: 966 ops/ms 0.09
Avro: 37 ops/ms 0.00
Flexbuffers: 265 ops/ms 0.03
```
## Jan 4, 2021
### v0.7.4
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 208b, zlib: 166b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
Avro: size: 702b, zlib: 336b
Flexbuffers: size: 490b, zlib: 309b
======== ENCODE BENCHMARK ========
NoProto: 1057 ops/ms 1.00
Flatbuffers: 1046 ops/ms 0.99
Bincode: 5882 ops/ms 5.55
Protobuf: 859 ops/ms 0.81
MessagePack: 135 ops/ms 0.13
JSON: 550 ops/ms 0.52
BSON: 115 ops/ms 0.11
Prost: 1225 ops/ms 1.16
Avro: 138 ops/ms 0.13
Flexbuffers: 401 ops/ms 0.38
======== DECODE BENCHMARK ========
NoProto: 1437 ops/ms 1.00
Flatbuffers: 14706 ops/ms 10.21
Bincode: 8772 ops/ms 6.08
Protobuf: 1140 ops/ms 0.79
MessagePack: 222 ops/ms 0.15
JSON: 438 ops/ms 0.31
BSON: 103 ops/ms 0.07
Prost: 1866 ops/ms 1.30
Avro: 51 ops/ms 0.04
Flexbuffers: 855 ops/ms 0.60
====== DECODE ONE BENCHMARK ======
NoProto: 47619 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.55
Bincode: 9524 ops/ms 0.21
Protobuf: 1163 ops/ms 0.03
MessagePack: 237 ops/ms 0.01
JSON: 544 ops/ms 0.01
BSON: 109 ops/ms 0.00
Prost: 1984 ops/ms 0.04
Avro: 52 ops/ms 0.00
Flexbuffers: 23256 ops/ms 0.50
====== UPDATE ONE BENCHMARK ======
NoProto: 12195 ops/ms 1.00
Flatbuffers: 1065 ops/ms 0.09
Bincode: 4016 ops/ms 0.33
Protobuf: 480 ops/ms 0.04
MessagePack: 119 ops/ms 0.01
JSON: 396 ops/ms 0.03
BSON: 80 ops/ms 0.01
Prost: 962 ops/ms 0.08
Avro: 37 ops/ms 0.00
Flexbuffers: 264 ops/ms 0.02
```
## Dec 27, 2020
### v0.7.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 208b, zlib: 166b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
Protobuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
Prost: size: 154b, zlib: 142b
======== ENCODE BENCHMARK ========
NoProto: 1170 ops/ms 1.00
Flatbuffers: 1188 ops/ms 1.02
Bincode: 6250 ops/ms 5.33
Protobuf: 986 ops/ms 0.84
MessagePack: 155 ops/ms 0.13
JSON: 607 ops/ms 0.52
BSON: 129 ops/ms 0.11
Prost: 1558 ops/ms 1.33
======== DECODE BENCHMARK ========
NoProto: 1634 ops/ms 1.00
Flatbuffers: 15873 ops/ms 9.59
Bincode: 9804 ops/ms 5.98
Protobuf: 1274 ops/ms 0.78
MessagePack: 262 ops/ms 0.16
JSON: 476 ops/ms 0.29
BSON: 120 ops/ms 0.07
Prost: 2049 ops/ms 1.25
====== DECODE ONE BENCHMARK ======
NoProto: 50000 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.27
Bincode: 10526 ops/ms 0.21
Protobuf: 1245 ops/ms 0.03
MessagePack: 281 ops/ms 0.01
JSON: 599 ops/ms 0.01
BSON: 130 ops/ms 0.00
Prost: 2193 ops/ms 0.05
====== UPDATE ONE BENCHMARK ======
NoProto: 13333 ops/ms 1.00
Flatbuffers: 1208 ops/ms 0.09
Bincode: 4484 ops/ms 0.34
Protobuf: 531 ops/ms 0.04
MessagePack: 138 ops/ms 0.01
JSON: 444 ops/ms 0.03
BSON: 95 ops/ms 0.01
Prost: 1089 ops/ms 0.08
```
## Dec 25, 2020
### v0.7.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 209b, zlib: 167b
Flatbuffers: size: 264b, zlib: 181b
Bincode: size: 163b, zlib: 129b
ProtoBuf: size: 154b, zlib: 141b
MessagePack: size: 296b, zlib: 187b
JSON: size: 439b, zlib: 184b
BSON: size: 414b, zlib: 216b
======== ENCODE BENCHMARK ========
NoProto: 1209 ops/ms 1.00
Flatbuffers: 1189 ops/ms 0.98
Bincode: 6250 ops/ms 5.15
ProtoBuf: 958 ops/ms 0.79
MessagePack: 154 ops/ms 0.13
JSON: 606 ops/ms 0.50
BSON: 127 ops/ms 0.10
======== DECODE BENCHMARK ========
NoProto: 1653 ops/ms 1.00
Flatbuffers: 15625 ops/ms 9.38
Bincode: 9434 ops/ms 5.68
ProtoBuf: 1263 ops/ms 0.76
MessagePack: 242 ops/ms 0.15
JSON: 471 ops/ms 0.29
BSON: 122 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 50000 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.15
Bincode: 10309 ops/ms 0.21
ProtoBuf: 1285 ops/ms 0.03
MessagePack: 271 ops/ms 0.01
JSON: 605 ops/ms 0.01
BSON: 132 ops/ms 0.00
====== UPDATE ONE BENCHMARK ======
NoProto: 14085 ops/ms 1.00
Flatbuffers: 1200 ops/ms 0.09
Bincode: 4367 ops/ms 0.31
ProtoBuf: 556 ops/ms 0.04
MessagePack: 136 ops/ms 0.01
JSON: 445 ops/ms 0.03
BSON: 96 ops/ms 0.01
```
## Dec 21, 2020
### v0.7.1
M1 Macbook Air with 8GB RAM (Native)
```
========= SIZE BENCHMARK =========
NoProto: size: 284b, zlib: 229b
Flatbuffers: size: 336b, zlib: 214b
ProtoBuf: size: 220b, zlib: 163b
MessagePack: size: 431b, zlib: 245b
JSON: size: 673b, zlib: 246b
BSON: size: 600b, zlib: 279b
======== ENCODE BENCHMARK ========
NoProto: 822 ops/ms 1.00
Flatbuffers: 1209 ops/ms 1.47
ProtoBuf: 723 ops/ms 0.88
MessagePack: 99 ops/ms 0.12
JSON: 436 ops/ms 0.53
BSON: 82 ops/ms 0.10
======== DECODE BENCHMARK ========
NoProto: 1105 ops/ms 1.00
Flatbuffers: 14925 ops/ms 13.45
ProtoBuf: 881 ops/ms 0.80
MessagePack: 163 ops/ms 0.15
JSON: 299 ops/ms 0.27
BSON: 78 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 52632 ops/ms 1.00
Flatbuffers: 250000 ops/ms 4.17
ProtoBuf: 902 ops/ms 0.02
MessagePack: 171 ops/ms 0.00
JSON: 374 ops/ms 0.01
BSON: 83 ops/ms 0.00
====== UPDATE ONE BENCHMARK ======
NoProto: 10638 ops/ms 1.00
Flatbuffers: 1176 ops/ms 0.11
ProtoBuf: 384 ops/ms 0.04
MessagePack: 91 ops/ms 0.01
JSON: 287 ops/ms 0.03
BSON: 62 ops/ms 0.01
```
## Dec 20, 2020
### v0.7.0
3.4Ghz i5 2017 21.5" iMac with 32 GB RAM
```
========= SIZE BENCHMARK =========
NoProto: size: 284b, zlib: 229b
ProtoBuf: size: 220b, zlib: 163b
MessagePack: size: 431b, zlib: 245b
JSON: size: 673b, zlib: 246b
BSON: size: 600b, zlib: 279b
======== ENCODE BENCHMARK ========
NoProto: 312 ops/ms 1.00
ProtoBuf: 270 ops/ms 0.87
MessagePack: 38 ops/ms 0.12
JSON: 167 ops/ms 0.54
BSON: 28 ops/ms 0.09
======== DECODE BENCHMARK ========
NoProto: 469 ops/ms 1.00
ProtoBuf: 390 ops/ms 0.83
MessagePack: 70 ops/ms 0.15
JSON: 134 ops/ms 0.28
BSON: 34 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 27027 ops/ms 1.00
ProtoBuf: 400 ops/ms 0.02
MessagePack: 80 ops/ms 0.00
JSON: 167 ops/ms 0.01
BSON: 35 ops/ms 0.00
====== UPDATE ONE BENCHMARK ======
NoProto: 3953 ops/ms 1.00
ProtoBuf: 167 ops/ms 0.04
MessagePack: 35 ops/ms 0.01
JSON: 127 ops/ms 0.03
BSON: 26 ops/ms 0.01
```
## Dec 15, 2020
### v0.6.1
3.4Ghz i5 2017 21.5" iMac with 32 GB RAM
```
========= SIZE BENCHMARK =========
NoProto: size: 284b, zlib: 229b
ProtoBuf: size: 220b, zlib: 163b
MessagePack: size: 431b, zlib: 245b
JSON: size: 673b, zlib: 246b
BSON: size: 600b, zlib: 279b
======== ENCODE BENCHMARK ========
NoProto: 272 ops/ms 1.00
ProtoBuf: 266 ops/ms 0.98
MessagePack: 33 ops/ms 0.12
JSON: 186 ops/ms 0.68
BSON: 28 ops/ms 0.10
======== DECODE BENCHMARK ========
NoProto: 375 ops/ms 1.00
ProtoBuf: 365 ops/ms 0.97
MessagePack: 63 ops/ms 0.17
JSON: 127 ops/ms 0.29
BSON: 28 ops/ms 0.07
====== DECODE ONE BENCHMARK ======
NoProto: 5051 ops/ms 1.00
ProtoBuf: 366 ops/ms 0.07
MessagePack: 68 ops/ms 0.01
JSON: 153 ops/ms 0.03
BSON: 30 ops/ms 0.01
====== UPDATE ONE BENCHMARK ======
NoProto: 4098 ops/ms 1.00
ProtoBuf: 160 ops/ms 0.04
MessagePack: 31 ops/ms 0.01
JSON: 115 ops/ms 0.03
BSON: 22 ops/ms 0.01
```
## Dec 13, 2020
### v0.6.0
3.4Ghz i5 2017 21.5" iMac with 32 GB RAM
```
====== SIZE BENCHMARK ======
NoProto: size: 283b, zlib: 226b 1x
Flatbuffers: size: 336b, zlib: 214b 1.2x
ProtoBuf: size: 220b, zlib: 163b 0.8x
MessagePack: size: 431b, zlib: 245b 1.5x
JSON: size: 673b, zlib: 246b 2.4x
BSON: size: 600b, zlib: 279b 2.1x
====== ENCODE BENCHMARK ======
NoProto: 3.536623s (283 ops/ms)
Flatbuffers: 1.942583s (514 ops/ms)
ProtoBuf: 3.551301s (281 ops/ms)
MessagePack: 28.050727s (35 ops/ms)
JSON: 5.436352s (184 ops/ms)
BSON: 36.564978s (27 ops/ms)
====== DECODE BENCHMARK ======
NoProto: 2.496591s (400 ops/ms)
Flatbuffers: 320.065ms (3,124 ops/ms)
ProtoBuf: 2.888706s (346 ops/ms)
MessagePack: 16.576576s (60.3 ops/ms)
JSON: 8.957872s (111 ops/ms)
BSON: 32.770133s (30.5 ops/ms)
====== DECODE ONE BENCHMARK ======
NoProto: 206.966ms (4,831 ops/ms)
Flatbuffers: 13.127ms (76,178 ops/ms)
ProtoBuf: 2.715129s (368 ops/ms)
MessagePack: 14.300117s (69 ops/ms)
JSON: 7.836841s (127 ops/ms)
BSON: 37.513607s (26 ops/ms)
====== UPDATE ONE BENCHMARK ======
NoProto: 264.399ms (3,782 ops/ms)
Flatbuffers: 3.086538s (324 ops/ms)
ProtoBuf: 10.119442s (99 ops/ms)
MessagePack: 35.322739s (28 ops/ms)
JSON: 9.749246s (102 ops/ms)
BSON: 48.0097s (21 ops/ms)
```
## Dec 1, 2020
### v0.5.1
Macbook Air M1 with 8GB (Rosetta)
```
====== SIZE BENCHMARK ======
NoProto: size: 408b, zlib: 321b
Flatbuffers: size: 336b, zlib: 214b
ProtoBuf: size: 220b, zlib: 163b
====== ENCODE BENCHMARK ======
NoProto: 5.707984s (175 ops/ms)
Flatbuffers: 1.556862s (642 ops/ms)
ProtoBuf: 2.209196s (452 ops/ms)
====== DECODE BENCHMARK ======
NoProto: 9.161315s (109 ops/ms)
Flatbuffers: 105.914ms (9,441 ops/ms)
ProtoBuf: 1.691681s (591 ops/ms)
====== UPDATE BENCHMARK ======
NoProto: 602.446ms (1,659 ops/ms)
Flatbuffers: 1.512228s (661 ops/ms)
ProtoBuf: 3.791677s (263 ops/ms)
```
================================================
FILE: bench/src/bench.fbs
================================================
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// trying to represent a typical mix of datatypes:
// 1 array of 3 elements, each element: 1 string, 3 nested objects, 9 scalars
// root element has the array, additional string and an enum
namespace benchfb;
enum Enum : short { Apples, Pears, Bananas }
struct Bar {
time:int;
ratio:float;
size:ushort;
}
table FooBar {
sibling:Bar;
name:string;
rating:double;
postfix:ubyte;
}
table FooBarContainer {
list:[FooBar]; // 3 copies of the above
initialized:bool;
fruit:Enum;
location:string;
}
root_type FooBarContainer;
================================================
FILE: bench/src/bench_fb.rs
================================================
// automatically generated by the FlatBuffers compiler, do not modify
extern crate flatbuffers;
#[allow(unused_imports, dead_code)]
pub mod benchfb {
use std::mem;
use std::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::EndianScalar;
#[allow(non_camel_case_types)]
#[repr(i16)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum Enum {
Apples = 0,
Pears = 1,
Bananas = 2,
}
pub const ENUM_MIN_ENUM: i16 = 0;
pub const ENUM_MAX_ENUM: i16 = 2;
impl<'a> flatbuffers::Follow<'a> for Enum {
type Inner = Self;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::read_scalar_at::<Self>(buf, loc)
}
}
impl flatbuffers::EndianScalar for Enum {
#[inline]
fn to_little_endian(self) -> Self {
let n = i16::to_le(self as i16);
let p = &n as *const i16 as *const Enum;
unsafe { *p }
}
#[inline]
fn from_little_endian(self) -> Self {
let n = i16::from_le(self as i16);
let p = &n as *const i16 as *const Enum;
unsafe { *p }
}
}
impl flatbuffers::Push for Enum {
type Output = Enum;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
flatbuffers::emplace_scalar::<Enum>(dst, *self);
}
}
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_ENUM:[Enum; 3] = [
Enum::Apples,
Enum::Pears,
Enum::Bananas
];
#[allow(non_camel_case_types)]
pub const ENUM_NAMES_ENUM:[&'static str; 3] = [
"Apples",
"Pears",
"Bananas"
];
pub fn enum_name_enum(e: Enum) -> &'static str {
let index = e as i16;
ENUM_NAMES_ENUM[index as usize]
}
// struct Bar, aligned to 4
#[repr(C, align(4))]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Bar {
time_: i32,
ratio_: f32,
size__: u16,
padding0__: u16,
} // pub struct Bar
impl flatbuffers::SafeSliceAccess for Bar {}
impl<'a> flatbuffers::Follow<'a> for Bar {
type Inner = &'a Bar;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a Bar>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a Bar {
type Inner = &'a Bar;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<Bar>(buf, loc)
}
}
impl<'b> flatbuffers::Push for Bar {
type Output = Bar;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
let src = unsafe {
::std::slice::from_raw_parts(self as *const Bar as *const u8, Self::size())
};
dst.copy_from_slice(src);
}
}
impl<'b> flatbuffers::Push for &'b Bar {
type Output = Bar;
#[inline]
fn push(&self, dst: &mut [u8], _rest: &[u8]) {
let src = unsafe {
::std::slice::from_raw_parts(*self as *const Bar as *const u8, Self::size())
};
dst.copy_from_slice(src);
}
}
impl Bar {
pub fn new<'a>(_time: i32, _ratio: f32, _size_: u16) -> Self {
Bar {
time_: _time.to_little_endian(),
ratio_: _ratio.to_little_endian(),
size__: _size_.to_little_endian(),
padding0__: 0,
}
}
pub fn time<'a>(&'a self) -> i32 {
self.time_.from_little_endian()
}
pub fn ratio<'a>(&'a self) -> f32 {
self.ratio_.from_little_endian()
}
pub fn size_<'a>(&'a self) -> u16 {
self.size__.from_little_endian()
}
}
pub enum FooBarOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct FooBar<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FooBar<'a> {
type Inner = FooBar<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf: buf, loc: loc },
}
}
}
impl<'a> FooBar<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FooBar {
_tab: table,
}
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FooBarArgs<'args>) -> flatbuffers::WIPOffset<FooBar<'bldr>> {
let mut builder = FooBarBuilder::new(_fbb);
builder.add_rating(args.rating);
if let Some(x) = args.name { builder.add_name(x); }
if let Some(x) = args.sibling { builder.add_sibling(x); }
builder.add_postfix(args.postfix);
builder.finish()
}
pub const VT_SIBLING: flatbuffers::VOffsetT = 4;
pub const VT_NAME: flatbuffers::VOffsetT = 6;
pub const VT_RATING: flatbuffers::VOffsetT = 8;
pub const VT_POSTFIX: flatbuffers::VOffsetT = 10;
#[inline]
pub fn sibling(&self) -> Option<&'a Bar> {
self._tab.get::<Bar>(FooBar::VT_SIBLING, None)
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FooBar::VT_NAME, None)
}
#[inline]
pub fn rating(&self) -> f64 {
self._tab.get::<f64>(FooBar::VT_RATING, Some(0.0)).unwrap()
}
#[inline]
pub fn postfix(&self) -> u8 {
self._tab.get::<u8>(FooBar::VT_POSTFIX, Some(0)).unwrap()
}
}
pub struct FooBarArgs<'a> {
pub sibling: Option<&'a Bar>,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub rating: f64,
pub postfix: u8,
}
impl<'a> Default for FooBarArgs<'a> {
#[inline]
fn default() -> Self {
FooBarArgs {
sibling: None,
name: None,
rating: 0.0,
postfix: 0,
}
}
}
pub struct FooBarBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> FooBarBuilder<'a, 'b> {
#[inline]
pub fn add_sibling(&mut self, sibling: &'b Bar) {
self.fbb_.push_slot_always::<&Bar>(FooBar::VT_SIBLING, sibling);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FooBar::VT_NAME, name);
}
#[inline]
pub fn add_rating(&mut self, rating: f64) {
self.fbb_.push_slot::<f64>(FooBar::VT_RATING, rating, 0.0);
}
#[inline]
pub fn add_postfix(&mut self, postfix: u8) {
self.fbb_.push_slot::<u8>(FooBar::VT_POSTFIX, postfix, 0);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FooBarBuilder<'a, 'b> {
let start = _fbb.start_table();
FooBarBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<FooBar<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
pub enum FooBarContainerOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct FooBarContainer<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FooBarContainer<'a> {
type Inner = FooBarContainer<'a>;
#[inline]
fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self {
_tab: flatbuffers::Table { buf: buf, loc: loc },
}
}
}
impl<'a> FooBarContainer<'a> {
#[inline]
pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FooBarContainer {
_tab: table,
}
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
args: &'args FooBarContainerArgs<'args>) -> flatbuffers::WIPOffset<FooBarContainer<'bldr>> {
let mut builder = FooBarContainerBuilder::new(_fbb);
if let Some(x) = args.location { builder.add_location(x); }
if let Some(x) = args.list { builder.add_list(x); }
builder.add_fruit(args.fruit);
builder.add_initialized(args.initialized);
builder.finish()
}
pub const VT_LIST: flatbuffers::VOffsetT = 4;
pub const VT_INITIALIZED: flatbuffers::VOffsetT = 6;
pub const VT_FRUIT: flatbuffers::VOffsetT = 8;
pub const VT_LOCATION: flatbuffers::VOffsetT = 10;
#[inline]
pub fn list(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FooBar<'a>>>> {
self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<FooBar<'a>>>>>(FooBarContainer::VT_LIST, None)
}
#[inline]
pub fn initialized(&self) -> bool {
self._tab.get::<bool>(FooBarContainer::VT_INITIALIZED, Some(false)).unwrap()
}
#[inline]
pub fn fruit(&self) -> Enum {
self._tab.get::<Enum>(FooBarContainer::VT_FRUIT, Some(Enum::Apples)).unwrap()
}
#[inline]
pub fn location(&self) -> Option<&'a str> {
self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FooBarContainer::VT_LOCATION, None)
}
}
pub struct FooBarContainerArgs<'a> {
pub list: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<FooBar<'a >>>>>,
pub initialized: bool,
pub fruit: Enum,
pub location: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for FooBarContainerArgs<'a> {
#[inline]
fn default() -> Self {
FooBarContainerArgs {
list: None,
initialized: false,
fruit: Enum::Apples,
location: None,
}
}
}
pub struct FooBarContainerBuilder<'a: 'b, 'b> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> FooBarContainerBuilder<'a, 'b> {
#[inline]
pub fn add_list(&mut self, list: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<FooBar<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FooBarContainer::VT_LIST, list);
}
#[inline]
pub fn add_initialized(&mut self, initialized: bool) {
self.fbb_.push_slot::<bool>(FooBarContainer::VT_INITIALIZED, initialized, false);
}
#[inline]
pub fn add_fruit(&mut self, fruit: Enum) {
self.fbb_.push_slot::<Enum>(FooBarContainer::VT_FRUIT, fruit, Enum::Apples);
}
#[inline]
pub fn add_location(&mut self, location: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FooBarContainer::VT_LOCATION, location);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FooBarContainerBuilder<'a, 'b> {
let start = _fbb.start_table();
FooBarContainerBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<FooBarContainer<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
#[inline]
pub fn get_root_as_foo_bar_container<'a>(buf: &'a [u8]) -> FooBarContainer<'a> {
flatbuffers::get_root::<FooBarContainer<'a>>(buf)
}
#[inline]
pub fn get_size_prefixed_root_as_foo_bar_container<'a>(buf: &'a [u8]) -> FooBarContainer<'a> {
flatbuffers::get_size_prefixed_root::<FooBarContainer<'a>>(buf)
}
#[inline]
pub fn finish_foo_bar_container_buffer<'a, 'b>(
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
root: flatbuffers::WIPOffset<FooBarContainer<'a>>) {
fbb.finish(root, None);
}
#[inline]
pub fn finish_size_prefixed_foo_bar_container_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<FooBarContainer<'a>>) {
fbb.finish_size_prefixed(root, None);
}
} // pub mod benchfb
================================================
FILE: bench/src/bench_pb.proto
================================================
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// trying to represent a typical mix of datatypes:
// 1 array of 3 elements, each element: 1 string, 3 nested objects, 9 scalars
// root element has the array, additional string and an enum
syntax = "proto2";
package benchpb;
enum Enum { Apples = 0; Pears = 1; Bananas = 2; }
message Bar {
required int32 time = 2;
required float ratio = 3;
required uint32 size = 4;
}
message FooBar {
optional Bar sibling = 1;
optional string name = 2;
optional double rating = 3;
optional uint32 postfix = 4;
}
message FooBarContainer {
repeated FooBar list = 1; // 3 copies of the above
optional bool initialized = 2;
optional Enum fruit = 3;
optional string location = 4;
}
================================================
FILE: bench/src/bench_pb.rs
================================================
// This file is generated by rust-protobuf 2.18.1. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![rustfmt::skip]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `bench_pb.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_18_1;
#[derive(PartialEq,Clone,Default)]
pub struct Bar {
// message fields
time: ::std::option::Option<i32>,
ratio: ::std::option::Option<f32>,
size: ::std::option::Option<u32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Bar {
fn default() -> &'a Bar {
<Bar as ::protobuf::Message>::default_instance()
}
}
impl Bar {
pub fn new() -> Bar {
::std::default::Default::default()
}
// required int32 time = 2;
pub fn get_time(&self) -> i32 {
self.time.unwrap_or(0)
}
pub fn clear_time(&mut self) {
self.time = ::std::option::Option::None;
}
pub fn has_time(&self) -> bool {
self.time.is_some()
}
// Param is passed by value, moved
pub fn set_time(&mut self, v: i32) {
self.time = ::std::option::Option::Some(v);
}
// required float ratio = 3;
pub fn get_ratio(&self) -> f32 {
self.ratio.unwrap_or(0.)
}
pub fn clear_ratio(&mut self) {
self.ratio = ::std::option::Option::None;
}
pub fn has_ratio(&self) -> bool {
self.ratio.is_some()
}
// Param is passed by value, moved
pub fn set_ratio(&mut self, v: f32) {
self.ratio = ::std::option::Option::Some(v);
}
// required uint32 size = 4;
pub fn get_size(&self) -> u32 {
self.size.unwrap_or(0)
}
pub fn clear_size(&mut self) {
self.size = ::std::option::Option::None;
}
pub fn has_size(&self) -> bool {
self.size.is_some()
}
// Param is passed by value, moved
pub fn set_size(&mut self, v: u32) {
self.size = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for Bar {
fn is_initialized(&self) -> bool {
if self.time.is_none() {
return false;
}
if self.ratio.is_none() {
return false;
}
if self.size.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.time = ::std::option::Option::Some(tmp);
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_float()?;
self.ratio = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint32()?;
self.size = ::std::option::Option::Some(tmp);
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(v) = self.time {
my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(v) = self.ratio {
my_size += 5;
}
if let Some(v) = self.size {
my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.time {
os.write_int32(2, v)?;
}
if let Some(v) = self.ratio {
os.write_float(3, v)?;
}
if let Some(v) = self.size {
os.write_uint32(4, v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Bar {
Bar::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"time",
|m: &Bar| { &m.time },
|m: &mut Bar| { &mut m.time },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
"ratio",
|m: &Bar| { &m.ratio },
|m: &mut Bar| { &mut m.ratio },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"size",
|m: &Bar| { &m.size },
|m: &mut Bar| { &mut m.size },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Bar>(
"Bar",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Bar {
static instance: ::protobuf::rt::LazyV2<Bar> = ::protobuf::rt::LazyV2::INIT;
instance.get(Bar::new)
}
}
impl ::protobuf::Clear for Bar {
fn clear(&mut self) {
self.time = ::std::option::Option::None;
self.ratio = ::std::option::Option::None;
self.size = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Bar {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Bar {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct FooBar {
// message fields
pub sibling: ::protobuf::SingularPtrField<Bar>,
name: ::protobuf::SingularField<::std::string::String>,
rating: ::std::option::Option<f64>,
postfix: ::std::option::Option<u32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FooBar {
fn default() -> &'a FooBar {
<FooBar as ::protobuf::Message>::default_instance()
}
}
impl FooBar {
pub fn new() -> FooBar {
::std::default::Default::default()
}
// optional .benchpb.Bar sibling = 1;
pub fn get_sibling(&self) -> &Bar {
self.sibling.as_ref().unwrap_or_else(|| <Bar as ::protobuf::Message>::default_instance())
}
pub fn clear_sibling(&mut self) {
self.sibling.clear();
}
pub fn has_sibling(&self) -> bool {
self.sibling.is_some()
}
// Param is passed by value, moved
pub fn set_sibling(&mut self, v: Bar) {
self.sibling = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_sibling(&mut self) -> &mut Bar {
if self.sibling.is_none() {
self.sibling.set_default();
}
self.sibling.as_mut().unwrap()
}
// Take field
pub fn take_sibling(&mut self) -> Bar {
self.sibling.take().unwrap_or_else(|| Bar::new())
}
// optional string name = 2;
pub fn get_name(&self) -> &str {
match self.name.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_name(&mut self) {
self.name.clear();
}
pub fn has_name(&self) -> bool {
self.name.is_some()
}
// Param is passed by value, moved
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_name(&mut self) -> &mut ::std::string::String {
if self.name.is_none() {
self.name.set_default();
}
self.name.as_mut().unwrap()
}
// Take field
pub fn take_name(&mut self) -> ::std::string::String {
self.name.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional double rating = 3;
pub fn get_rating(&self) -> f64 {
self.rating.unwrap_or(0.)
}
pub fn clear_rating(&mut self) {
self.rating = ::std::option::Option::None;
}
pub fn has_rating(&self) -> bool {
self.rating.is_some()
}
// Param is passed by value, moved
pub fn set_rating(&mut self, v: f64) {
self.rating = ::std::option::Option::Some(v);
}
// optional uint32 postfix = 4;
pub fn get_postfix(&self) -> u32 {
self.postfix.unwrap_or(0)
}
pub fn clear_postfix(&mut self) {
self.postfix = ::std::option::Option::None;
}
pub fn has_postfix(&self) -> bool {
self.postfix.is_some()
}
// Param is passed by value, moved
pub fn set_postfix(&mut self, v: u32) {
self.postfix = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for FooBar {
fn is_initialized(&self) -> bool {
for v in &self.sibling {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sibling)?;
},
2 => {
::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_double()?;
self.rating = ::std::option::Option::Some(tmp);
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint32()?;
self.postfix = ::std::option::Option::Some(tmp);
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.sibling.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.name.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.rating {
my_size += 9;
}
if let Some(v) = self.postfix {
my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.sibling.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.name.as_ref() {
os.write_string(2, &v)?;
}
if let Some(v) = self.rating {
os.write_double(3, v)?;
}
if let Some(v) = self.postfix {
os.write_uint32(4, v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FooBar {
FooBar::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Bar>>(
"sibling",
|m: &FooBar| { &m.sibling },
|m: &mut FooBar| { &mut m.sibling },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"name",
|m: &FooBar| { &m.name },
|m: &mut FooBar| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
"rating",
|m: &FooBar| { &m.rating },
|m: &mut FooBar| { &mut m.rating },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"postfix",
|m: &FooBar| { &m.postfix },
|m: &mut FooBar| { &mut m.postfix },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FooBar>(
"FooBar",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FooBar {
static instance: ::protobuf::rt::LazyV2<FooBar> = ::protobuf::rt::LazyV2::INIT;
instance.get(FooBar::new)
}
}
impl ::protobuf::Clear for FooBar {
fn clear(&mut self) {
self.sibling.clear();
self.name.clear();
self.rating = ::std::option::Option::None;
self.postfix = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FooBar {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FooBar {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct FooBarContainer {
// message fields
pub list: ::protobuf::RepeatedField<FooBar>,
initialized: ::std::option::Option<bool>,
fruit: ::std::option::Option<Enum>,
location: ::protobuf::SingularField<::std::string::String>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FooBarContainer {
fn default() -> &'a FooBarContainer {
<FooBarContainer as ::protobuf::Message>::default_instance()
}
}
impl FooBarContainer {
pub fn new() -> FooBarContainer {
::std::default::Default::default()
}
// repeated .benchpb.FooBar list = 1;
pub fn get_list(&self) -> &[FooBar] {
&self.list
}
pub fn clear_list(&mut self) {
self.list.clear();
}
// Param is passed by value, moved
pub fn set_list(&mut self, v: ::protobuf::RepeatedField<FooBar>) {
self.list = v;
}
// Mutable pointer to the field.
pub fn mut_list(&mut self) -> &mut ::protobuf::RepeatedField<FooBar> {
&mut self.list
}
// Take field
pub fn take_list(&mut self) -> ::protobuf::RepeatedField<FooBar> {
::std::mem::replace(&mut self.list, ::protobuf::RepeatedField::new())
}
// optional bool initialized = 2;
pub fn get_initialized(&self) -> bool {
self.initialized.unwrap_or(false)
}
pub fn clear_initialized(&mut self) {
self.initialized = ::std::option::Option::None;
}
pub fn has_initialized(&self) -> bool {
self.initialized.is_some()
}
// Param is passed by value, moved
pub fn set_initialized(&mut self, v: bool) {
self.initialized = ::std::option::Option::Some(v);
}
// optional .benchpb.Enum fruit = 3;
pub fn get_fruit(&self) -> Enum {
self.fruit.unwrap_or(Enum::Apples)
}
pub fn clear_fruit(&mut self) {
self.fruit = ::std::option::Option::None;
}
pub fn has_fruit(&self) -> bool {
self.fruit.is_some()
}
// Param is passed by value, moved
pub fn set_fruit(&mut self, v: Enum) {
self.fruit = ::std::option::Option::Some(v);
}
// optional string location = 4;
pub fn get_location(&self) -> &str {
match self.location.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_location(&mut self) {
self.location.clear();
}
pub fn has_location(&self) -> bool {
self.location.is_some()
}
// Param is passed by value, moved
pub fn set_location(&mut self, v: ::std::string::String) {
self.location = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_location(&mut self) -> &mut ::std::string::String {
if self.location.is_none() {
self.location.set_default();
}
self.location.as_mut().unwrap()
}
// Take field
pub fn take_location(&mut self) -> ::std::string::String {
self.location.take().unwrap_or_else(|| ::std::string::String::new())
}
}
impl ::protobuf::Message for FooBarContainer {
fn is_initialized(&self) -> bool {
for v in &self.list {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.list)?;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_bool()?;
self.initialized = ::std::option::Option::Some(tmp);
},
3 => {
::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.fruit, 3, &mut self.unknown_fields)?
},
4 => {
::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.location)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.list {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if let Some(v) = self.initialized {
my_size += 2;
}
if let Some(v) = self.fruit {
my_size += ::protobuf::rt::enum_size(3, v);
}
if let Some(ref v) = self.location.as_ref() {
my_size += ::protobuf::rt::string_size(4, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.list {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if let Some(v) = self.initialized {
os.write_bool(2, v)?;
}
if let Some(v) = self.fruit {
os.write_enum(3, ::protobuf::ProtobufEnum::value(&v))?;
}
if let Some(ref v) = self.location.as_ref() {
os.write_string(4, &v)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FooBarContainer {
FooBarContainer::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FooBar>>(
"list",
|m: &FooBarContainer| { &m.list },
|m: &mut FooBarContainer| { &mut m.list },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"initialized",
|m: &FooBarContainer| { &m.initialized },
|m: &mut FooBarContainer| { &mut m.initialized },
));
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Enum>>(
"fruit",
|m: &FooBarContainer| { &m.fruit },
|m: &mut FooBarContainer| { &mut m.fruit },
));
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"location",
|m: &FooBarContainer| { &m.location },
|m: &mut FooBarContainer| { &mut m.location },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FooBarContainer>(
"FooBarContainer",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static FooBarContainer {
static instance: ::protobuf::rt::LazyV2<FooBarContainer> = ::protobuf::rt::LazyV2::INIT;
instance.get(FooBarContainer::new)
}
}
impl ::protobuf::Clear for FooBarContainer {
fn clear(&mut self) {
self.list.clear();
self.initialized = ::std::option::Option::None;
self.fruit = ::std::option::Option::None;
self.location.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FooBarContainer {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for FooBarContainer {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Enum {
Apples = 0,
Pears = 1,
Bananas = 2,
}
impl ::protobuf::ProtobufEnum for Enum {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Enum> {
match value {
0 => ::std::option::Option::Some(Enum::Apples),
1 => ::std::option::Option::Some(Enum::Pears),
2 => ::std::option::Option::Some(Enum::Bananas),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [Enum] = &[
Enum::Apples,
Enum::Pears,
Enum::Bananas,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<Enum>("Enum", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for Enum {
}
impl ::std::default::Default for Enum {
fn default() -> Self {
Enum::Apples
}
}
impl ::protobuf::reflect::ProtobufValue for Enum {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0ebench_pb.proto\x12\x07benchpb\"C\n\x03Bar\x12\x12\n\x04time\x18\
\x02\x20\x02(\x05R\x04time\x12\x14\n\x05ratio\x18\x03\x20\x02(\x02R\x05r\
atio\x12\x12\n\x04size\x18\x04\x20\x02(\rR\x04size\"v\n\x06FooBar\x12&\n\
\x07sibling\x18\x01\x20\x01(\x0b2\x0c.benchpb.BarR\x07sibling\x12\x12\n\
\x04name\x18\x02\x20\x01(\tR\x04name\x12\x16\n\x06rating\x18\x03\x20\x01\
(\x01R\x06rating\x12\x18\n\x07postfix\x18\x04\x20\x01(\rR\x07postfix\"\
\x99\x01\n\x0fFooBarContainer\x12#\n\x04list\x18\x01\x20\x03(\x0b2\x0f.b\
enchpb.FooBarR\x04list\x12\x20\n\x0binitialized\x18\x02\x20\x01(\x08R\
\x0binitialized\x12#\n\x05fruit\x18\x03\x20\x01(\x0e2\r.benchpb.EnumR\
\x05fruit\x12\x1a\n\x08location\x18\x04\x20\x01(\tR\x08location**\n\x04E\
num\x12\n\n\x06Apples\x10\0\x12\t\n\x05Pears\x10\x01\x12\x0b\n\x07Banana\
s\x10\x02J\x8c\x0e\n\x06\x12\x04\x13\0+\x01\n\x8d\x06\n\x01\x0c\x12\x03\
\x13\0\x122\xc7\x04\x20Copyright\x202015\x20Google\x20Inc.\x20All\x20rig\
hts\x20reserved.\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\
\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20us\
e\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20Licens\
e.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\
\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\
\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\
\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\x20Licen\
se\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHO\
UT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20\
express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20sp\
ecific\x20language\x20governing\x20permissions\x20and\n\x20limitations\
\x20under\x20the\x20License.\n2\xb8\x01\x20trying\x20to\x20represent\x20\
a\x20typical\x20mix\x20of\x20datatypes:\n\x201\x20array\x20of\x203\x20el\
ements,\x20each\x20element:\x201\x20string,\x203\x20nested\x20objects,\
\x209\x20scalars\n\x20root\x20element\x20has\x20the\x20array,\x20additio\
nal\x20string\x20and\x20an\x20enum\n\n\x08\n\x01\x02\x12\x03\x15\0\x10\n\
\t\n\x02\x05\0\x12\x03\x17\01\n\n\n\x03\x05\0\x01\x12\x03\x17\x05\t\n\
\x0b\n\x04\x05\0\x02\0\x12\x03\x17\x0c\x17\n\x0c\n\x05\x05\0\x02\0\x01\
\x12\x03\x17\x0c\x12\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x17\x15\x16\n\
\x0b\n\x04\x05\0\x02\x01\x12\x03\x17\x18\"\n\x0c\n\x05\x05\0\x02\x01\x01\
\x12\x03\x17\x18\x1d\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x17\x20!\n\
\x0b\n\x04\x05\0\x02\x02\x12\x03\x17#/\n\x0c\n\x05\x05\0\x02\x02\x01\x12\
\x03\x17#*\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x17-.\n\n\n\x02\x04\0\
\x12\x04\x19\0\x1d\x01\n\n\n\x03\x04\0\x01\x12\x03\x19\x08\x0b\n\x0b\n\
\x04\x04\0\x02\0\x12\x03\x1a\x02\x1a\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\
\x1a\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x1a\x0b\x10\n\x0c\n\x05\
\x04\0\x02\0\x01\x12\x03\x1a\x11\x15\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\
\x1a\x18\x19\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x1b\x02\x1b\n\x0c\n\x05\
\x04\0\x02\x01\x04\x12\x03\x1b\x02\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\
\x03\x1b\x0b\x10\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x1b\x11\x16\n\x0c\
\n\x05\x04\0\x02\x01\x03\x12\x03\x1b\x19\x1a\n\x0b\n\x04\x04\0\x02\x02\
\x12\x03\x1c\x02\x1b\n\x0c\n\x05\x04\0\x02\x02\x04\x12\x03\x1c\x02\n\n\
\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x1c\x0b\x11\n\x0c\n\x05\x04\0\x02\
\x02\x01\x12\x03\x1c\x12\x16\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x1c\
\x19\x1a\n\n\n\x02\x04\x01\x12\x04\x1f\0$\x01\n\n\n\x03\x04\x01\x01\x12\
\x03\x1f\x08\x0e\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x20\x02\x1b\n\x0c\n\
\x05\x04\x01\x02\0\x04\x12\x03\x20\x02\n\n\x0c\n\x05\x04\x01\x02\0\x06\
\x12\x03\x20\x0b\x0e\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x20\x0f\x16\n\
\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x20\x19\x1a\n\x0b\n\x04\x04\x01\x02\
\x01\x12\x03!\x02\x1b\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03!\x02\n\n\
\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03!\x0b\x11\n\x0c\n\x05\x04\x01\x02\
\x01\x01\x12\x03!\x12\x16\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03!\x19\
\x1a\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\"\x02\x1d\n\x0c\n\x05\x04\x01\
\x02\x02\x04\x12\x03\"\x02\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\"\
\x0b\x11\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\"\x12\x18\n\x0c\n\x05\
\x04\x01\x02\x02\x03\x12\x03\"\x1b\x1c\n\x0b\n\x04\x04\x01\x02\x03\x12\
\x03#\x02\x1e\n\x0c\n\x05\x04\x01\x02\x03\x04\x12\x03#\x02\n\n\x0c\n\x05\
\x04\x01\x02\x03\x05\x12\x03#\x0b\x11\n\x0c\n\x05\x04\x01\x02\x03\x01\
\x12\x03#\x12\x19\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03#\x1c\x1d\n\n\n\
\x02\x04\x02\x12\x04&\0+\x01\n\n\n\x03\x04\x02\x01\x12\x03&\x08\x17\n$\n\
\x04\x04\x02\x02\0\x12\x03'\x02\x1b\"\x17\x203\x20copies\x20of\x20the\
\x20above\n\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03'\x02\n\n\x0c\n\x05\x04\
\x02\x02\0\x06\x12\x03'\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03'\
\x12\x16\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03'\x19\x1a\n\x0b\n\x04\x04\
\x02\x02\x01\x12\x03(\x02\x20\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03(\
\x02\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03(\x0b\x0f\n\x0c\n\x05\x04\
\x02\x02\x01\x01\x12\x03(\x10\x1b\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\
\x03(\x1e\x1f\n\x0b\n\x04\x04\x02\x02\x02\x12\x03)\x02\x1a\n\x0c\n\x05\
\x04\x02\x02\x02\x04\x12\x03)\x02\n\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\
\x03)\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03)\x10\x15\n\x0c\n\
\x05\x04\x02\x02\x02\x03\x12\x03)\x18\x19\n\x0b\n\x04\x04\x02\x02\x03\
\x12\x03*\x02\x1f\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\x03*\x02\n\n\x0c\n\
\x05\x04\x02\x02\x03\x05\x12\x03*\x0b\x11\n\x0c\n\x05\x04\x02\x02\x03\
\x01\x12\x03*\x12\x1a\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03*\x1d\x1e\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
================================================
FILE: bench/src/main.rs
================================================
use crate::run_bench_rawbson::RawBSONBench;
use crate::run_bench_rkyv::RkyvBench;
use run_bench_json::JSONBench;
use run_bench_messagepack::MessagePackBench;
use run_bench_messagepack_rs::MessagePackRSBench;
use run_bench_serde_json::SerdeJSONBench;
use crate::run_bench_protocol_buffers::ProtocolBufferBench;
use crate::run_bench_no_proto::NoProtoBench;
use crate::run_bench_flatbuffers::FlatBufferBench;
use crate::run_bench_bson::BSONBench;
use crate::run_bench_bincode::BincodeBench;
use crate::run_bench_postcard::PostcardBench;
use crate::run_bench_avro::AvroBench;
use crate::run_bench_prost::ProstBench;
use crate::run_bench_flexbuffers::FlexBench;
use crate::run_bench_abomonation::AbomBench;
pub const LOOPS: usize = 1_000_000;
mod bench_fb;
mod bench_pb;
extern crate protobuf;
extern crate flatbuffers;
#[macro_use]
extern crate json;
extern crate bson;
extern crate rmp;
extern crate serde;
extern crate bincode;
#[macro_use]
extern crate abomonation;
mod run_bench_no_proto;
mod run_bench_protocol_buffers;
mod run_bench_flatbuffers;
mod run_bench_messagepack;
mod run_bench_messagepack_rs;
mod run_bench_json;
mod run_bench_bson;
mod run_bench_bincode;
mod run_bench_postcard;
mod run_bench_prost;
mod run_bench_avro;
mod run_bench_flexbuffers;
mod run_bench_rawbson;
mod run_bench_rkyv;
mod run_bench_abomonation;
mod run_bench_serde_json;
/*
1,000,000 iterations
0.4.2 - 144s
0.5.0 - 6s
*/
fn main() {
NoProtoBench::setup_bench();
AvroBench::setup_bench();
FlatBufferBench::setup_bench();
let np_lib = " [no_proto](https://crates.io/crates/no_proto) ";
let fb_lib = " [flatbuffers](https://crates.io/crates/flatbuffers) ";
let bn_lib = " [bincode](https://crates.io/crates/bincode) ";
let pc_lib = " [postcard](https://crates.io/crates/postcard) ";
let pb_lib = " [protobuf](https://crates.io/crates/protobuf) ";
let msg_lib = " [rmp](https://crates.io/crates/rmp) ";
let json_lib = " [json](https://crates.io/crates/json) ";
let bson_lib = " [bson](https://crates.io/crates/bson) ";
let pro_lib = " [prost](https://crates.io/crates/prost) ";
let avro_lib = " [avro-rs](https://crates.io/crates/avro-rs) ";
let flx_lib = " [flexbuffers](https://crates.io/crates/flexbuffers) ";
let abo_lib = " [abomonation](https://crates.io/crates/abomonation) ";
let rkyv_lib = " [rkyv](https://crates.io/crates/rkyv) ";
let rbso_lib = " [rawbson](https://crates.io/crates/rawbson) ";
let msg2_lib = " [messagepack-rs](https://crates.io/crates/messagepack-rs)";
let json2_lib = " [serde_json](https://crates.io/crates/serde_json) ";
println!("\n========= SIZE BENCHMARK =========");
let np_size = NoProtoBench::size_bench();
let fb_size = FlatBufferBench::size_bench();
let bn_size = BincodeBench::size_bench();
let pc_size = PostcardBench::size_bench();
let pb_size = ProtocolBufferBench::size_bench();
let msg_size = MessagePackBench::size_bench();
let json_size = JSONBench::size_bench();
let bson_size = BSONBench::size_bench();
let pro_size = ProstBench::size_bench();
let avro_size = AvroBench::size_bench();
let flx_size = FlexBench::size_bench();
let abo_size = AbomBench::size_bench();
let rkyv_size = RkyvBench::size_bench();
let rbso_size = RawBSONBench::size_bench();
let msg2_size = MessagePackRSBench::size_bench();
let json2_size = SerdeJSONBench::size_bench();
println!("\n======== ENCODE BENCHMARK ========");
let (base, np_enc) = NoProtoBench::encode_bench().unwrap();
let fb_enc = FlatBufferBench::encode_bench(base);
let bn_enc = BincodeBench::encode_bench(base);
let pc_enc = PostcardBench::encode_bench(base);
let pb_enc = ProtocolBufferBench::encode_bench(base);
let msg_enc = MessagePackBench::encode_bench(base);
let json_enc = JSONBench::encode_bench(base);
let bson_enc = BSONBench::encode_bench(base);
let pro_enc = ProstBench::encode_bench(base);
let avro_enc = AvroBench::encode_bench(base);
let flx_enc = FlexBench::encode_bench(base);
let abo_enc = AbomBench::encode_bench(base);
let rkyv_enc = RkyvBench::encode_bench(base);
let rbso_enc = RawBSONBench::encode_bench(base);
let msg2_enc = MessagePackRSBench::encode_bench(base);
let json2_enc = SerdeJSONBench::encode_bench(base);
println!("\n======== DECODE BENCHMARK ========");
let (base, np_dec) = NoProtoBench::decode_bench().unwrap();
let fb_dec = FlatBufferBench::decode_bench(base);
let bn_dec = BincodeBench::decode_bench(base);
let pc_dec = PostcardBench::decode_bench(base);
let pb_dec = ProtocolBufferBench::decode_bench(base);
let msg_dec = MessagePackBench::decode_bench(base);
let json_dec = JSONBench::decode_bench(base);
let bson_dec = BSONBench::decode_bench(base);
let pro_dec = ProstBench::decode_bench(base);
let avro_dec = AvroBench::decode_bench(base);
let flx_dec = FlexBench::decode_bench(base);
let abo_dec = AbomBench::decode_bench(base);
let rkyv_dec = RkyvBench::decode_bench(base);
let rbso_dec = RawBSONBench::decode_bench(base);
let msg2_dec = MessagePackRSBench::decode_bench(base);
let json2_dec = SerdeJSONBench::decode_bench(base);
println!("\n====== DECODE ONE BENCHMARK ======");
let (base, np_dec1) = NoProtoBench::decode_one_bench().unwrap();
let fb_dec1 = FlatBufferBench::decode_one_bench(base);
let bn_dec1 = BincodeBench::decode_one_bench(base);
let pc_dec1 = PostcardBench::decode_one_bench(base);
let pb_dec1 = ProtocolBufferBench::decode_one_bench(base);
let msg_dec1 = MessagePackBench::decode_one_bench(base);
let json_dec1 = JSONBench::decode_one_bench(base);
let bson_dec1 = BSONBench::decode_one_bench(base);
let pro_dec1 = ProstBench::decode_one_bench(base);
let avro_dec1 = AvroBench::decode_one_bench(base);
let flx_dec1 = FlexBench::decode_one_bench(base);
let abo_dec1 = AbomBench::decode_one_bench(base);
let rkyv_dec1 = RkyvBench::decode_one_bench(base);
let rbso_dec1 = RawBSONBench::decode_one_bench(base);
let msg2_dec1 = MessagePackRSBench::decode_one_bench(base);
let json2_dec1 = SerdeJSONBench::decode_one_bench(base);
println!("\n====== UPDATE ONE BENCHMARK ======");
let (base, np_up) = NoProtoBench::update_bench().unwrap();
let fb_up = FlatBufferBench::update_bench(base);
let bn_up = BincodeBench::update_bench(base);
let pc_up = PostcardBench::update_bench(base);
let pb_up = ProtocolBufferBench::update_bench(base);
let msg_up = MessagePackBench::update_bench(base);
let json_up = JSONBench::update_bench(base);
let bson_up = BSONBench::update_bench(base);
let pro_up = ProstBench::update_bench(base);
let avro_up = AvroBench::update_bench(base);
let flx_up = FlexBench::update_bench(base);
let abo_up = AbomBench::update_bench(base);
let rkyv_up = RkyvBench::update_bench(base);
let rbso_up = RawBSONBench::update_bench(base);
let msg2_up = MessagePackRSBench::update_bench(base);
let json2_up = SerdeJSONBench::update_bench(base);
println!("\n\n");
println!("//! | Format / Lib | Encode | Decode All | Decode 1 | Update 1 | Size (bytes) | Size (Zlib) |");
println!("//! |------------------------------------------------------------|---------|------------|----------|----------|--------------|-------------|");
println!("//! | **Runtime Libs** | | | | | | |");
println!("//! | *NoProto* | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", np_lib, np_enc, np_dec, np_dec1, np_up, np_size.0, np_size.1);
println!("//! | Apache Avro | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", avro_lib, avro_enc, avro_dec, avro_dec1, avro_up, avro_size.0, avro_size.1);
println!("//! | FlexBuffers | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", flx_lib, flx_enc, flx_dec, flx_dec1, flx_up, flx_size.0, flx_size.1);
println!("//! | JSON | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", json_lib, json_enc, json_dec, json_dec1, json_up, json_size.0, json_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", json2_lib, json2_enc, json2_dec, json2_dec1, json2_up, json2_size.0, json2_size.1);
println!("//! | BSON | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", bson_lib, bson_enc, bson_dec, bson_dec1, bson_up, bson_size.0, bson_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", rbso_lib, rbso_enc, rbso_dec, rbso_dec1, rbso_up, rbso_size.0, rbso_size.1);
println!("//! | MessagePack | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", msg_lib, msg_enc, msg_dec, msg_dec1, msg_up, msg_size.0, msg_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", msg2_lib, msg2_enc, msg2_dec, msg2_dec1, msg2_up, msg2_size.0, msg2_size.1);
println!("//! | **Compiled Libs** | | | | | | |");
println!("//! | Flatbuffers | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", fb_lib, fb_enc, fb_dec, fb_dec1, fb_up, fb_size.0, fb_size.1);
println!("//! | Bincode | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", bn_lib, bn_enc, bn_dec, bn_dec1, bn_up, bn_size.0, bn_size.1);
println!("//! | Postcard | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", pc_lib, pc_enc, pc_dec, pc_dec1, pc_up, pc_size.0, pc_size.1);
println!("//! | Protocol Buffers | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", pb_lib, pb_enc, pb_dec, pb_dec1, pb_up, pb_size.0, pb_size.1);
println!("//! | {} | {} | {} | {} | {} | {} | {} |", pro_lib, pro_enc, pro_dec, pro_dec1, pro_up, pro_size.0, pro_size.1);
println!("//! | Abomonation | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", abo_lib, abo_enc, abo_dec, abo_dec1, abo_up, abo_size.0, abo_size.1);
println!("//! | Rkyv | | | | | | |");
println!("//! | {} | {} | {} | {} | {} | {} | {} |", rkyv_lib, rkyv_enc, rkyv_dec, rkyv_dec1, rkyv_up, rkyv_size.0, rkyv_size.1);
}
================================================
FILE: bench/src/run_bench_abomonation.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use abomonation::{encode, decode};
use abomonation_derive::*;
#[derive(Abomonation, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Abomonation, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Abomonation, PartialEq, Debug, Clone)]
struct FooBar {
sibling: Bar,
name: String,
rating: f64,
postfix: char
}
#[derive(Abomonation, PartialEq, Debug, Clone)]
struct FooBarContainer {
list: Vec<FooBar>,
initialized: bool,
fruit: Fruit,
location: String
}
pub struct AbomBench();
impl AbomBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Abomonation: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 261);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector: Vec<FooBar> = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: String::from("Hello, world!"),
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: String::from("http://arstechnica.com"),
fruit: Fruit::Apples,
initialized: true,
list: vector
};
let mut bytes = Vec::new();
unsafe { encode(&foobar_c, &mut bytes).unwrap(); };
bytes
}
pub fn update_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
if let Some((result, _remaining)) = unsafe { decode::<FooBarContainer>(&mut buffer) } {
let mut result2 = result.clone();
result2.list[0].name = String::from("bob");
let mut bytes = Vec::new();
unsafe { encode(&result2, &mut bytes).unwrap() };
assert_eq!(bytes.len(), 251);
} else {
panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
if let Some((result, _remaining)) = unsafe { decode::<FooBarContainer>(&mut buffer) } {
assert_eq!(result.location, "http://arstechnica.com");
} else {
panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: &FooBarContainer = if let Some((result, _remaining)) = unsafe { decode::<FooBarContainer>(&mut buffer) } { result } else { panic!() };
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Abomonation: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_avro.rs
================================================
use crate::LOOPS;
use avro_rs::{
types::Record, types::Value, Codec, Days, Decimal, Duration, Error, Millis, Months, Reader,
Schema, Writer,
};
use flate2::write::ZlibEncoder;
use flate2::Compression;
use serde::{Deserialize, Serialize};
use std::io::prelude::*;
use std::time::SystemTime;
#[repr(i32)]
enum Fruit {
Apples,
Pears,
Bananas,
}
pub struct AvroBench();
impl AvroBench {
pub fn setup_bench() -> u128 {
let start = SystemTime::now();
let factory = Self::get_schema();
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Avro: setup: {:?}", time.as_micros() as f64 / 1000f64);
time.as_micros()
}
fn get_schema() -> Schema {
let foo_bar_container = r#"
{
"name": "FooBarContainer",
"type": "record",
"fields": [
{"name": "initialized", "type": "boolean"},
{"name": "fruit", "type": "int"},
{"name": "location", "type": "string"},
{"name": "list" ,"type": "array", "items": {
"name": "FooBar",
"type": "record",
"fields": [
{"name": "name", "type": "string"},
{"name": "rating", "type": "float"},
{"name": "postfix", "type": "string"},
{"name": "sibling", "type": "record", "fields": [
{"name": "time", "type": "int"},
{"name": "ratio", "type": "float"},
{"name": "size", "type": "int"}
]
}
]
}}
]
}"#;
Schema::parse_str(foo_bar_container).unwrap()
}
pub fn size_bench() -> (usize, usize) {
let schema = Self::get_schema();
let encoded = Self::encode_single(&schema);
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!(
"Avro: size: {}b, zlib: {}b",
encoded.len(),
compressed.len()
);
return (encoded.len(), compressed.len());
}
pub fn encode_bench(base: u128) -> String {
let schema = Self::get_schema();
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single(&schema);
assert_eq!(buffer.len(), 702);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single(schema: &Schema) -> Vec<u8> {
let mut foobar_c: Vec<(String, Value)> = Vec::new();
foobar_c.push((String::from("initialized"), Value::Boolean(true)));
foobar_c.push((String::from("fruit"), Value::Int(Fruit::Apples as i32)));
foobar_c.push((
String::from("location"),
Value::String(String::from("http://arstechnica.com")),
));
let mut vector: Vec<Value> = Vec::new();
for x in 0..3 {
let mut bar: Vec<(String, Value)> = Vec::new();
bar.push((String::from("time"), Value::Int(123456 + (x as i32))));
bar.push((String::from("ratio"), Value::Float(3.14159 + (x as f32))));
bar.push((String::from("size"), Value::Int(10000 + (x as i32))));
let mut foobar: Vec<(String, Value)> = Vec::new();
foobar.push((
String::from("name"),
Value::String(String::from("Hello, world!")),
));
foobar.push((
String::from("rating"),
Value::Float(3.1415432432445543543 + (x as f32)),
));
foobar.push((String::from("postfix"), Value::String(String::from("!"))));
foobar.push((String::from("sibling"), Value::Record(bar)));
vector.push(Value::Record(foobar));
}
foobar_c.push((String::from("list"), Value::Array(vector)));
let mut writer = Writer::new(&schema, Vec::new());
writer.append(Value::Record(foobar_c)).unwrap();
writer.into_inner().unwrap()
}
pub fn update_bench(base: u128) -> String {
let schema = Self::get_schema();
let buffer = Self::encode_single(&schema);
let start = SystemTime::now();
for _x in 0..LOOPS {
let reader = Reader::new(&buffer[..]).unwrap();
let mut foobar_c: Vec<(String, Value)> = Vec::new();
for val in reader {
if let Value::Record(data) = val.unwrap() {
data.iter().for_each(|(key, data)| {
match key.as_str() {
"list" => {
let mut vector: Vec<Value> = Vec::new();
if let Value::Array(list) = data {
list.iter().enumerate().for_each(|(i, foo_bar)| {
if i == 0 {
if let Value::Record(foo_bar) = foo_bar {
let mut new_foobar: Vec<(String, Value)> =
Vec::new();
foo_bar.iter().for_each(|(key, value)| {
match key.as_str() {
"name" => {
new_foobar.push((
String::from("name"),
Value::String(String::from("bob")),
));
}
_ => {
new_foobar
.push((key.clone(), value.clone()));
}
}
});
vector.push(Value::Record(new_foobar));
} else {
panic!()
}
} else {
vector.push(foo_bar.clone());
}
});
} else {
panic!()
}
foobar_c.push((String::from("list"), Value::Array(vector)));
}
_ => {
foobar_c.push((key.clone(), data.clone()));
}
};
});
}
}
let mut writer = Writer::new(&schema, Vec::new());
writer.append(Value::Record(foobar_c)).unwrap();
let finished = writer.into_inner().unwrap();
assert_eq!(finished.len(), 692);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let schema = Self::get_schema();
let start = SystemTime::now();
let buffer = Self::encode_single(&schema);
for _x in 0..LOOPS {
let mut found = false;
let reader = Reader::new(&buffer[..]).unwrap();
for val in reader {
if let Value::Record(data) = val.unwrap() {
data.iter().for_each(|(key, data)| {
if key == "location" {
if let Value::String(x) = data {
found = true;
assert_eq!("http://arstechnica.com", x);
}
}
});
}
}
assert!(found == true);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let schema = Self::get_schema();
let buffer = Self::encode_single(&schema);
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut loops = 0;
let reader = Reader::new(&buffer[..]).unwrap();
for val in reader {
if let Value::Record(data) = val.unwrap() {
data.iter().for_each(|(key, data)| {
match key.as_str() {
"location" => {
if let Value::String(x) = data {
assert_eq!("http://arstechnica.com", x);
} else {
panic!()
}
}
"initialized" => {
if let Value::Boolean(x) = data {
assert_eq!(true, *x);
} else {
panic!()
}
}
"fruit" => {
if let Value::Int(x) = data {
assert_eq!(Fruit::Apples as i32, *x);
} else {
panic!()
}
}
"list" => {
if let Value::Array(list) = data {
list.iter().for_each(|foo_bar| {
if let Value::Record(foo_bar) = foo_bar {
let mut key_count = 0;
foo_bar.iter().for_each(|(key, value)| {
key_count += 1;
match key.as_str() {
"name" => {
if let Value::String(x) = value {
assert_eq!("Hello, world!", x);
} else {
panic!()
}
}
"rating" => {
if let Value::Float(x) = value {
assert_eq!(
3.1415432432445543543
+ (loops as f32),
*x
);
} else {
panic!()
}
}
"postfix" => {
if let Value::String(x) = value {
assert_eq!("!", x);
} else {
panic!()
}
}
"sibling" => {
if let Value::Record(sibling) = value {
let mut foo_key_count = 0;
sibling.iter().for_each(
|(skey, svalue)| {
foo_key_count += 1;
match skey.as_str() {
"time" => {
assert_eq!(
Value::Int(
123456
+ (loops
as i32)
),
*svalue
);
}
"ratio" => {
assert_eq!(
Value::Float(
3.14159
+ (loops
as f32)
),
*svalue
);
}
"size" => {
assert_eq!(
Value::Int(
10000
+ (loops
as i32)
),
*svalue
);
}
_ => panic!(),
}
},
);
assert_eq!(foo_key_count, 3);
} else {
panic!()
}
}
_ => panic!(),
}
});
assert_eq!(key_count, 4);
} else {
panic!()
}
loops += 1;
});
} else {
panic!()
}
}
_ => panic!(),
};
});
}
}
assert!(loops == 3);
}
let time = SystemTime::now()
.duration_since(start)
.expect("Time went backwards");
println!(
"Avro: {:>9.0} ops/ms {:.2}",
LOOPS as f64 / time.as_millis() as f64,
(base as f64 / time.as_micros() as f64)
);
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_bincode.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
use bincode;
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar<'fb> {
sibling: Bar,
name: &'fb str,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer<'con> {
list: Vec<FooBar<'con>>,
initialized: bool,
fruit: Fruit,
location: &'con str
}
pub struct BincodeBench();
impl BincodeBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Bincode: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 163);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector: Vec<FooBar> = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: "Hello, world!",
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: "http://arstechnica.com",
fruit: Fruit::Apples,
initialized: true,
list: vector
};
bincode::serialize(&foobar_c).unwrap()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = bincode::deserialize(&buffer[..]).unwrap();
decoded.list[0].name = "bob";
let encoded = bincode::serialize(&decoded).unwrap();
assert_eq!(encoded.len(), 153);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = bincode::deserialize(&buffer[..]).unwrap();
assert_eq!(decoded.location, "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = bincode::deserialize(&buffer[..]).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Bincode: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_bson.rs
================================================
use crate::LOOPS;
use std::{io::prelude::*};
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use bson::*;
pub struct BSONBench();
impl BSONBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("BSON: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 414);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut bson_object = doc!{
"fruit": 2i32,
"initialized": true,
"location": "http://arstechnica.com",
"list": []
};
for x in 0..3 {
let list = bson_object.get_array_mut("list").unwrap();
list.push(bson!({
"name": "Hello, World!",
"rating": 3.1415432432445543543 + (x as f64),
"postfix": "!",
"sibling": {
"time": 123456 + (x as i32),
"ratio": 3.14159f64,
"size": 10000 + (x as i32)
}
}));
}
let mut byte_array : Vec<u8> = vec![];
bson_object.to_writer(&mut byte_array).unwrap();
return byte_array
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
let list = container.get_array_mut("list").unwrap();
let first_list = list[0].as_document_mut().unwrap();
first_list.insert("name", "bob");
let mut byte_array : Vec<u8> = vec![];
container.to_writer(&mut byte_array).unwrap();
assert_eq!(byte_array.len(), 404);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
assert_eq!(container.get_str("location").unwrap(), "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Document::from_reader(&mut std::io::Cursor::new(buffer.clone())).unwrap();
assert_eq!(container.get_str("location").unwrap(), "http://arstechnica.com");
assert_eq!(container.get_i32("fruit").unwrap(), 2i32);
assert_eq!(container.get_bool("initialized").unwrap(), true);
let mut loops = 0;
container.get_array("list").unwrap().iter().enumerate().for_each(|(x, bson)| {
loops += 1;
let foobar = bson.as_document().unwrap();
assert_eq!(foobar.get_str("name").unwrap(), "Hello, World!");
assert_eq!(foobar.get_f64("rating").unwrap(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.get_str("postfix").unwrap(), "!");
let sibling = foobar.get_document("sibling").unwrap();
assert_eq!(sibling.get_i32("time").unwrap(), 123456 + (x as i32));
assert_eq!(sibling.get_f64("ratio").unwrap(), 3.14159f64);
assert_eq!(sibling.get_i32("size").unwrap(), 10000 + (x as i32));
});
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("BSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_flatbuffers.rs
================================================
use crate::LOOPS;
use crate::bench_fb::benchfb::get_root_as_foo_bar_container;
use crate::bench_fb::benchfb::FooBarContainerArgs as FooBarContainerArgsFB;
use crate::bench_fb::benchfb::FooBarContainer as FooBarContainerFB;
use crate::bench_fb::benchfb::FooBarArgs as FooBarArgsFB;
use crate::bench_fb::benchfb::FooBar as FooBarFB;
use crate::bench_fb::benchfb::Bar as BarFB;
use crate::bench_fb::benchfb::Enum as EnumFB;
use flatbuffers::FlatBufferBuilder;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
pub struct FlatBufferBench();
impl FlatBufferBench {
pub fn setup_bench() -> u128 {
let start = SystemTime::now();
let factory = FlatBufferBuilder::new();
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: setup: {:?}", time.as_micros() as f64 / 1000f64);
time.as_micros()
}
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single(&mut FlatBufferBuilder::new());
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Flatbuffers: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
let mut fbb = FlatBufferBuilder::new();
for _x in 0..LOOPS {
let buffer = Self::encode_single(&mut fbb);
assert_eq!(buffer.len(), 264);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single(fbb: &mut FlatBufferBuilder) -> Vec<u8> {
fbb.reset();
let mut vector = Vec::new();
for x in 0..3 {
let bar = BarFB::new(123456 + (x as i32), 3.14159 + (x as f32), 10000 + (x as u16));
let name = fbb.create_string("Hello, World!");
let foobar_args = FooBarArgsFB { name: Some(name), sibling: Some(&bar), rating: 3.1415432432445543543 + (x as f64), postfix: "!".as_bytes()[0]};
let foobar = FooBarFB::create(fbb, &foobar_args);
vector.push(foobar);
}
let location = fbb.create_string("http://arstechnica.com");
let foobarvec = fbb.create_vector(&vector[..]);
let foobarcontainer_args = FooBarContainerArgsFB { fruit: EnumFB::Apples, initialized: true, location: Some(location), list: Some(foobarvec) };
let foobarcontainer = FooBarContainerFB::create(fbb, &foobarcontainer_args);
fbb.finish(foobarcontainer, None);
fbb.finished_data().to_vec()
}
pub fn update_bench(base: u128) -> String {
let mut fbb: FlatBufferBuilder = FlatBufferBuilder::new();
let buffer = Self::encode_single(&mut fbb);
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = get_root_as_foo_bar_container(&buffer[..]);
fbb.reset();
let mut vector = Vec::new();
container.list().unwrap().iter().enumerate().for_each(|(idx, foobar)| {
let old_bar = foobar.sibling().unwrap();
let bar = BarFB::new(old_bar.time(), old_bar.ratio(), old_bar.size_());
let name = if idx == 0 { // our update
fbb.create_string("bob")
} else {
fbb.create_string(foobar.name().unwrap())
};
let foobar_args = FooBarArgsFB { name: Some(name), sibling: Some(&bar), rating: foobar.rating(), postfix: foobar.postfix()};
let foobar = FooBarFB::create(&mut fbb, &foobar_args);
vector.push(foobar);
});
let location = fbb.create_string(container.location().unwrap());
let foobarvec = fbb.create_vector(&vector[..]);
let foobarcontainer_args = FooBarContainerArgsFB { fruit: container.fruit(), initialized: container.initialized(), location: Some(location), list: Some(foobarvec) };
let foobarcontainer = FooBarContainerFB::create(&mut fbb, &foobarcontainer_args);
fbb.finish(foobarcontainer, None);
let finished = fbb.finished_data().to_vec();
assert_eq!(finished.len(), 248);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single(&mut FlatBufferBuilder::new());
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = get_root_as_foo_bar_container(&buffer[..]);
assert_eq!(container.location(), Some("http://arstechnica.com"));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single(&mut FlatBufferBuilder::new());
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = get_root_as_foo_bar_container(&buffer[..]);
let mut loops = 0;
container.list().unwrap().iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = foobar.sibling().unwrap();
assert_eq!(old_bar.time(), 123456 + (x as i32));
assert_eq!(old_bar.ratio(), 3.14159 + (x as f32));
assert_eq!(old_bar.size_(), 10000 + (x as u16));
assert_eq!(foobar.name(), Some("Hello, World!"));
assert_eq!(foobar.rating(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix(), "!".as_bytes()[0]);
});
assert!(loops == 3);
assert_eq!(container.location(), Some("http://arstechnica.com"));
assert_eq!(container.fruit(), EnumFB::Apples);
assert_eq!(container.initialized(), true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flatbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_flexbuffers.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
use flexbuffers::{self, Reader};
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar<'fb> {
sibling: Bar,
name: &'fb str,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer<'con> {
list: Vec<FooBar<'con>>,
initialized: bool,
fruit: Fruit,
location: &'con str
}
pub struct FlexBench();
impl FlexBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Flexbuffers: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 490);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector: Vec<FooBar> = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: "Hello, world!",
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: "http://arstechnica.com",
fruit: Fruit::Apples,
initialized: true,
list: vector
};
let mut s = flexbuffers::FlexbufferSerializer::new();
foobar_c.serialize(&mut s).unwrap();
s.view().to_vec()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let reader = flexbuffers::Reader::get_root(&buffer[..]).unwrap();
let mut decoded: FooBarContainer = FooBarContainer::deserialize(reader).unwrap().clone();
decoded.list[0].name = "bob";
let mut s = flexbuffers::FlexbufferSerializer::new();
decoded.serialize(&mut s).unwrap();
assert_eq!(s.view().to_vec().len(), 482);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let root = Reader::get_root(&buffer[..]).unwrap();
let decoded = root.as_map();
assert_eq!(decoded.idx("location").as_str(), "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let reader = flexbuffers::Reader::get_root(&buffer[..]).unwrap();
let decoded: FooBarContainer = FooBarContainer::deserialize(reader).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Flexbuffers: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_json.rs
================================================
use crate::LOOPS;
use std::{io::prelude::*, str::{from_utf8_unchecked}};
use flate2::Compression;
use flate2::write::ZlibEncoder;
use json::{JsonValue};
use std::time::{SystemTime};
pub struct JSONBench();
impl JSONBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("JSON: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 439);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut json_object = object!{
fruit: 2,
initialized: true,
location: "http://arstechnica.com",
list: []
};
for x in 0..3 {
json_object["list"][x] = object!{
name: "Hello, World!",
rating: 3.1415432432445543543 + (x as f64),
postfix: "!",
sibling: {
time: 123456 + (x as i32),
ratio: 3.14159,
size: 10000 + (x as u16)
}
};
}
json_object.dump().as_bytes().to_vec()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = json::parse(unsafe { from_utf8_unchecked(&buffer) }).unwrap();
container["list"][0]["name"] = JsonValue::String(String::from("bob"));
assert_eq!(container.dump().len(), 429);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = json::parse(unsafe { from_utf8_unchecked(&buffer) }).unwrap();
assert_eq!(container["location"], JsonValue::String(String::from("http://arstechnica.com")));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = JsonValue::String(String::from("Hello, World!"));
let ars_technica = JsonValue::String(String::from("http://arstechnica.com"));
for _x in 0..LOOPS {
let container = json::parse(unsafe { from_utf8_unchecked(&buffer) }).unwrap();
assert_eq!(container["location"], ars_technica);
assert_eq!(container["fruit"].as_f64(), Some(2.0f64));
assert_eq!(container["initialized"], JsonValue::Boolean(true));
let mut loops = 0;
if let JsonValue::Array(list) = &container["list"] {
list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
assert_eq!(foobar["name"], hello_world);
assert_eq!(foobar["rating"].as_f64().unwrap(), 3.1415432432445543543 + (x as f64));
assert_eq!(foobar["postfix"], JsonValue::String(String::from("!")));
let sibling = &foobar["sibling"];
assert_eq!(sibling["time"].as_f64().unwrap(), 123456f64 + (x as f64));
assert_eq!(sibling["ratio"].as_f64().unwrap(), 3.14159);
assert_eq!(sibling["size"].as_f64().unwrap(), 10000f64 + (x as f64));
});
}
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("JSON: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_messagepack.rs
================================================
use crate::LOOPS;
use std::io::{BufReader, Cursor};
use std::collections::BTreeMap;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use std::collections::HashMap;
use rmp::{encode, decode};
use rmpv::{ValueRef::*, decode::read_value_ref};
use rmpv::encode::write_value_ref;
pub struct MessagePackBench();
impl MessagePackBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("MessagePack: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> std::string::String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 311);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector = Vec::new();
for x in 0..3 {
let bar = Map(vec![
(String("time".into()), Integer((123456 + (x as i32)).into())),
(String("ratio".into()), F32((3.14159 + (x as f32)).into())),
(String("size".into()), Integer((10000 + (x as u16)).into()))
]);
let foobar = Map(vec![
(String("name".into()), String("Hello, World!".into())),
(String("sibling".into()), bar),
(String("rating".into()), F64((3.1415432432445543543 + (x as f64)).into())),
(String("postfix".into()), String("!".into()))
]);
vector.push(foobar);
}
let value = Map(vec![
(String("fruit".into()), Integer(2u8.into())),
(String("initialized".into()), Boolean(true)),
(String("location".into()), String("http://arstechnica.com".into())),
(String("list".into()), Array(vector))
]);
let mut bytes: Vec<u8> = Vec::new();
write_value_ref(&mut bytes, &value).unwrap();
bytes
}
pub fn update_bench(base: u128) -> std::string::String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = read_value_ref(&mut &buffer[..]).unwrap().to_owned();
match &mut container {
rmpv::Value::Map(foobarcontainer) => {
if let rmpv::Value::Array(list) = Self::find_mut(foobarcontainer, "list") {
list.iter_mut().enumerate().for_each(|(x, value)| {
if x == 0 {
if let rmpv::Value::Map(foobar) = value {
let value = Self::find_mut(foobar, "name");
*value = rmpv::Value::String("bob".into());
} else { panic!() }
}
});
} else { panic!() }
},
_ => panic!()
}
let mut bytes: Vec<u8> = Vec::new();
rmpv::encode::write_value(&mut bytes, &container).unwrap();
assert_eq!(bytes.len(), 301);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> std::string::String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let location = String("location".into());
let url = String("http://arstechnica.com".into());
for _x in 0..LOOPS {
let container = read_value_ref(&mut &buffer[..]).unwrap();
match &container {
Map(foobarcontainer) => {
let location = foobarcontainer.iter().position(|(key, _value)| { key == &location }).unwrap();
assert_eq!(&foobarcontainer[location].1, &url);
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
pub fn find<'find>(container: &'find Vec<(rmpv::ValueRef, rmpv::ValueRef)>, key: &str) -> &'find rmpv::ValueRef<'find> {
let k = String(key.into());
let idx = container.iter().position(|(key, _value)| { key == &k }).unwrap();
&container[idx].1
}
#[inline(always)]
pub fn find_mut<'find>(container: &'find mut Vec<(rmpv::Value, rmpv::Value)>, key: &str) -> &'find mut rmpv::Value {
let k = rmpv::Value::String(key.into());
let idx = container.iter().position(|(key, _value)| { key == &k }).unwrap();
&mut container[idx].1
}
pub fn decode_bench(base: u128) -> std::string::String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = String("Hello, World!".into());
let ars_technica = String("http://arstechnica.com".into());
for _x in 0..LOOPS {
let container = read_value_ref(&mut &buffer[..]).unwrap();
match &container {
Map(foobarcontainer) => {
assert_eq!(Self::find(foobarcontainer, "location"), &ars_technica);
assert_eq!(Self::find(foobarcontainer, "fruit"), &Integer(2u8.into()));
assert_eq!(Self::find(foobarcontainer, "initialized"), &Boolean(true));
let mut loops = 0;
if let Array(list) = Self::find(foobarcontainer, "list") {
list.iter().enumerate().for_each(|(x, value)| {
loops += 1;
if let Map(foobar) = value {
assert_eq!(Self::find(foobar, "name"), &hello_world);
assert_eq!(Self::find(foobar, "rating"), &F64((3.1415432432445543543 + (x as f64)).into()));
assert_eq!(Self::find(foobar, "postfix"), &String("!".into()));
if let Map(bar) = Self::find(foobar, "sibling") {
assert_eq!(Self::find(bar, "time"), &Integer((123456 + (x as i32)).into()));
assert_eq!(Self::find(bar, "ratio"), &F32((3.14159 + (x as f32)).into()));
assert_eq!(Self::find(bar, "size"), &Integer((10000 + (x as u16)).into()));
} else { panic!() }
} else { panic!() }
});
} else {
panic!()
}
assert!(loops == 3);
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_messagepack_rs.rs
================================================
use crate::LOOPS;
use messagepack_rs::{deserializable::Deserializable, serializable::Serializable, value::Value};
use std::io::{BufReader, Cursor};
use std::collections::BTreeMap;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
pub struct MessagePackRSBench();
impl MessagePackRSBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("MessagePack: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 296);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector = Vec::new();
for x in 0..3 {
let mut bar = BTreeMap::new();
bar.insert(String::from("time"), Value::from(123456 + (x as i32)));
bar.insert(String::from("ratio"), Value::from(3.14159 + (x as f32)));
bar.insert(String::from("size"), Value::from(10000 + (x as u16)));
let mut foobar = BTreeMap::new();
foobar.insert(String::from("name"), Value::from("Hello, World!"));
foobar.insert(String::from("sibling"), Value::from(bar));
foobar.insert(String::from("rating"), Value::from(3.1415432432445543543 + (x as f64)));
foobar.insert(String::from("postfix"), Value::from("!".as_bytes()[0]));
vector.push(Value::from(foobar));
}
let mut foobarcontainer = BTreeMap::new();
foobarcontainer.insert(String::from("fruit"), Value::from(2u8));
foobarcontainer.insert(String::from("initialized"), Value::from(true));
foobarcontainer.insert(String::from("location"), Value::from("http://arstechnica.com"));
foobarcontainer.insert(String::from("list"), Value::from(vector));
Value::from(foobarcontainer).serialize().unwrap()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut container = Value::deserialize(&mut BufReader::new(Cursor::new(buffer.clone()))).unwrap();
match &mut container {
Value::Map(foobarcontainer) => {
if let Value::Array(list) = foobarcontainer.get_mut("list").unwrap() {
list.iter_mut().enumerate().for_each(|(x, value)| {
if x == 0 {
if let Value::Map(foobar) = value {
foobar.insert(String::from("name"), Value::from("bob"));
} else { panic!() }
}
});
} else { panic!() }
},
_ => panic!()
}
assert_eq!(container.serialize().unwrap().len(), 286);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let container = Value::deserialize(&mut BufReader::new(Cursor::new(buffer.clone()))).unwrap();
match &container {
Value::Map(foobarcontainer) => {
if let Value::String(location) = foobarcontainer.get("location").unwrap() {
assert_eq!(location, &String::from("http://arstechnica.com"));
} else { panic!() }
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
let hello_world = String::from("Hello, World!");
let ars_technica = String::from("http://arstechnica.com");
for _x in 0..LOOPS {
let container = Value::deserialize(&mut BufReader::new(Cursor::new(buffer.clone()))).unwrap();
match &container {
Value::Map(foobarcontainer) => {
if let Value::String(location) = foobarcontainer.get("location").unwrap() {
assert_eq!(location, &ars_technica);
} else { panic!() }
if let Value::UInt8(fruit) = foobarcontainer.get("fruit").unwrap() {
assert_eq!(fruit, &2u8);
} else { panic!() }
if let Value::Bool(init) = foobarcontainer.get("initialized").unwrap() {
assert_eq!(init, &true);
} else { panic!() }
let mut loops = 0;
if let Value::Array(list) = foobarcontainer.get("list").unwrap() {
list.iter().enumerate().for_each(|(x, value)| {
loops += 1;
if let Value::Map(foobar) = value {
if let Value::String(name) = foobar.get("name").unwrap() {
assert_eq!(name, &hello_world);
} else { panic!() }
if let Value::Float64(rating) = foobar.get("rating").unwrap() {
assert_eq!(rating, &(3.1415432432445543543 + (x as f64)));
} else { panic!() }
if let Value::UInt8(postfix) = foobar.get("postfix").unwrap() {
assert_eq!(postfix, &"!".as_bytes()[0]);
} else { panic!() }
if let Value::Map(bar) = foobar.get("sibling").unwrap() {
if let Value::UInt8(time) = bar.get("time").unwrap() {
assert_eq!(time, &(64 + x as u8));
} else { panic!(); }
if let Value::Float32(ratio) = bar.get("ratio").unwrap() {
assert_eq!(ratio, &(3.14159 + (x as f32)));
} else { panic!() }
if let Value::UInt16(size) = bar.get("size").unwrap() {
assert_eq!(size, &(10000 + (x as u16)));
} else { panic!() }
} else { panic!() }
} else { panic!() }
});
} else { panic!() }
assert!(loops == 3);
},
_ => panic!()
}
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("MessagePack: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_no_proto.rs
================================================
use crate::LOOPS;
use no_proto::{error::NP_Error};
use no_proto::NP_Factory;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
static SCHEMA: [u8; 135] = [21u8, 4, 4, 108, 105, 115, 116, 0, 83, 23, 21, 4, 4, 110, 97, 109, 101, 0, 6, 2, 0, 0, 0, 0, 0, 6, 114, 97, 116, 105, 110, 103, 0, 2, 12, 0, 7, 112, 111, 115, 116, 102, 105, 120, 0, 6, 2, 0, 0, 1, 0, 0, 7, 115, 105, 98, 108, 105, 110, 103, 0, 30, 21, 3, 4, 116, 105, 109, 101, 0, 2, 10, 0, 5, 114, 97, 116, 105, 111, 0, 2, 12, 0, 4, 115, 105, 122, 101, 0, 2, 9, 0, 11, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 100, 0, 2, 15, 0, 8, 108, 111, 99, 97, 116, 105, 111, 110, 0, 6, 2, 0, 0, 0, 0, 0, 5, 102, 114, 117, 105, 116, 0, 2, 8, 0];
pub struct NoProtoBench();
impl NoProtoBench {
pub fn setup_bench() -> u128 {
let start = SystemTime::now();
let factory = Self::get_factory().unwrap();
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: setup: {:?}", time.as_micros() as f64 / 1000f64);
time.as_micros()
}
pub fn size_bench() -> (usize, usize) {
let factory = NoProtoBench::get_factory().unwrap();
let encoded = Self::encode_single(&factory).unwrap();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("NoProto: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let new_buffer = NoProtoBench::encode_single(&factory)?;
assert_eq!(new_buffer.len(), 308);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
pub fn update_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let new_buffer = NoProtoBench::encode_single(&factory)?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut new_buff = factory.open_buffer(new_buffer.clone());
new_buff.set(&["list", "0", "name"], "bob")?;
// new_buff.compact(None)?;
assert_eq!(new_buff.finish().bytes().len(), 308);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
#[inline(always)]
fn get_factory() -> Result<NP_Factory, NP_Error> {
// NP_Factory::new_bytes(&SCHEMA)
NP_Factory::new(r#"
struct({fields: {
list: list({of: struct({fields: {
name: string(),
rating: float(),
postfix: string({size: 1}),
sibling: struct({fields: {
time: u32(),
ratio: float(),
size: u16()
}})
}})}),
initialized: bool(),
location: string(),
fruit: u8()
}})
"#)
// NP_Factory::new_json(r#"{
// "type": "table",
// "columns": [
// ["list", {"type": "list", "of": {
// "type": "table",
// "columns": [
// ["name", {"type": "string"}],
// ["rating", {"type": "float"}],
// ["postfix", {"type": "string", "size": 1}],
// ["sibling", {"type": "table", "columns": [
// ["time", {"type": "u32"}],
// ["ratio", {"type": "float"}],
// ["size", {"type": "u16"}]
// ]}]
// ]
// }}],
// ["initialized", {"type": "bool"}],
// ["location", {"type": "string"}],
// ["fruit", {"type": "u8"}]
// ]
// }"#)
}
pub fn decode_one_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let new_buffer = NoProtoBench::encode_single(&factory)?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let new_buff = factory.open_buffer_ref(&new_buffer);
assert_eq!(new_buff.get(&["location"])?, Some("http://arstechnica.com"));
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
pub fn decode_bench() -> Result<(u128, String), NP_Error> {
let factory = NoProtoBench::get_factory()?;
let new_buffer = NoProtoBench::encode_single(&factory)?;
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut new_buff = factory.open_buffer_ref(&new_buffer);
assert_eq!(new_buff.get(&["initialized"])?, Some(true));
assert_eq!(new_buff.get(&["location"])?, Some("http://arstechnica.com"));
assert_eq!(new_buff.get(&["fruit"])?, Some(2u8));
let mut loops = 0;
for (x1, x) in [("0", 0), ("1", 1), ("2", 2)].iter() {
loops += 1;
new_buff.cursor_to_root();
new_buff.move_cursor(&["list", x1])?;
assert_eq!(new_buff.get(&["name"])?, Some("Hello, world!"));
assert_eq!(new_buff.get(&["rating"])?, Some(3.1415432432445543543 + (*x as f32)));
assert_eq!(new_buff.get(&["postfix"])?, Some("!"));
new_buff.move_cursor(&["sibling"])?;
assert_eq!(new_buff.get(&["time"])?, Some(123456 + (*x as u32)));
assert_eq!(new_buff.get(&["ratio"])?, Some(3.14159 + (*x as f32)));
assert_eq!(new_buff.get(&["size"])?, Some(10000 + (*x as u16)));
}
assert!(loops == 3);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("NoProto: {:>9.0} ops/ms 1.00", LOOPS as f64 / time.as_millis() as f64);
Ok((time.as_micros(), format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)))
}
#[inline(always)]
pub fn encode_single(factory: &NP_Factory) ->Result<Vec<u8>, NP_Error> {
let mut new_buffer = factory.new_buffer(None);
new_buffer.set(&["initialized"], true)?;
new_buffer.set(&["location"], "http://arstechnica.com")?;
new_buffer.set(&["fruit"], 2u8)?;
for (x1, x) in [("0", 0), ("1", 1), ("2", 2)].iter() {
new_buffer.cursor_to_root();
new_buffer.move_cursor(&["list", x1])?;
new_buffer.set(&["name"], "Hello, world!")?;
new_buffer.set(&["rating"], 3.1415432432445543543 + (*x as f32))?;
new_buffer.set(&["postfix"], "!")?;
new_buffer.move_cursor(&["sibling"])?;
new_buffer.set(&["time"], 123456 + (*x as u32))?;
new_buffer.set(&["ratio"], 3.14159 + (*x as f32))?;
new_buffer.set(&["size"], 10000 + (*x as u16))?;
}
Ok(new_buffer.finish().bytes())
}
}
================================================
FILE: bench/src/run_bench_postcard.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use serde::{Serialize, Deserialize};
use postcard;
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
enum Fruit {
Apples, Pears, Bananas
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct Bar {
time: i32,
ratio: f32,
size: u16
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBar<'fb> {
sibling: Bar,
name: &'fb str,
rating: f64,
postfix: char
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
struct FooBarContainer<'con> {
list: Vec<FooBar<'con>>,
initialized: bool,
fruit: Fruit,
location: &'con str
}
pub struct PostcardBench();
impl PostcardBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Postcard: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 128);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector: Vec<FooBar> = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u16)
};
let foobar = FooBar {
sibling: bar,
name: "Hello, world!",
rating: 3.1415432432445543543 + (x as f64),
postfix: '!'
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: "http://arstechnica.com",
fruit: Fruit::Apples,
initialized: true,
list: vector
};
postcard::to_stdvec(&foobar_c).unwrap()
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = postcard::from_bytes(&buffer[..]).unwrap();
decoded.list[0].name = "bob";
let encoded = postcard::to_stdvec(&decoded).unwrap();
assert_eq!(encoded.len(), 118);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_one_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = postcard::from_bytes(&buffer[..]).unwrap();
assert_eq!(decoded.location, "http://arstechnica.com");
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
pub fn decode_bench(base: u128) -> String {
let mut buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let decoded: FooBarContainer = postcard::from_bytes(&buffer[..]).unwrap();
let mut loops = 0;
decoded.list.iter().enumerate().for_each(|(x, foobar)| {
loops += 1;
let old_bar = &foobar.sibling;
assert_eq!(old_bar.time, 123456 + (x as i32));
assert_eq!(old_bar.ratio, 3.14159 + (x as f32));
assert_eq!(old_bar.size, 10000 + (x as u16));
assert_eq!(foobar.name, "Hello, world!");
assert_eq!(foobar.rating, 3.1415432432445543543 + (x as f64));
assert_eq!(foobar.postfix, '!');
});
assert!(loops == 3);
assert_eq!(decoded.location, "http://arstechnica.com");
assert_eq!(decoded.fruit, Fruit::Apples);
assert_eq!(decoded.initialized, true);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Postcard: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
}
================================================
FILE: bench/src/run_bench_prost.rs
================================================
use crate::LOOPS;
use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;
use std::time::{SystemTime};
use prost::*;
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bar {
#[prost(int32, required, tag="2")]
pub time: i32,
#[prost(float, required, tag="3")]
pub ratio: f32,
#[prost(uint32, required, tag="4")]
pub size: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FooBar {
#[prost(message, optional, tag="1")]
pub sibling: ::core::option::Option<Bar>,
#[prost(string, optional, tag="2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag="3")]
pub rating: ::core::option::Option<f64>,
#[prost(uint32, optional, tag="4")]
pub postfix: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FooBarContainer {
/// 3 copies of the above
#[prost(message, repeated, tag="1")]
pub list: ::prost::alloc::vec::Vec<FooBar>,
#[prost(bool, optional, tag="2")]
pub initialized: ::core::option::Option<bool>,
#[prost(enumeration="Enum", optional, tag="3")]
pub fruit: ::core::option::Option<i32>,
#[prost(string, optional, tag="4")]
pub location: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Enum {
Apples = 0,
Pears = 1,
Bananas = 2,
}
pub struct ProstBench();
impl ProstBench {
pub fn size_bench() -> (usize, usize) {
let encoded = Self::encode_single();
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
e.write(&encoded[..]).unwrap();
let compressed = e.finish().unwrap();
println!("Prost: size: {}b, zlib: {}b", encoded.len(), compressed.len());
return (encoded.len(), compressed.len())
}
pub fn encode_bench(base: u128) -> String {
let start = SystemTime::now();
for _x in 0..LOOPS {
let buffer = Self::encode_single();
assert_eq!(buffer.len(), 154);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Prost: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
format!("{:>6.0}", LOOPS as f64 / time.as_millis() as f64)
}
#[inline(always)]
fn encode_single() -> Vec<u8> {
let mut vector: Vec<FooBar> = Vec::new();
for x in 0..3 {
let bar = Bar {
time: 123456 + (x as i32),
ratio: 3.14159 + (x as f32),
size: 10000 + (x as u32)
};
let foobar = FooBar {
sibling: Some(bar),
name: Some(String::from("Hello, world!")),
rating: Some(3.1415432432445543543 + (x as f64)),
postfix: Some("!".as_bytes()[0] as u32)
};
vector.push(foobar);
}
let foobar_c = FooBarContainer {
location: Some(String::from("http://arstechnica.com")),
fruit: Some(Enum::Apples as i32),
initialized: Some(true),
list: vector
};
let mut bytes = Vec::new();
foobar_c.encode(&mut bytes).unwrap();
bytes
}
pub fn update_bench(base: u128) -> String {
let buffer = Self::encode_single();
let start = SystemTime::now();
for _x in 0..LOOPS {
let mut decoded: FooBarContainer = FooBarContainer::decode(&buffer[..]).unwrap();
decoded.list[0].name = Some(String::from("bob"));
let mut bytes = Vec::new();
decoded.encode(&mut bytes).unwrap();
assert_eq!(bytes.len(), 144);
}
let time = SystemTime::now().duration_since(start).expect("Time went backwards");
println!("Prost: {:>9.0} ops/ms {:.2}", LOOPS as f64 / time.as_millis() as f64, (base as f64 / time.as_micros() as f64));
gitextract_swrs5c9q/
├── .gitignore
├── .idea/
│ ├── .gitignore
│ ├── NoProto.iml
│ ├── modules.xml
│ └── vcs.xml
├── LICENSE
├── README.md
├── bench/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── bench.fbs
│ ├── bench_fb.rs
│ ├── bench_pb.proto
│ ├── bench_pb.rs
│ ├── main.rs
│ ├── run_bench_abomonation.rs
│ ├── run_bench_avro.rs
│ ├── run_bench_bincode.rs
│ ├── run_bench_bson.rs
│ ├── run_bench_flatbuffers.rs
│ ├── run_bench_flexbuffers.rs
│ ├── run_bench_json.rs
│ ├── run_bench_messagepack.rs
│ ├── run_bench_messagepack_rs.rs
│ ├── run_bench_no_proto.rs
│ ├── run_bench_postcard.rs
│ ├── run_bench_prost.rs
│ ├── run_bench_protocol_buffers.rs
│ ├── run_bench_rawbson.rs
│ ├── run_bench_rkyv.rs
│ └── run_bench_serde_json.rs
├── examples/
│ └── quick.rs
├── idl.graphql
├── no_proto_js/
│ ├── Cargo.toml
│ ├── out.txt
│ └── src/
│ ├── buffer.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── table.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── hashmap.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── lib_wasm.rs
│ ├── memory.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ └── uuid.rs
│ ├── rpc.rs
│ ├── schema.rs
│ └── utils.rs
├── no_proto_rs/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── modules.xml
│ │ ├── no_proto_rs.iml
│ │ └── vcs.xml
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── buffer/
│ │ └── mod.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── struc.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── map.rs
│ ├── memory.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── portal.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ ├── union.rs
│ │ └── uuid.rs
│ ├── schema/
│ │ ├── args.rs
│ │ ├── ast.rs
│ │ ├── mod.rs
│ │ ├── parser.rs
│ │ └── tests.rs
│ ├── types.rs
│ ├── utils.rs
│ └── values/
│ └── mod.rs
└── no_proto_rs_old/
├── .idea/
│ ├── .gitignore
│ ├── modules.xml
│ ├── no_proto_rs.iml
│ └── vcs.xml
├── CHANGELOG.md
├── Cargo.toml
├── README.md
├── src/
│ ├── buffer.rs
│ ├── collection/
│ │ ├── list.rs
│ │ ├── map.rs
│ │ ├── mod.rs
│ │ ├── struc.rs
│ │ └── tuple.rs
│ ├── error.rs
│ ├── format.rs
│ ├── hashmap.rs
│ ├── idl.rs
│ ├── json_flex.rs
│ ├── lib.rs
│ ├── memory.rs
│ ├── new_idl.rs
│ ├── pointer/
│ │ ├── any.rs
│ │ ├── bool.rs
│ │ ├── bytes.rs
│ │ ├── date.rs
│ │ ├── dec.rs
│ │ ├── geo.rs
│ │ ├── mod.rs
│ │ ├── numbers.rs
│ │ ├── option.rs
│ │ ├── portal.rs
│ │ ├── string.rs
│ │ ├── ulid.rs
│ │ ├── union.rs
│ │ └── uuid.rs
│ ├── rpc.rs
│ ├── schema.rs
│ └── utils.rs
└── target/
├── .rustc_info.json
├── CACHEDIR.TAG
├── debug/
│ ├── .cargo-lock
│ ├── .fingerprint/
│ │ ├── no_proto-087b92dbcadb4e9e/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-1f12470dc8aab137/
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-2620c8dfffee77c5/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-2b9c306cf5e321b2/
│ │ │ └── invoked.timestamp
│ │ ├── no_proto-3cb4c0b2e234d1a3/
│ │ │ └── invoked.timestamp
│ │ ├── no_proto-42633ea97bf6e77b/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-441091bf4a4eb675/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-45445c9cceb28ae6/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-56746ab113abb4bf/
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-7ecb4680266c38b6/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-8d483704a5a1fdf6/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ ├── no_proto-aa3c6589db10b605/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-ae791f23982352cd/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-test-lib-no_proto
│ │ ├── no_proto-ba940134b4c1a3ac/
│ │ │ ├── dep-test-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── output-test-lib-no_proto
│ │ │ ├── test-lib-no_proto
│ │ │ └── test-lib-no_proto.json
│ │ ├── no_proto-c73899fa9d5a4e2e/
│ │ │ ├── invoked.timestamp
│ │ │ └── output-test-lib-no_proto
│ │ ├── no_proto-d8cf3dffddd77550/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ ├── lib-no_proto.json
│ │ │ └── output-lib-no_proto
│ │ └── no_proto-efe2ce7d02f8f240/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ └── deps/
│ ├── libno_proto-2b9c306cf5e321b2.rmeta
│ ├── libno_proto-3cb4c0b2e234d1a3.rmeta
│ ├── libno_proto-aa3c6589db10b605.rmeta
│ ├── libno_proto-efe2ce7d02f8f240.rmeta
│ ├── no_proto-087b92dbcadb4e9e.d
│ ├── no_proto-1f12470dc8aab137.d
│ ├── no_proto-2620c8dfffee77c5.d
│ ├── no_proto-2b9c306cf5e321b2.d
│ ├── no_proto-3cb4c0b2e234d1a3.d
│ ├── no_proto-42633ea97bf6e77b.d
│ ├── no_proto-441091bf4a4eb675.d
│ ├── no_proto-45445c9cceb28ae6.d
│ ├── no_proto-56746ab113abb4bf.d
│ ├── no_proto-7ecb4680266c38b6.d
│ ├── no_proto-8d483704a5a1fdf6.d
│ ├── no_proto-aa3c6589db10b605.d
│ ├── no_proto-ae791f23982352cd.d
│ ├── no_proto-ba940134b4c1a3ac.d
│ ├── no_proto-c73899fa9d5a4e2e.d
│ ├── no_proto-d8cf3dffddd77550.d
│ └── no_proto-efe2ce7d02f8f240.d
├── package/
│ ├── no_proto-0.9.60/
│ │ ├── .cargo_vcs_info.json
│ │ ├── CHANGELOG.md
│ │ ├── Cargo.toml
│ │ ├── Cargo.toml.orig
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── buffer.rs
│ │ │ ├── collection/
│ │ │ │ ├── list.rs
│ │ │ │ ├── map.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── struc.rs
│ │ │ │ └── tuple.rs
│ │ │ ├── error.rs
│ │ │ ├── format.rs
│ │ │ ├── hashmap.rs
│ │ │ ├── idl.rs
│ │ │ ├── json_flex.rs
│ │ │ ├── lib.rs
│ │ │ ├── memory.rs
│ │ │ ├── pointer/
│ │ │ │ ├── any.rs
│ │ │ │ ├── bool.rs
│ │ │ │ ├── bytes.rs
│ │ │ │ ├── date.rs
│ │ │ │ ├── dec.rs
│ │ │ │ ├── geo.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── numbers.rs
│ │ │ │ ├── option.rs
│ │ │ │ ├── portal.rs
│ │ │ │ ├── string.rs
│ │ │ │ ├── ulid.rs
│ │ │ │ ├── union.rs
│ │ │ │ └── uuid.rs
│ │ │ ├── rpc.rs
│ │ │ ├── schema.rs
│ │ │ └── utils.rs
│ │ └── target/
│ │ ├── .rustc_info.json
│ │ ├── CACHEDIR.TAG
│ │ └── debug/
│ │ ├── .cargo-lock
│ │ ├── .fingerprint/
│ │ │ └── no_proto-d6c73808cf700296/
│ │ │ ├── dep-lib-no_proto
│ │ │ ├── invoked.timestamp
│ │ │ ├── lib-no_proto
│ │ │ └── lib-no_proto.json
│ │ ├── deps/
│ │ │ ├── libno_proto-d6c73808cf700296.rlib
│ │ │ ├── libno_proto-d6c73808cf700296.rmeta
│ │ │ └── no_proto-d6c73808cf700296.d
│ │ ├── incremental/
│ │ │ └── no_proto-3qu5d9195s2fa/
│ │ │ └── s-fx3rzdmmjm-18bks5k-2wqptzkhpfymz/
│ │ │ ├── 100zvx8sqgms7yao.o
│ │ │ ├── 11iag95g9k1r5eyg.o
│ │ │ ├── 11tt942yw3gl6w6j.o
│ │ │ ├── 11ubkt5vvp9qbq43.o
│ │ │ ├── 11vzpm5hf9bu8ymh.o
│ │ │ ├── 12n00tmiwnwxw4x5.o
│ │ │ ├── 12pwx2d3uqq2r7o3.o
│ │ │ ├── 13dgwjju0yyewxmu.o
│ │ │ ├── 14ro4lhdo34go3qh.o
│ │ │ ├── 14uydr737kwwqz1q.o
│ │ │ ├── 15bz6fbntl54m71v.o
│ │ │ ├── 15mh39nwjbcwzr96.o
│ │ │ ├── 17egp2whd2dugblv.o
│ │ │ ├── 18yyw1f532xcx611.o
│ │ │ ├── 1a6vq3jdbzpyqqzz.o
│ │ │ ├── 1bc3iz38mizgeurh.o
│ │ │ ├── 1bdkg9t4p7aa49mg.o
│ │ │ ├── 1cv9jk54xzbnkwwe.o
│ │ │ ├── 1gr7eaghjq6kh66w.o
│ │ │ ├── 1h9is57o6ueyr5yf.o
│ │ │ ├── 1hr8wozsrc0odsce.o
│ │ │ ├── 1kqemq46qhw91gde.o
│ │ │ ├── 1mm6jxl26kv2w5w.o
│ │ │ ├── 1oymp58xviu6kmdu.o
│ │ │ ├── 1p4tcqfz5qu64k1n.o
│ │ │ ├── 1tgdp93nk518p6lb.o
│ │ │ ├── 1u5en7gmon0stbjq.o
│ │ │ ├── 1uk09aus98x1fcdw.o
│ │ │ ├── 1zmfcdjd6gq5f76m.o
│ │ │ ├── 1zp47p9gvxkhg8rm.o
│ │ │ ├── 2041j4rd2c9vdtto.o
│ │ │ ├── 21x8hkxtjr93ocqa.o
│ │ │ ├── 22ksb9qfaojzkllm.o
│ │ │ ├── 23mytnugnofvpc1k.o
│ │ │ ├── 24g6fdg97fut59vz.o
│ │ │ ├── 25kqzwyxydzzmmfc.o
│ │ │ ├── 26rbdnzkddcfjn80.o
│ │ │ ├── 26z5s3uj6mgqu27o.o
│ │ │ ├── 273mtih8297mnhl.o
│ │ │ ├── 29rn58rlaxsmsdhh.o
│ │ │ ├── 2d92zzp7r2f2srg5.o
│ │ │ ├── 2h8memxx5w2ab8xa.o
│ │ │ ├── 2hzk6pkxh20qeyvo.o
│ │ │ ├── 2let3agjhes8hszq.o
│ │ │ ├── 2m4tz6iais3g6j8b.o
│ │ │ ├── 2nbyu8u7q9z8a7yq.o
│ │ │ ├── 2o5vtcg93b721b5w.o
│ │ │ ├── 2ob9m2ejmx9ta2kw.o
│ │ │ ├── 2oyschmdm8g4u3bq.o
│ │ │ ├── 2py65dwypimh54kd.o
│ │ │ ├── 2qnpbkpws3t61kd0.o
│ │ │ ├── 2rfgf26q748w8nda.o
│ │ │ ├── 2x7m2uim8dwt9ryx.o
│ │ │ ├── 2z4qe9ekl19e0nd6.o
│ │ │ ├── 2zoqal84hc1awxga.o
│ │ │ ├── 31k2qrnb96tdgzub.o
│ │ │ ├── 33jdmgjoup032j7d.o
│ │ │ ├── 33vm7ej7323a41w3.o
│ │ │ ├── 34sbj8qjnibb5vzk.o
│ │ │ ├── 35zi6bk0xq2t2a4r.o
│ │ │ ├── 38p7zh4prhcgtpym.o
│ │ │ ├── 39gs90pwr4ahejjs.o
│ │ │ ├── 39pt1bds4zeun3zv.o
│ │ │ ├── 3aw9xzy9urdgk277.o
│ │ │ ├── 3ca4z7optpq48sgf.o
│ │ │ ├── 3cqm8mc5s3w3jwbm.o
│ │ │ ├── 3dvo9vke2xp54az4.o
│ │ │ ├── 3f4h6h5a8u4psnxj.o
│ │ │ ├── 3fidzw8bo2xkn9qk.o
│ │ │ ├── 3funw30c4u8qcptj.o
│ │ │ ├── 3gpl5n74vl16dp1l.o
│ │ │ ├── 3hr6jjpend1fbnpx.o
│ │ │ ├── 3j5v6eqri4apvf0y.o
│ │ │ ├── 3jt1l7j0355uw8y8.o
│ │ │ ├── 3oe7o7pbwk6wbcfq.o
│ │ │ ├── 3ojb2ffhbpjvxt53.o
│ │ │ ├── 3p7m31na2sy1q3i2.o
│ │ │ ├── 3powsrsng6z9nwos.o
│ │ │ ├── 3qbp8vjygwoqyuuh.o
│ │ │ ├── 3skfd8w031qa9kff.o
│ │ │ ├── 3tf22gdcijvxj3y4.o
│ │ │ ├── 3ui1enrtka3f8psq.o
│ │ │ ├── 3vfw8hbs6041fe5s.o
│ │ │ ├── 3wooguttztqa99fa.o
│ │ │ ├── 3x9u5md7ioqd1e07.o
│ │ │ ├── 3xtms7x4n7yzohz7.o
│ │ │ ├── 3y20ttprujzichlw.o
│ │ │ ├── 40hh2p17ds70ezmq.o
│ │ │ ├── 40nsve19lm6mu2h9.o
│ │ │ ├── 43db2joh49ui8n4n.o
│ │ │ ├── 45r51elk92slqab3.o
│ │ │ ├── 46qflx5rbs9omtev.o
│ │ │ ├── 4730d2pomhow1bi0.o
│ │ │ ├── 48nf0owqn4lpindz.o
│ │ │ ├── 49twenxbswx7duz3.o
│ │ │ ├── 49u03kk1zzywsaaw.o
│ │ │ ├── 4bgapmze4epxook3.o
│ │ │ ├── 4cpa7sdc6cgp7t19.o
│ │ │ ├── 4ep2v5goyyhunnwj.o
│ │ │ ├── 4gglmv630h9orj05.o
│ │ │ ├── 4h3hqc86r40b5z6e.o
│ │ │ ├── 4i606q14g552vn2l.o
│ │ │ ├── 4jclbqt2cp5gyk1i.o
│ │ │ ├── 4jw1mhh26n6aug1p.o
│ │ │ ├── 4jz9pkgivbifer3j.o
│ │ │ ├── 4mi6ryztsb1jfj0x.o
│ │ │ ├── 4mwzhnescddvwetf.o
│ │ │ ├── 4mxmeblapqty0l6p.o
│ │ │ ├── 4n1s6swmhxaydea4.o
│ │ │ ├── 4p3iqe3zrx2b52d0.o
│ │ │ ├── 4q35ka4r1s48t9pt.o
│ │ │ ├── 4r4p190yu5mccdal.o
│ │ │ ├── 4rfmo4m0kaajsqjm.o
│ │ │ ├── 4rl82w5reifn9kgp.o
│ │ │ ├── 4sdnuqssdshysvt4.o
│ │ │ ├── 4subn6gdy3a0ggvs.o
│ │ │ ├── 4trz4jwr83gq0uh0.o
│ │ │ ├── 4vjpv8hbj9h5ja0m.o
│ │ │ ├── 4x7qrrsbv2eizn8m.o
│ │ │ ├── 4y3x960eu0904pon.o
│ │ │ ├── 4y4otpmmjho1x33s.o
│ │ │ ├── 4ytyxcz7xcz75hww.o
│ │ │ ├── 4zxqm4gbs67z9dxz.o
│ │ │ ├── 54hxyp93wpr3w2xh.o
│ │ │ ├── 57hmggqjfsqr1v09.o
│ │ │ ├── 58epi6n1rcquht6l.o
│ │ │ ├── 5biabrm9k90uk13i.o
│ │ │ ├── 5c530q0vz0vjt9g4.o
│ │ │ ├── 5c692wk1ti7iqhe4.o
│ │ │ ├── 5cb1xx7shw45lknz.o
│ │ │ ├── 5cjucmbxyynp2r67.o
│ │ │ ├── 5dbl5mjj8wkpsjgf.o
│ │ │ ├── 5evzxbtdt4l764qw.o
│ │ │ ├── 5frn0tcv0iny5pki.o
│ │ │ ├── 6xxtzj7rzihpmdx.o
│ │ │ ├── d4arbz7m98pdqoh.o
│ │ │ ├── ddj6ocdj6r4403e.o
│ │ │ ├── ecne6g4n0c28n94.o
│ │ │ ├── h5cwo8s7wezxhxn.o
│ │ │ ├── hgb5w3f9ivs0xca.o
│ │ │ ├── i4kyy20hoy1k0d2.o
│ │ │ ├── kymb80dlee7p7mg.o
│ │ │ ├── ng7tjeh1zyosfsj.o
│ │ │ ├── oxm053hhs2ij6im.o
│ │ │ ├── peyndyzl8jkh94k.o
│ │ │ ├── r6z7oj1jfl0jxqt.o
│ │ │ ├── s8m0rdhqo3uso4f.o
│ │ │ ├── td46wacb1m1wq8h.o
│ │ │ ├── yq9ovk1sauo3ske.o
│ │ │ ├── z0p1vtjbuwd9uz9.o
│ │ │ └── zxwh8vegkl4qe5j.o
│ │ ├── libno_proto.d
│ │ └── libno_proto.rlib
│ └── no_proto-0.9.60.crate
└── rls/
├── .rustc_info.json
├── CACHEDIR.TAG
└── debug/
├── .cargo-lock
├── .fingerprint/
│ ├── no_proto-087b92dbcadb4e9e/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-42633ea97bf6e77b/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-441091bf4a4eb675/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-45445c9cceb28ae6/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ ├── no_proto-7ecb4680266c38b6/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-8d483704a5a1fdf6/
│ │ ├── dep-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── lib-no_proto
│ │ └── lib-no_proto.json
│ ├── no_proto-aa3c6589db10b605/
│ │ ├── dep-test-lib-no_proto
│ │ ├── invoked.timestamp
│ │ ├── test-lib-no_proto
│ │ └── test-lib-no_proto.json
│ └── no_proto-efe2ce7d02f8f240/
│ ├── dep-lib-no_proto
│ ├── invoked.timestamp
│ ├── lib-no_proto
│ └── lib-no_proto.json
└── deps/
├── libno_proto-aa3c6589db10b605.rmeta
├── libno_proto-efe2ce7d02f8f240.rmeta
├── no_proto-087b92dbcadb4e9e.d
├── no_proto-42633ea97bf6e77b.d
├── no_proto-441091bf4a4eb675.d
├── no_proto-45445c9cceb28ae6.d
├── no_proto-7ecb4680266c38b6.d
├── no_proto-8d483704a5a1fdf6.d
├── no_proto-aa3c6589db10b605.d
├── no_proto-efe2ce7d02f8f240.d
└── save-analysis/
├── libno_proto-087b92dbcadb4e9e.json
└── no_proto-441091bf4a4eb675.json
Showing preview only (328K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3459 symbols across 134 files)
FILE: bench/src/bench_fb.rs
type Enum (line 19) | pub enum Enum {
type Inner (line 30) | type Inner = Self;
method follow (line 32) | fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
method to_little_endian (line 39) | fn to_little_endian(self) -> Self {
method from_little_endian (line 45) | fn from_little_endian(self) -> Self {
type Output (line 53) | type Output = Enum;
method push (line 55) | fn push(&self, dst: &mut [u8], _rest: &[u8]) {
constant ENUM_MIN_ENUM (line 26) | pub const ENUM_MIN_ENUM: i16 = 0;
constant ENUM_MAX_ENUM (line 27) | pub const ENUM_MAX_ENUM: i16 = 2;
constant ENUM_VALUES_ENUM (line 61) | pub const ENUM_VALUES_ENUM:[Enum; 3] = [
constant ENUM_NAMES_ENUM (line 68) | pub const ENUM_NAMES_ENUM:[&'static str; 3] = [
function enum_name_enum (line 74) | pub fn enum_name_enum(e: Enum) -> &'static str {
type Bar (line 82) | pub struct Bar {
type Inner (line 90) | type Inner = &'a Bar;
method follow (line 92) | fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
type Output (line 104) | type Output = Bar;
method push (line 106) | fn push(&self, dst: &mut [u8], _rest: &[u8]) {
method new (line 127) | pub fn new<'a>(_time: i32, _ratio: f32, _size_: u16) -> Self {
method time (line 136) | pub fn time<'a>(&'a self) -> i32 {
method ratio (line 139) | pub fn ratio<'a>(&'a self) -> f32 {
method size_ (line 142) | pub fn size_<'a>(&'a self) -> u16 {
type Inner (line 97) | type Inner = &'a Bar;
function follow (line 99) | fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
type Output (line 114) | type Output = Bar;
function push (line 117) | fn push(&self, dst: &mut [u8], _rest: &[u8]) {
type FooBarOffset (line 147) | pub enum FooBarOffset {}
type FooBar (line 150) | pub struct FooBar<'a> {
type Inner (line 155) | type Inner = FooBar<'a>;
function follow (line 157) | fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
function init_from_table (line 166) | pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
function create (line 172) | pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
constant VT_SIBLING (line 183) | pub const VT_SIBLING: flatbuffers::VOffsetT = 4;
constant VT_NAME (line 184) | pub const VT_NAME: flatbuffers::VOffsetT = 6;
constant VT_RATING (line 185) | pub const VT_RATING: flatbuffers::VOffsetT = 8;
constant VT_POSTFIX (line 186) | pub const VT_POSTFIX: flatbuffers::VOffsetT = 10;
function sibling (line 189) | pub fn sibling(&self) -> Option<&'a Bar> {
function name (line 193) | pub fn name(&self) -> Option<&'a str> {
function rating (line 197) | pub fn rating(&self) -> f64 {
function postfix (line 201) | pub fn postfix(&self) -> u8 {
type FooBarArgs (line 206) | pub struct FooBarArgs<'a> {
method default (line 214) | fn default() -> Self {
type FooBarBuilder (line 223) | pub struct FooBarBuilder<'a: 'b, 'b> {
function add_sibling (line 229) | pub fn add_sibling(&mut self, sibling: &'b Bar) {
function add_name (line 233) | pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
function add_rating (line 237) | pub fn add_rating(&mut self, rating: f64) {
function add_postfix (line 241) | pub fn add_postfix(&mut self, postfix: u8) {
function new (line 245) | pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FooBarBu...
function finish (line 253) | pub fn finish(self) -> flatbuffers::WIPOffset<FooBar<'a>> {
type FooBarContainerOffset (line 259) | pub enum FooBarContainerOffset {}
type FooBarContainer (line 262) | pub struct FooBarContainer<'a> {
type Inner (line 267) | type Inner = FooBarContainer<'a>;
function follow (line 269) | fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
function init_from_table (line 278) | pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
function create (line 284) | pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
constant VT_LIST (line 295) | pub const VT_LIST: flatbuffers::VOffsetT = 4;
constant VT_INITIALIZED (line 296) | pub const VT_INITIALIZED: flatbuffers::VOffsetT = 6;
constant VT_FRUIT (line 297) | pub const VT_FRUIT: flatbuffers::VOffsetT = 8;
constant VT_LOCATION (line 298) | pub const VT_LOCATION: flatbuffers::VOffsetT = 10;
function list (line 301) | pub fn list(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::Forwar...
function initialized (line 305) | pub fn initialized(&self) -> bool {
function fruit (line 309) | pub fn fruit(&self) -> Enum {
function location (line 313) | pub fn location(&self) -> Option<&'a str> {
type FooBarContainerArgs (line 318) | pub struct FooBarContainerArgs<'a> {
method default (line 326) | fn default() -> Self {
type FooBarContainerBuilder (line 335) | pub struct FooBarContainerBuilder<'a: 'b, 'b> {
function add_list (line 341) | pub fn add_list(&mut self, list: flatbuffers::WIPOffset<flatbuffers::Vec...
function add_initialized (line 345) | pub fn add_initialized(&mut self, initialized: bool) {
function add_fruit (line 349) | pub fn add_fruit(&mut self, fruit: Enum) {
function add_location (line 353) | pub fn add_location(&mut self, location: flatbuffers::WIPOffset<&'b str...
function new (line 357) | pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FooBarCo...
function finish (line 365) | pub fn finish(self) -> flatbuffers::WIPOffset<FooBarContainer<'a>> {
function get_root_as_foo_bar_container (line 372) | pub fn get_root_as_foo_bar_container<'a>(buf: &'a [u8]) -> FooBarContain...
function get_size_prefixed_root_as_foo_bar_container (line 377) | pub fn get_size_prefixed_root_as_foo_bar_container<'a>(buf: &'a [u8]) ->...
function finish_foo_bar_container_buffer (line 382) | pub fn finish_foo_bar_container_buffer<'a, 'b>(
function finish_size_prefixed_foo_bar_container_buffer (line 389) | pub fn finish_size_prefixed_foo_bar_container_buffer<'a, 'b>(fbb: &'b mu...
FILE: bench/src/bench_pb.rs
type Bar (line 27) | pub struct Bar {
method new (line 44) | pub fn new() -> Bar {
method get_time (line 51) | pub fn get_time(&self) -> i32 {
method clear_time (line 54) | pub fn clear_time(&mut self) {
method has_time (line 58) | pub fn has_time(&self) -> bool {
method set_time (line 63) | pub fn set_time(&mut self, v: i32) {
method get_ratio (line 70) | pub fn get_ratio(&self) -> f32 {
method clear_ratio (line 73) | pub fn clear_ratio(&mut self) {
method has_ratio (line 77) | pub fn has_ratio(&self) -> bool {
method set_ratio (line 82) | pub fn set_ratio(&mut self, v: f32) {
method get_size (line 89) | pub fn get_size(&self) -> u32 {
method clear_size (line 92) | pub fn clear_size(&mut self) {
method has_size (line 96) | pub fn has_size(&self) -> bool {
method set_size (line 101) | pub fn set_size(&mut self, v: u32) {
method is_initialized (line 107) | fn is_initialized(&self) -> bool {
method merge_from (line 120) | fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) ->...
method compute_size (line 155) | fn compute_size(&self) -> u32 {
method write_to_with_cached_sizes (line 171) | fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputS...
method get_cached_size (line 185) | fn get_cached_size(&self) -> u32 {
method get_unknown_fields (line 189) | fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
method mut_unknown_fields (line 193) | fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
method as_any (line 197) | fn as_any(&self) -> &dyn (::std::any::Any) {
method as_any_mut (line 200) | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
method into_any (line 203) | fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (:...
method descriptor (line 207) | fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
method new (line 211) | fn new() -> Bar {
method descriptor_static (line 215) | fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescrip...
method default_instance (line 242) | fn default_instance() -> &'static Bar {
method clear (line 249) | fn clear(&mut self) {
method fmt (line 258) | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
method as_ref (line 264) | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
function default (line 38) | fn default() -> &'a Bar {
type FooBar (line 270) | pub struct FooBar {
method new (line 288) | pub fn new() -> FooBar {
method get_sibling (line 295) | pub fn get_sibling(&self) -> &Bar {
method clear_sibling (line 298) | pub fn clear_sibling(&mut self) {
method has_sibling (line 302) | pub fn has_sibling(&self) -> bool {
method set_sibling (line 307) | pub fn set_sibling(&mut self, v: Bar) {
method mut_sibling (line 313) | pub fn mut_sibling(&mut self) -> &mut Bar {
method take_sibling (line 321) | pub fn take_sibling(&mut self) -> Bar {
method get_name (line 328) | pub fn get_name(&self) -> &str {
method clear_name (line 334) | pub fn clear_name(&mut self) {
method has_name (line 338) | pub fn has_name(&self) -> bool {
method set_name (line 343) | pub fn set_name(&mut self, v: ::std::string::String) {
method mut_name (line 349) | pub fn mut_name(&mut self) -> &mut ::std::string::String {
method take_name (line 357) | pub fn take_name(&mut self) -> ::std::string::String {
method get_rating (line 364) | pub fn get_rating(&self) -> f64 {
method clear_rating (line 367) | pub fn clear_rating(&mut self) {
method has_rating (line 371) | pub fn has_rating(&self) -> bool {
method set_rating (line 376) | pub fn set_rating(&mut self, v: f64) {
method get_postfix (line 383) | pub fn get_postfix(&self) -> u32 {
method clear_postfix (line 386) | pub fn clear_postfix(&mut self) {
method has_postfix (line 390) | pub fn has_postfix(&self) -> bool {
method set_postfix (line 395) | pub fn set_postfix(&mut self, v: u32) {
method is_initialized (line 401) | fn is_initialized(&self) -> bool {
method merge_from (line 410) | fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) ->...
method compute_size (line 444) | fn compute_size(&self) -> u32 {
method write_to_with_cached_sizes (line 464) | fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputS...
method get_cached_size (line 483) | fn get_cached_size(&self) -> u32 {
method get_unknown_fields (line 487) | fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
method mut_unknown_fields (line 491) | fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
method as_any (line 495) | fn as_any(&self) -> &dyn (::std::any::Any) {
method as_any_mut (line 498) | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
method into_any (line 501) | fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (:...
method descriptor (line 505) | fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
method new (line 509) | fn new() -> FooBar {
method descriptor_static (line 513) | fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescrip...
method default_instance (line 545) | fn default_instance() -> &'static FooBar {
method clear (line 552) | fn clear(&mut self) {
method fmt (line 562) | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
method as_ref (line 568) | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
function default (line 282) | fn default() -> &'a FooBar {
type FooBarContainer (line 574) | pub struct FooBarContainer {
method new (line 592) | pub fn new() -> FooBarContainer {
method get_list (line 599) | pub fn get_list(&self) -> &[FooBar] {
method clear_list (line 602) | pub fn clear_list(&mut self) {
method set_list (line 607) | pub fn set_list(&mut self, v: ::protobuf::RepeatedField<FooBar>) {
method mut_list (line 612) | pub fn mut_list(&mut self) -> &mut ::protobuf::RepeatedField<FooBar> {
method take_list (line 617) | pub fn take_list(&mut self) -> ::protobuf::RepeatedField<FooBar> {
method get_initialized (line 624) | pub fn get_initialized(&self) -> bool {
method clear_initialized (line 627) | pub fn clear_initialized(&mut self) {
method has_initialized (line 631) | pub fn has_initialized(&self) -> bool {
method set_initialized (line 636) | pub fn set_initialized(&mut self, v: bool) {
method get_fruit (line 643) | pub fn get_fruit(&self) -> Enum {
method clear_fruit (line 646) | pub fn clear_fruit(&mut self) {
method has_fruit (line 650) | pub fn has_fruit(&self) -> bool {
method set_fruit (line 655) | pub fn set_fruit(&mut self, v: Enum) {
method get_location (line 662) | pub fn get_location(&self) -> &str {
method clear_location (line 668) | pub fn clear_location(&mut self) {
method has_location (line 672) | pub fn has_location(&self) -> bool {
method set_location (line 677) | pub fn set_location(&mut self, v: ::std::string::String) {
method mut_location (line 683) | pub fn mut_location(&mut self) -> &mut ::std::string::String {
method take_location (line 691) | pub fn take_location(&mut self) -> ::std::string::String {
method is_initialized (line 697) | fn is_initialized(&self) -> bool {
method merge_from (line 706) | fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) ->...
method compute_size (line 736) | fn compute_size(&self) -> u32 {
method write_to_with_cached_sizes (line 756) | fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputS...
method get_cached_size (line 775) | fn get_cached_size(&self) -> u32 {
method get_unknown_fields (line 779) | fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
method mut_unknown_fields (line 783) | fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
method as_any (line 787) | fn as_any(&self) -> &dyn (::std::any::Any) {
method as_any_mut (line 790) | fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
method into_any (line 793) | fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (:...
method descriptor (line 797) | fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
method new (line 801) | fn new() -> FooBarContainer {
method descriptor_static (line 805) | fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescrip...
method default_instance (line 837) | fn default_instance() -> &'static FooBarContainer {
method clear (line 844) | fn clear(&mut self) {
method fmt (line 854) | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
method as_ref (line 860) | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
function default (line 586) | fn default() -> &'a FooBarContainer {
type Enum (line 866) | pub enum Enum {
method value (line 873) | fn value(&self) -> i32 {
method from_i32 (line 877) | fn from_i32(value: i32) -> ::std::option::Option<Enum> {
method values (line 886) | fn values() -> &'static [Self] {
method enum_descriptor_static (line 895) | fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescr...
method default (line 907) | fn default() -> Self {
method as_ref (line 913) | fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
function parse_descriptor_proto (line 1000) | fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorPro...
function file_descriptor_proto (line 1004) | pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileD...
FILE: bench/src/main.rs
constant LOOPS (line 18) | pub const LOOPS: usize = 1_000_000;
function main (line 57) | fn main() {
FILE: bench/src/run_bench_abomonation.rs
type Fruit (line 12) | enum Fruit {
type Bar (line 17) | struct Bar {
type FooBar (line 24) | struct FooBar {
type FooBarContainer (line 32) | struct FooBarContainer {
type AbomBench (line 39) | pub struct AbomBench();
method size_bench (line 43) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 55) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 69) | fn encode_single() -> Vec<u8> {
method update_bench (line 103) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 128) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 146) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_avro.rs
type Fruit (line 14) | enum Fruit {
type AvroBench (line 20) | pub struct AvroBench();
method setup_bench (line 23) | pub fn setup_bench() -> u128 {
method get_schema (line 34) | fn get_schema() -> Schema {
method size_bench (line 64) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 80) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 101) | fn encode_single(schema: &Schema) -> Vec<u8> {
method update_bench (line 142) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 220) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 256) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_bincode.rs
type Fruit (line 13) | enum Fruit {
type Bar (line 18) | struct Bar {
type FooBar (line 25) | struct FooBar<'fb> {
type FooBarContainer (line 33) | struct FooBarContainer<'con> {
type BincodeBench (line 40) | pub struct BincodeBench();
method size_bench (line 44) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 56) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 70) | fn encode_single() -> Vec<u8> {
method update_bench (line 100) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 120) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 135) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_bson.rs
type BSONBench (line 10) | pub struct BSONBench();
method size_bench (line 14) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 26) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 40) | fn encode_single() -> Vec<u8> {
method update_bench (line 69) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 92) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 108) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_flatbuffers.rs
type FlatBufferBench (line 20) | pub struct FlatBufferBench();
method setup_bench (line 24) | pub fn setup_bench() -> u128 {
method size_bench (line 35) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 47) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 63) | fn encode_single(fbb: &mut FlatBufferBuilder) -> Vec<u8> {
method update_bench (line 87) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 133) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 148) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_flexbuffers.rs
type Fruit (line 12) | enum Fruit {
type Bar (line 17) | struct Bar {
type FooBar (line 24) | struct FooBar<'fb> {
type FooBarContainer (line 32) | struct FooBarContainer<'con> {
type FlexBench (line 39) | pub struct FlexBench();
method size_bench (line 43) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 55) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 69) | fn encode_single() -> Vec<u8> {
method update_bench (line 103) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 127) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 143) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_json.rs
type JSONBench (line 10) | pub struct JSONBench();
method size_bench (line 14) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 26) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 41) | fn encode_single() -> Vec<u8> {
method update_bench (line 68) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 86) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 101) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_messagepack.rs
type MessagePackBench (line 17) | pub struct MessagePackBench();
method size_bench (line 21) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 33) | pub fn encode_bench(base: u128) -> std::string::String {
method encode_single (line 47) | fn encode_single() -> Vec<u8> {
method update_bench (line 85) | pub fn update_bench(base: u128) -> std::string::String {
method decode_one_bench (line 122) | pub fn decode_one_bench(base: u128) -> std::string::String {
method find (line 148) | pub fn find<'find>(container: &'find Vec<(rmpv::ValueRef, rmpv::ValueR...
method find_mut (line 155) | pub fn find_mut<'find>(container: &'find mut Vec<(rmpv::Value, rmpv::V...
method decode_bench (line 161) | pub fn decode_bench(base: u128) -> std::string::String {
FILE: bench/src/run_bench_messagepack_rs.rs
type MessagePackRSBench (line 13) | pub struct MessagePackRSBench();
method size_bench (line 17) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 29) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 43) | fn encode_single() -> Vec<u8> {
method update_bench (line 74) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 107) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 131) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_no_proto.rs
type NoProtoBench (line 11) | pub struct NoProtoBench();
method setup_bench (line 15) | pub fn setup_bench() -> u128 {
method size_bench (line 26) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 40) | pub fn encode_bench() -> Result<(u128, String), NP_Error> {
method update_bench (line 56) | pub fn update_bench() -> Result<(u128, String), NP_Error> {
method get_factory (line 78) | fn get_factory() -> Result<NP_Factory, NP_Error> {
method decode_one_bench (line 121) | pub fn decode_one_bench() -> Result<(u128, String), NP_Error> {
method decode_bench (line 137) | pub fn decode_bench() -> Result<(u128, String), NP_Error> {
method encode_single (line 176) | pub fn encode_single(factory: &NP_Factory) ->Result<Vec<u8>, NP_Error> {
FILE: bench/src/run_bench_postcard.rs
type Fruit (line 13) | enum Fruit {
type Bar (line 18) | struct Bar {
type FooBar (line 25) | struct FooBar<'fb> {
type FooBarContainer (line 33) | struct FooBarContainer<'con> {
type PostcardBench (line 40) | pub struct PostcardBench();
method size_bench (line 44) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 56) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 70) | fn encode_single() -> Vec<u8> {
method update_bench (line 100) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 120) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 135) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_prost.rs
type Bar (line 11) | pub struct Bar {
type FooBar (line 20) | pub struct FooBar {
type FooBarContainer (line 31) | pub struct FooBarContainer {
type Enum (line 44) | pub enum Enum {
type ProstBench (line 51) | pub struct ProstBench();
method size_bench (line 56) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 68) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 82) | fn encode_single() -> Vec<u8> {
method update_bench (line 113) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 133) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 150) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_protocol_buffers.rs
type ProtocolBufferBench (line 13) | pub struct ProtocolBufferBench();
method size_bench (line 18) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 30) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 45) | fn encode_single() -> Vec<u8> {
method update_bench (line 75) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 129) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 144) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_rawbson.rs
type RawBSONBench (line 13) | pub struct RawBSONBench();
method size_bench (line 17) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 29) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 43) | fn encode_single() -> Vec<u8> {
method update_bench (line 72) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 95) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 111) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_rkyv.rs
type Bar (line 13) | struct Bar {
type FooBar (line 20) | struct FooBar {
type FooBarContainer (line 28) | struct FooBarContainer {
type RkyvBench (line 35) | pub struct RkyvBench();
method size_bench (line 39) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 51) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 65) | fn encode_single() -> (Vec<u8>, usize) {
method update_bench (line 97) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 118) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 133) | pub fn decode_bench(base: u128) -> String {
FILE: bench/src/run_bench_serde_json.rs
type Fruit (line 12) | enum Fruit {
type Bar (line 17) | struct Bar {
type FooBar (line 24) | struct FooBar {
type FooBarContainer (line 32) | struct FooBarContainer {
type SerdeJSONBench (line 39) | pub struct SerdeJSONBench();
method size_bench (line 43) | pub fn size_bench() -> (usize, usize) {
method encode_bench (line 55) | pub fn encode_bench(base: u128) -> String {
method encode_single (line 69) | fn encode_single() -> Vec<u8> {
method update_bench (line 99) | pub fn update_bench(base: u128) -> String {
method decode_one_bench (line 119) | pub fn decode_one_bench(base: u128) -> String {
method decode_bench (line 134) | pub fn decode_bench(base: u128) -> String {
FILE: examples/quick.rs
function main (line 3) | fn main() -> Result<(), NP_Error> {
FILE: no_proto_js/src/buffer.rs
constant DEFAULT_ROOT_PTR_ADDR (line 21) | pub const DEFAULT_ROOT_PTR_ADDR: usize = 1;
constant LIST_MAX_SIZE (line 24) | pub const LIST_MAX_SIZE: usize = core::u16::MAX as usize;
constant VTABLE_SIZE (line 26) | pub const VTABLE_SIZE: usize = 4;
constant VTABLE_BYTES (line 28) | pub const VTABLE_BYTES: usize = 10;
type NP_Buffer (line 37) | pub struct NP_Buffer {
method _new (line 56) | pub fn _new(memory: NP_Memory_Writable) -> Self { // make new buffer
method json_encode (line 99) | pub fn json_encode(&self, path: &[&str]) -> Result<NP_JSON, NP_Error> {
method close (line 132) | pub fn close(self) -> Vec<u8> {
method close_sortable (line 178) | pub fn close_sortable(self) -> Result<Vec<u8>, NP_Error> {
method read_bytes (line 204) | pub fn read_bytes(&self) -> &[u8] {
method move_cursor (line 212) | pub fn move_cursor(&mut self, path: &[&str]) -> Result<bool, NP_Error> {
method cursor_to_root (line 229) | pub fn cursor_to_root(&mut self) {
method set (line 263) | pub fn set<'set, X>(&mut self, path: &[&str], value: X) -> Result<bool...
method get_iter (line 433) | pub fn get_iter<'iter>(&'iter self, path: &'iter [&str]) -> Result<Opt...
method list_push (line 504) | pub fn list_push<'set, X>(&mut self, path: &[&str], value: X) -> Resul...
method length (line 650) | pub fn length(&self, path: &[&str]) -> Result<Option<usize>, NP_Error> {
method del (line 750) | pub fn del(&mut self, path: &[&str]) -> Result<bool, NP_Error> {
method get (line 811) | pub fn get<'get, X: 'get>(&'get self, path: &[&str]) -> Result<Option<...
method maybe_compact (line 900) | pub fn maybe_compact<F>(&mut self, new_capacity: Option<u32>, mut call...
method compact (line 956) | pub fn compact<'compact>(&mut self, new_capacity: Option<u32>) -> Resu...
method calc_bytes (line 1000) | pub fn calc_bytes<'bytes>(&self) -> Result<NP_Size_Data, NP_Error> {
method select (line 1017) | fn select(&self, cursor: NP_Cursor, make_path: bool, path: &[&str]) ->...
method clone (line 44) | fn clone(&self) -> Self {
type NP_Item (line 1088) | pub struct NP_Item<'item> {
function has_value (line 1104) | pub fn has_value(&self) -> bool {
function get (line 1113) | pub fn get<X>(&'item self) -> Result<Option<X>, NP_Error> where X: NP_Va...
function set (line 1136) | pub fn set<X>(&'item mut self, value: X) -> Result<(), NP_Error> where X...
function del (line 1162) | pub fn del(&'item mut self) -> bool {
type NP_Iterator_Collection (line 1178) | pub enum NP_Iterator_Collection {
method new (line 1193) | pub fn new<M: NP_Memory>(cursor: NP_Cursor, memory: &M) -> Result<Self...
type NP_Generic_Iterator (line 1218) | pub struct NP_Generic_Iterator<'it> {
function new (line 1227) | pub fn new(cursor: NP_Cursor, memory: &'it NP_Memory_Writable) -> Result...
type Item (line 1239) | type Item = NP_Item<'it>;
method next (line 1241) | fn next(&mut self) -> Option<Self::Item> {
FILE: no_proto_js/src/collection/list.rs
type List_Item (line 12) | struct List_Item {
type NP_List (line 21) | pub struct NP_List {
method select (line 37) | pub fn select<M: NP_Memory>(list_cursor: NP_Cursor, index: usize, make...
method make_item_in_loop (line 124) | pub fn make_item_in_loop<M: NP_Memory>(self, memory: &M) -> Result<NP_...
method make_list (line 157) | pub fn make_list<'make, M: NP_Memory>(list_cursor: &NP_Cursor, memory:...
method get_list (line 165) | pub fn get_list<'list, M: NP_Memory>(list_cursor_value_addr: usize, me...
method new_iter (line 174) | pub fn new_iter<M: NP_Memory>(list_cursor: &NP_Cursor, memory: &M, onl...
method step_iter (line 224) | pub fn step_iter<M: NP_Memory>(&mut self, memory: &M) -> Option<(usize...
method push (line 279) | pub fn push<'push, M: NP_Memory>(list_cursor: &NP_Cursor, memory: &M, ...
method type_idx (line 334) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("list", NP_TypeKeys::Li...
method self_type_idx (line 335) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("list", NP_Ty...
method schema_to_json (line 337) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method get_size (line 352) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<us...
method to_json (line 376) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method do_compact (line 399) | fn do_compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, fro...
method from_json_to_schema (line 421) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method default_value (line 449) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
method from_bytes_to_schema (line 453) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
FILE: no_proto_js/src/collection/map.rs
type Map_Item (line 15) | struct Map_Item<'item> {
function new (line 21) | pub fn new(key: &'item str, buff_addr: usize) -> Self {
type NP_Map (line 30) | pub struct NP_Map<'map> {
function select (line 41) | pub fn select<M: NP_Memory>(map_cursor: NP_Cursor, key: &str, make_path:...
function get_map (line 61) | pub fn get_map<'get, M: NP_Memory>(map_buff_addr: usize, memory: &'get M...
function new_iter (line 70) | pub fn new_iter<M: NP_Memory>(map_cursor: &NP_Cursor, memory: &'map M) -...
function step_iter (line 100) | pub fn step_iter<M: NP_Memory>(&mut self, memory: &'map M) -> Option<(&'...
function insert (line 133) | pub fn insert<M: NP_Memory>(map_cursor: &NP_Cursor, memory: &M, key: &st...
function type_idx (line 171) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("map", NP_TypeKeys::Map) }
function self_type_idx (line 172) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("map", NP_TypeK...
function schema_to_json (line 174) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 188) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Resu...
function to_json (line 212) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function do_compact (line 232) | fn do_compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, from_...
function from_json_to_schema (line 251) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 279) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
function from_bytes_to_schema (line 283) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
FILE: no_proto_js/src/collection/table.rs
type NP_Table (line 17) | pub struct NP_Table<'table> {
function select (line 29) | pub fn select<M: NP_Memory>(mut table_cursor: NP_Cursor, columns: &Vec<(...
function make_first_vtable (line 76) | pub fn make_first_vtable<'make, M: NP_Memory>(table_cursor: NP_Cursor, m...
function make_next_vtable (line 87) | pub fn make_next_vtable<'make, M: NP_Memory>(prev_vtable: &'make mut NP_...
function new_iter (line 97) | pub fn new_iter<M: NP_Memory>(cursor: &NP_Cursor, memory: &'table M) -> ...
function get_vtable (line 117) | pub fn get_vtable<'vtable, M: NP_Memory>(v_table_addr: usize, memory: &'...
function step_iter (line 126) | pub fn step_iter<M: NP_Memory>(&mut self, memory: &'table M) -> Option<(...
function type_idx (line 172) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("table", NP_TypeKeys::Tab...
function self_type_idx (line 173) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("table", NP_Typ...
function from_bytes_to_schema (line 175) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_to_json (line 228) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 249) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Resu...
function to_json (line 282) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function do_compact (line 303) | fn do_compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, from_...
function from_json_to_schema (line 346) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 433) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
FILE: no_proto_js/src/collection/tuple.rs
type NP_Tuple (line 18) | pub struct NP_Tuple<'tuple> {
function select (line 31) | pub fn select<M: NP_Memory>(mut tuple_cursor: NP_Cursor, values: &Vec<us...
function make_first_vtable (line 78) | pub fn make_first_vtable<'make, M: NP_Memory>(table_cursor: NP_Cursor, m...
function make_next_vtable (line 113) | pub fn make_next_vtable<'make, M: NP_Memory>(prev_vtable: &'make mut NP_...
function new_iter (line 122) | pub fn new_iter<M: NP_Memory>(cursor: &NP_Cursor, memory: &'tuple M) -> ...
function get_vtable (line 142) | pub fn get_vtable<'vtable, M: NP_Memory>(v_table_addr: usize, memory: &'...
function step_iter (line 150) | pub fn step_iter<M: NP_Memory>(&mut self, memory: &'tuple M) -> Option<(...
function type_idx (line 199) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("tuple", NP_TypeKeys::Tup...
function self_type_idx (line 200) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("tuple", NP_Typ...
function schema_to_json (line 202) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 224) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Resu...
function to_json (line 257) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function do_compact (line 279) | fn do_compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, from_...
function from_json_to_schema (line 323) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 398) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
function from_bytes_to_schema (line 402) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize, b...
FILE: no_proto_js/src/error.rs
type NP_Error (line 10) | pub struct NP_Error {
method new (line 17) | pub fn new<S: AsRef<str>>(message: S) -> Self {
method unwrap (line 21) | pub fn unwrap<T>(value: Option<T>) -> Result<T, NP_Error> {
method from (line 30) | fn from(err: FromUtf8Error) -> NP_Error {
method from (line 36) | fn from(err: core::num::ParseFloatError) -> NP_Error {
method from (line 42) | fn from(err: core::num::ParseIntError) -> NP_Error {
FILE: no_proto_js/src/hashmap.rs
type NP_HashMap (line 9) | pub struct NP_HashMap {
method empty (line 17) | pub fn empty() -> Self {
method new (line 21) | pub fn new() -> Self {
method insert (line 27) | pub fn insert(&mut self, key: &str, value: usize) -> Result<(), NP_Err...
method get (line 48) | pub fn get(&self, key: &str) -> Option<&usize> {
method delete (line 72) | pub fn delete(&mut self, key: &str) {
constant HASH_SIZE (line 13) | const HASH_SIZE: usize = 2048;
function fmix32 (line 109) | fn fmix32(mut h: u32) -> u32 {
function get_32_block (line 120) | fn get_32_block(bytes: &[u8], index: usize) -> u32 {
function murmurhash3_x86_32 (line 127) | pub fn murmurhash3_x86_32(bytes: &[u8], seed: u32) -> u32 {
FILE: no_proto_js/src/json_flex.rs
type JSMAP (line 48) | pub struct JSMAP {
method new (line 56) | pub fn new() -> Self {
method insert (line 61) | pub fn insert(&mut self, key: String, value: NP_JSON) -> usize {
method get_mut (line 76) | pub fn get_mut(&mut self, key: &str) -> Option<&mut NP_JSON> {
method get (line 86) | pub fn get(&self, key: &str) -> Option<&NP_JSON> {
method has (line 96) | pub fn has(&self, key: &str) -> bool {
type NP_JSON (line 108) | pub enum NP_JSON {
method clone (line 133) | pub fn clone(&self) -> NP_JSON {
method into_string (line 179) | pub fn into_string(&self) -> Option<&String> {
method into_i64 (line 186) | pub fn into_i64(&self) -> Option<&i64> {
method into_f64 (line 193) | pub fn into_f64(&self) -> Option<&f64> {
method into_hashmap (line 200) | pub fn into_hashmap(&self) -> Option<&JSMAP> {
method into_vec (line 207) | pub fn into_vec(&self) -> Option<&Vec<NP_JSON>> {
method is_null (line 214) | pub fn is_null(&self) -> bool {
method is_true (line 221) | pub fn is_true(&self) -> bool {
method is_false (line 228) | pub fn is_false(&self) -> bool {
method is_array (line 235) | pub fn is_array(&self) -> bool {
method is_dictionary (line 242) | pub fn is_dictionary(&self) -> bool {
method is_string (line 249) | pub fn is_string(&self) -> bool {
method is_integer (line 256) | pub fn is_integer(&self) -> bool {
method is_float (line 263) | pub fn is_float(&self) -> bool {
method unwrap_string (line 270) | pub fn unwrap_string(&self) -> Option<&String> {
method unwrap_i64 (line 277) | pub fn unwrap_i64(&self) -> Option<&i64> {
method unwrap_f64 (line 284) | pub fn unwrap_f64(&self) -> Option<&f64> {
method unwrap_hashmap (line 291) | pub fn unwrap_hashmap(&self) -> Option<&JSMAP> {
method unwrap_vec (line 298) | pub fn unwrap_vec(&self) -> Option<&Vec<NP_JSON>> {
method stringify (line 305) | pub fn stringify(&self) -> String {
type Output (line 357) | type Output = NP_JSON;
method index (line 358) | fn index<'a>(&'a self, id: usize) -> &'a Self::Output {
type Output (line 372) | type Output = NP_JSON;
method index (line 373) | fn index<'a>(&'a self, id: String) -> &'a Self::Output {
type Output (line 379) | type Output = NP_JSON;
method index (line 380) | fn index<'b>(&'b self, id: &str) -> &'b Self::Output {
function recursive (line 394) | fn recursive(v: &mut NP_JSON,
function json_decode (line 489) | pub fn json_decode<'json>(text: String) -> Result<Box<NP_JSON>, NP_Error> {
FILE: no_proto_js/src/lib.rs
type NP_Factory (line 298) | pub struct NP_Factory {
method new (line 330) | pub fn new(json_schema: String) -> Self {
method new_compiled (line 349) | pub fn new_compiled(schema_bytes: Vec<u8>) -> Self {
method compile_schema (line 365) | pub fn compile_schema(&self) -> Vec<u8> {
type NP_Schema_Bytes (line 306) | pub enum NP_Schema_Bytes {
type NP_Size_Data (line 313) | pub struct NP_Size_Data {
FILE: no_proto_js/src/lib_wasm.rs
type NP_Factory (line 296) | pub struct NP_Factory {
method new (line 329) | pub fn new(json_schema: String) -> Self {
type NP_Schema_Bytes (line 303) | pub enum NP_Schema_Bytes<'bytes> {
type NP_Size_Data (line 312) | pub struct NP_Size_Data {
FILE: no_proto_js/src/memory.rs
type NP_Memory (line 12) | pub trait NP_Memory {
method is_mutable (line 13) | fn is_mutable(&self) -> bool;
method get_root (line 14) | fn get_root(&self) -> usize;
method get_schemas (line 15) | fn get_schemas(&self) -> &Vec<NP_Parsed_Schema>;
method get_schema (line 16) | fn get_schema(&self, idx: usize) -> &NP_Parsed_Schema;
method malloc_borrow (line 17) | fn malloc_borrow(&self, bytes: &[u8]) -> Result<usize, NP_Error>;
method malloc (line 18) | fn malloc(&self, bytes: Vec<u8>) -> Result<usize, NP_Error>;
method read_bytes (line 19) | fn read_bytes(&self) -> &[u8];
method write_bytes (line 20) | fn write_bytes(&self) -> &mut [u8];
method get_1_byte (line 21) | fn get_1_byte(&self, address: usize) -> Option<u8>;
method get_2_bytes (line 22) | fn get_2_bytes(&self, address: usize) -> Option<&[u8; 2]>;
method get_4_bytes (line 23) | fn get_4_bytes(&self, address: usize) -> Option<&[u8; 4]>;
method get_8_bytes (line 24) | fn get_8_bytes(&self, address: usize) -> Option<&[u8; 8]>;
method get_16_bytes (line 25) | fn get_16_bytes(&self, address: usize) -> Option<&[u8; 16]>;
method get_32_bytes (line 26) | fn get_32_bytes(&self, address: usize) -> Option<&[u8; 32]>;
method dump (line 27) | fn dump(self) -> Vec<u8>;
method is_mutable (line 83) | fn is_mutable(&self) -> bool {
method get_root (line 88) | fn get_root(&self) -> usize {
method get_schemas (line 93) | fn get_schemas(&self) -> &Vec<NP_Parsed_Schema> {
method get_schema (line 98) | fn get_schema(&self, idx: usize) -> &NP_Parsed_Schema {
method malloc_borrow (line 103) | fn malloc_borrow(&self, bytes: &[u8]) -> Result<usize, NP_Error> {
method malloc (line 118) | fn malloc(&self, bytes: Vec<u8>) -> Result<usize, NP_Error> {
method read_bytes (line 123) | fn read_bytes(&self) -> &[u8] {
method write_bytes (line 129) | fn write_bytes(&self) -> &mut [u8] {
method get_1_byte (line 135) | fn get_1_byte(&self, address: usize) -> Option<u8> {
method get_2_bytes (line 148) | fn get_2_bytes(&self, address: usize) -> Option<&[u8; 2]> {
method get_4_bytes (line 167) | fn get_4_bytes(&self, address: usize) -> Option<&[u8; 4]> {
method get_8_bytes (line 186) | fn get_8_bytes(&self, address: usize) -> Option<&[u8; 8]> {
method get_16_bytes (line 205) | fn get_16_bytes(&self, address: usize) -> Option<&[u8; 16]> {
method get_32_bytes (line 224) | fn get_32_bytes(&self, address: usize) -> Option<&[u8; 32]> {
method dump (line 242) | fn dump(self) -> Vec<u8> {
type NP_Memory_Writable (line 32) | pub struct NP_Memory_Writable {
method clone (line 41) | pub fn clone(&self) -> Self {
method existing (line 50) | pub fn existing(bytes: Vec<u8>, schema: Vec<NP_Parsed_Schema>, root: u...
method new (line 60) | pub fn new(capacity: Option<usize>, schema: Vec<NP_Parsed_Schema>, roo...
FILE: no_proto_js/src/pointer/any.rs
type NP_Any (line 14) | pub struct NP_Any { }
method type_idx (line 19) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("any", NP_TypeKeys::Any) }
method self_type_idx (line 20) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("any", NP_Typ...
method schema_to_json (line 22) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> ...
method set_value (line 29) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, v...
method into_value (line 32) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> ...
method to_json (line 35) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method get_size (line 38) | fn get_size<M: NP_Memory>(_cursor: &NP_Cursor, _memory: &M) -> Result<...
method do_compact (line 41) | fn do_compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, fro...
method from_json_to_schema (line 44) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema...
method default_value (line 56) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
method from_bytes_to_schema (line 60) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: u...
method default (line 70) | fn default() -> Self {
FILE: no_proto_js/src/pointer/bool.rs
function type_idx (line 36) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("bool", NP_TypeKeys::Bool...
function self_type_idx (line 37) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("bool", NP_Type...
function schema_to_json (line 39) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function default_value (line 58) | fn default_value(schema: &NP_Parsed_Schema) -> Option<Self> {
function set_value (line 71) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, val...
function into_value (line 104) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Re...
function to_json (line 123) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function get_size (line 161) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<usiz...
function from_json_to_schema (line 170) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function from_bytes_to_schema (line 199) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
FILE: no_proto_js/src/pointer/bytes.rs
type NP_Bytes (line 33) | pub type NP_Bytes<'bytes> = &'bytes [u8];
function type_idx (line 40) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("bytes", NP_TypeKeys::Byt...
function self_type_idx (line 41) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("bytes", NP_Typ...
function schema_to_json (line 43) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function default_value (line 68) | fn default_value(schema: &'value NP_Parsed_Schema) -> Option<Self> {
function set_value (line 83) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, val...
function into_value (line 182) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Re...
function to_json (line 222) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function get_size (line 259) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<usiz...
function from_json_to_schema (line 286) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function from_bytes_to_schema (line 354) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
FILE: no_proto_js/src/pointer/date.rs
type NP_Date (line 43) | pub struct NP_Date {
method new (line 52) | pub fn new(time_ms: u64) -> Self {
method type_idx (line 71) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("date", NP_TypeKeys::Da...
method self_type_idx (line 72) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("date", NP_Ty...
method schema_to_json (line 74) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 90) | fn default_value(schema: &NP_Parsed_Schema) -> Option<Self> {
method set_value (line 103) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, v...
method into_value (line 129) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> ...
method to_json (line 148) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method get_size (line 176) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<us...
method from_json_to_schema (line 187) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 214) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 58) | fn default() -> Self {
method fmt (line 64) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
FILE: no_proto_js/src/pointer/dec.rs
type NP_Dec (line 86) | pub struct NP_Dec {
method to_float (line 108) | pub fn to_float(&self) -> f64 {
method shift_exp (line 135) | pub fn shift_exp(&mut self, new_exp: u8) -> NP_Dec {
method new (line 185) | pub fn new(num: i64, exp: u8) -> Self {
method match_exp (line 205) | pub fn match_exp(&self, other: &NP_Dec) -> NP_Dec {
method export (line 226) | pub fn export(&self) -> (i64, u8) {
method ne (line 252) | fn ne(&self, other: &NP_Dec) -> bool {
method eq (line 264) | fn eq(&self, other: &NP_Dec) -> bool {
method lt (line 299) | fn lt(&self, other: &NP_Dec) -> bool {
method le (line 308) | fn le(&self, other: &NP_Dec) -> bool {
method gt (line 317) | fn gt(&self, other: &NP_Dec) -> bool {
method ge (line 326) | fn ge(&self, other: &NP_Dec) -> bool {
method partial_cmp (line 335) | fn partial_cmp(&self, other: &NP_Dec) -> Option<core::cmp::Ordering> {
method into (line 367) | fn into(self) -> i32 {
method into (line 404) | fn into(self) -> i64 {
method into (line 484) | fn into(self) -> f64 {
method into (line 530) | fn into(self) -> f32 {
method div_assign (line 567) | fn div_assign(&mut self, other: NP_Dec) {
type Output (line 578) | type Output = NP_Dec;
method div (line 579) | fn div(mut self, other: NP_Dec) -> <Self as core::ops::Sub<NP_Dec>>::O...
method sub_assign (line 591) | fn sub_assign(&mut self, other: NP_Dec) {
type Output (line 602) | type Output = NP_Dec;
method sub (line 603) | fn sub(mut self, other: NP_Dec) -> <Self as core::ops::Sub<NP_Dec>>::O...
method add_assign (line 615) | fn add_assign(&mut self, other: NP_Dec) {
type Output (line 626) | type Output = NP_Dec;
method add (line 627) | fn add(mut self, other: NP_Dec) -> <Self as core::ops::Add<NP_Dec>>::O...
method mul_assign (line 639) | fn mul_assign(&mut self, other: NP_Dec) {
type Output (line 650) | type Output = NP_Dec;
method mul (line 651) | fn mul(mut self, other: NP_Dec) -> <Self as core::ops::Mul<NP_Dec>>::O...
method type_idx (line 672) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("decimal", NP_TypeKeys:...
method self_type_idx (line 673) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("decimal", NP...
method schema_to_json (line 675) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 694) | fn default_value(schema: &NP_Parsed_Schema) -> Option<Self> {
method set_value (line 708) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, v...
method into_value (line 756) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> ...
method to_json (line 785) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method get_size (line 831) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<us...
method from_json_to_schema (line 842) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 895) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
function into (line 388) | fn into(self) -> NP_Dec {
function into (line 425) | fn into(self) -> NP_Dec {
function round_f64 (line 432) | fn round_f64(n: f64) -> f64 {
function round_f32 (line 440) | fn round_f32(n: f32) -> f32 {
function round (line 448) | fn round(n: f64, precision: u32) -> f64 {
function precision (line 452) | fn precision(x: f64) -> Option<u32> {
function round32 (line 461) | fn round32(n: f32, precision: u32) -> f32 {
function precision32 (line 465) | fn precision32(x: f32) -> Option<u32> {
function into (line 499) | fn into(self) -> NP_Dec {
function into (line 545) | fn into(self) -> NP_Dec {
method default (line 664) | fn default() -> Self {
FILE: no_proto_js/src/pointer/geo.rs
type NP_Geo_Bytes (line 41) | pub struct NP_Geo_Bytes {
method into_geo (line 54) | pub fn into_geo(self) -> NP_Geo {
method default_value (line 116) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
method type_idx (line 119) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_Geo::type_idx() }
method self_type_idx (line 120) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_Geo::type_i...
method schema_to_json (line 122) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_value (line 124) | fn set_value<'set, M: NP_Memory>(_cursor: NP_Cursor, _memory: &'set M,...
method to_json (line 127) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method get_size (line 130) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<us...
method into_value (line 147) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> ...
method from_json_to_schema (line 190) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, json_schema: &Bo...
method from_bytes_to_schema (line 194) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize,...
method default (line 110) | fn default() -> Self {
type NP_Geo (line 206) | pub struct NP_Geo {
method new (line 220) | pub fn new(size: u8, lat: f64, lng: f64) -> Self {
method get_deviser (line 225) | pub fn get_deviser(size: i64) -> f64 {
method into_json (line 236) | pub fn into_json(&self) -> NP_JSON {
method get_bytes (line 244) | pub fn get_bytes(&self) -> Option<NP_Geo_Bytes> {
method default_value (line 347) | fn default_value(schema: &NP_Parsed_Schema) -> Option<Self> {
method type_idx (line 360) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("geo", NP_TypeKeys::Geo) }
method self_type_idx (line 361) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("geo", NP_Typ...
method schema_to_json (line 363) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_value (line 387) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, v...
method into_value (line 514) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> ...
method to_json (line 585) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method get_size (line 624) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<us...
method from_json_to_schema (line 643) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 729) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 293) | fn default() -> Self {
function geo_default_value (line 298) | fn geo_default_value(size: u8, json: &NP_JSON) -> Result<Option<NP_Geo_B...
FILE: no_proto_js/src/pointer/mod.rs
type NP_Pointer_Scalar (line 45) | pub struct NP_Pointer_Scalar {
method default (line 50) | fn default() -> Self {
type NP_Pointer_List_Item (line 58) | pub struct NP_Pointer_List_Item {
type NP_Pointer_Map_Item (line 67) | pub struct NP_Pointer_Map_Item {
type NP_Pointer_Bytes (line 75) | pub trait NP_Pointer_Bytes {
method get_type (line 76) | fn get_type(&self) -> &str { "" }
method get_addr_value (line 77) | fn get_addr_value(&self) -> u16 { 0 }
method set_addr_value (line 78) | fn set_addr_value(&mut self, addr: u16) { }
method get_next_addr (line 79) | fn get_next_addr(&self) -> u16 { 0 }
method set_next_addr (line 80) | fn set_next_addr(&mut self, addr: u16) { }
method set_index (line 81) | fn set_index(&mut self, index: u8) { }
method get_index (line 82) | fn get_index(&self) -> u8 { 0 }
method set_key_addr (line 83) | fn set_key_addr(&mut self, hash: u16) { }
method get_key_addr (line 84) | fn get_key_addr(&self) -> u16 { 0 }
method reset (line 85) | fn reset(&mut self) { }
method get_size (line 86) | fn get_size(&self) -> usize { 0 }
method get_key (line 87) | fn get_key<'key>(&self, memory: &'key dyn NP_Memory) -> &'key str { "" }
method get_key_size (line 88) | fn get_key_size<'key>(&self, memory: &'key dyn NP_Memory) -> usize { 0 }
method get_type (line 92) | fn get_type(&self) -> &str { "Scalar" }
method get_addr_value (line 94) | fn get_addr_value(&self) -> u16 { u16::from_be_bytes(self.addr_value) }
method set_addr_value (line 96) | fn set_addr_value(&mut self, addr: u16) { self.addr_value = addr.to_be...
method reset (line 98) | fn reset(&mut self) { self.addr_value = [0; 2]; }
method get_size (line 100) | fn get_size(&self) -> usize { 2 }
method get_type (line 103) | fn get_type(&self) -> &str { "List Item" }
method get_addr_value (line 105) | fn get_addr_value(&self) -> u16 { u16::from_be_bytes(self.addr_value) }
method set_addr_value (line 107) | fn set_addr_value(&mut self, addr: u16) { self.addr_value = addr.to_be...
method get_next_addr (line 109) | fn get_next_addr(&self) -> u16 { u16::from_be_bytes(self.next_value) }
method set_next_addr (line 111) | fn set_next_addr(&mut self, addr: u16) { self.next_value = addr.to_be_...
method set_index (line 113) | fn set_index(&mut self, index: u8) { self.index = index }
method get_index (line 115) | fn get_index(&self) -> u8 { self.index }
method reset (line 117) | fn reset(&mut self) { self.addr_value = [0; 2]; self.next_value = [0; ...
method get_size (line 119) | fn get_size(&self) -> usize { 5 }
method get_type (line 122) | fn get_type(&self) -> &str { "Map Item" }
method get_addr_value (line 124) | fn get_addr_value(&self) -> u16 { u16::from_be_bytes(self.addr_value) }
method set_addr_value (line 126) | fn set_addr_value(&mut self, addr: u16) { self.addr_value = addr.to_be...
method get_next_addr (line 128) | fn get_next_addr(&self) -> u16 { u16::from_be_bytes(self.next_value) }
method set_next_addr (line 130) | fn set_next_addr(&mut self, addr: u16) { self.next_value = addr.to_be_...
method set_key_addr (line 132) | fn set_key_addr(&mut self, addr: u16) { self.key_addr = addr.to_be_by...
method get_key_addr (line 134) | fn get_key_addr(&self) -> u16 { u16::from_be_bytes(self.key_addr) }
method reset (line 136) | fn reset(&mut self) { self.addr_value = [0; 2]; self.next_value = [0; ...
method get_size (line 138) | fn get_size(&self) -> usize { 6 }
method get_key (line 140) | fn get_key<'key>(&self, memory: &'key dyn NP_Memory) -> &'key str {
method get_key_size (line 151) | fn get_key_size<'key>(&self, memory: &'key dyn NP_Memory) -> usize {
type NP_Map_Bytes (line 165) | pub struct NP_Map_Bytes {
method set_head (line 172) | pub fn set_head(&mut self, head: u16) {
method get_head (line 176) | pub fn get_head(&self) -> u16 {
type NP_List_Bytes (line 185) | pub struct NP_List_Bytes {
method set_head (line 193) | pub fn set_head(&mut self, head: u16) {
method get_head (line 197) | pub fn get_head(&self) -> u16 {
method set_tail (line 201) | pub fn set_tail(&mut self, tail: u16) {
method get_tail (line 205) | pub fn get_tail(&self) -> u16 {
type NP_Vtable (line 215) | pub struct NP_Vtable {
method get_next (line 225) | pub fn get_next(&self) -> u16 {
method set_next (line 230) | pub fn set_next(&mut self, value: u16) {
type NP_Cursor (line 241) | pub struct NP_Cursor {
method new (line 253) | pub fn new(buff_addr: usize, schema_addr: usize, parent_schema_addr: u...
method get_value (line 263) | pub fn get_value<X: NP_Memory>(&self, memory: &X) -> &'cursor mut dyn ...
method json_encode (line 287) | pub fn json_encode<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> NP...
method compact (line 321) | pub fn compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, fr...
method set_default (line 355) | pub fn set_default<M: NP_Memory>(cursor: NP_Cursor, memory: &M) -> Res...
method calc_size (line 390) | pub fn calc_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Resu...
type NP_Scalar (line 437) | pub trait NP_Scalar {}
type NP_Value (line 442) | pub trait NP_Value<'value> {
method type_idx (line 446) | fn type_idx() -> (&'value str, NP_TypeKeys);
method self_type_idx (line 450) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys);
method schema_to_json (line 454) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 458) | fn default_value(_schema: &'value NP_Parsed_Schema) -> Option<Self> wh...
method from_json_to_schema (line 462) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, json_schema: &Bo...
method from_bytes_to_schema (line 466) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize,...
method set_value (line 470) | fn set_value<'set, M: NP_Memory>(_cursor: NP_Cursor, _memory: &'set M,...
method into_value (line 477) | fn into_value<M: NP_Memory>(_cursor: &NP_Cursor, _memory: &'value M) -...
method to_json (line 484) | fn to_json<M: NP_Memory>(_cursor: &NP_Cursor, _memory: &'value M) -> N...
method get_size (line 488) | fn get_size<M: NP_Memory>(cursor: &'value NP_Cursor, memory: &'value M...
method do_compact (line 492) | fn do_compact<M: NP_Memory, M2: NP_Memory>(from_cursor: NP_Cursor, fro...
FILE: no_proto_js/src/pointer/numbers.rs
type NP_NumType (line 50) | pub enum NP_NumType {
type NP_BigEndian (line 335) | trait NP_BigEndian {
method np_get_default_from_json (line 336) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> where Self...
method np_get_default (line 337) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_bytes (line 338) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 344) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 350) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 363) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 377) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 383) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 396) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 411) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 417) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 430) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 446) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 452) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 465) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 480) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 486) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 499) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 514) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 520) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 533) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 549) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 555) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 568) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 583) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 589) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 602) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 617) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 623) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 636) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 651) | fn np_get_default<'default>(ptr: &'default NP_Parsed_Schema) -> Option...
method np_get_default_from_json (line 657) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 670) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
FILE: no_proto_js/src/pointer/option.rs
type NP_Enum (line 40) | pub enum NP_Enum {
method new (line 51) | pub fn new<S: Into<String>>(value: S) -> Self {
method len (line 56) | pub fn len(&self) -> usize {
method as_bytes (line 64) | pub fn as_bytes(&self) -> &[u8] {
method to_string (line 72) | pub fn to_string(&self) -> String {
method type_idx (line 88) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("option", NP_TypeKeys::...
method self_type_idx (line 89) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("option", NP_...
method schema_to_json (line 91) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 116) | fn default_value(schema: &NP_Parsed_Schema) -> Option<Self> {
method set_value (line 130) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, v...
method into_value (line 177) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> ...
method to_json (line 207) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_...
method get_size (line 261) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<us...
method from_json_to_schema (line 273) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 347) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 81) | fn default() -> Self {
FILE: no_proto_js/src/pointer/string.rs
type NP_String (line 36) | pub type NP_String<'string> = String;
method type_idx (line 41) | fn type_idx() -> (&'value str, NP_TypeKeys) {
method self_type_idx (line 44) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) {
method schema_to_json (line 48) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize) -> Res...
method from_bytes_to_schema (line 84) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
method into_value (line 118) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Re...
method default_value (line 153) | fn default_value(schema: &'value NP_Parsed_Schema) -> Option<Self> {
method get_size (line 162) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<usiz...
method from_json_to_schema (line 189) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
method to_json (line 285) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
method set_value (line 304) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, val...
FILE: no_proto_js/src/pointer/ulid.rs
type NP_ULID (line 46) | pub struct NP_ULID {
method generate (line 62) | pub fn generate(now_ms: u64, random_seed: u32) -> NP_ULID {
method generate_with_rand (line 85) | pub fn generate_with_rand<F>(now_ms: u64, random_fn: F) -> NP_ULID whe...
method get_time (line 105) | pub fn get_time(&self) -> u64 {
method to_string (line 115) | pub fn to_string(&self) -> String {
type _NP_ULID (line 51) | pub type _NP_ULID<'a> = &'a NP_ULID;
method default (line 138) | fn default() -> Self {
method fmt (line 144) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
function type_idx (line 151) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("ulid", NP_TypeKeys::Ulid) }
function self_type_idx (line 152) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("ulid", NP_Type...
function schema_to_json (line 154) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Re...
function set_value (line 162) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, val...
function into_value (line 186) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Re...
function to_json (line 205) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function get_size (line 224) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<usiz...
function from_json_to_schema (line 235) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema: ...
function default_value (line 247) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
function from_bytes_to_schema (line 251) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: usi...
FILE: no_proto_js/src/pointer/uuid.rs
type NP_UUID (line 46) | pub struct NP_UUID {
method generate (line 60) | pub fn generate(random_seed: u32) -> Self {
method generate_with_rand (line 83) | pub fn generate_with_rand<F>(random_fn: F) -> Self where F: Fn() -> u8 {
method from_string (line 101) | pub fn from_string(uuid: &str) -> NP_UUID {
method to_string (line 119) | pub fn to_string(&self) -> String {
type _NP_UUID (line 54) | pub type _NP_UUID<'a> = &'a NP_UUID;
method fmt (line 136) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
method default (line 142) | fn default() -> Self {
function type_idx (line 149) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("uuid", NP_TypeKeys::Uuid) }
function self_type_idx (line 150) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("uuid", NP_Type...
function schema_to_json (line 152) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Re...
function set_value (line 159) | fn set_value<'set, M: NP_Memory>(cursor: NP_Cursor, memory: &'set M, val...
function into_value (line 183) | fn into_value<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> Re...
function to_json (line 202) | fn to_json<M: NP_Memory>(cursor: &NP_Cursor, memory: &'value M) -> NP_JS...
function get_size (line 221) | fn get_size<M: NP_Memory>(cursor: &NP_Cursor, memory: &M) -> Result<usiz...
function from_json_to_schema (line 232) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema: ...
function default_value (line 245) | fn default_value(_schema: &NP_Parsed_Schema) -> Option<Self> {
function from_bytes_to_schema (line 249) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: usi...
FILE: no_proto_js/src/rpc.rs
type RPC_Fn_Kinds (line 313) | pub enum RPC_Fn_Kinds {
method from (line 323) | fn from(value: u8) -> Self {
type NP_Str_Addr (line 331) | struct NP_Str_Addr {
type NP_RPC_Spec (line 340) | enum NP_RPC_Spec<'spec> {
type NP_RPC_Factory (line 363) | pub struct NP_RPC_Factory<'fact> {
type NP_RCP_Spec (line 377) | enum NP_RCP_Spec<'spec> {
function write (line 384) | pub fn write(&mut self) -> Result<&mut Vec<u8>, NP_Error> {
function read (line 391) | pub fn read(&self) -> &[u8] {
type NP_RPC_Specification (line 402) | pub struct NP_RPC_Specification<'spec> {
function read_str (line 412) | fn read_str(&self, addr: &NP_Str_Addr) -> &str {
type Parsed_Fn (line 422) | struct Parsed_Fn {
function read_u16 (line 434) | fn read_u16(bytes: &[u8], offset: usize) -> usize {
function new (line 442) | pub fn new(json_rcp_spec: &str) -> Result<Self, NP_Error> {
function get_name (line 542) | pub fn get_name(&self) -> &str {
function get_author (line 547) | pub fn get_author(&self) -> &str {
function get_id (line 552) | pub fn get_id(&self) -> String {
function get_version (line 562) | pub fn get_version(&self) -> String {
function parse_json_msg (line 576) | fn parse_json_msg(module: &str, json: &NP_JSON, spec: &mut NP_RPC_Specif...
function parse_json_rpc (line 626) | fn parse_json_rpc(module: &str, msg_module: &str, json: &NP_JSON, spec: ...
function find_msg (line 725) | fn find_msg(msg_name: &String, spec: &NP_RPC_Specification) -> Result<us...
function method_string_parse (line 751) | fn method_string_parse(module: &str, function_str: &str) -> Result<Parse...
function new_compiled (line 794) | pub fn new_compiled(bytes_rpc_spec: &'fact [u8]) -> Result<Self, NP_Erro...
function compile_spec (line 885) | pub fn compile_spec(&self) -> &[u8] {
function new_request (line 891) | pub fn new_request(&self, rpc_name: &str) -> Result<NP_RPC_Request, NP_E...
function open_request (line 922) | pub fn open_request(&self, bytes: Vec<u8>) -> Result<NP_RPC_Request, NP_...
function new_response (line 962) | pub fn new_response(&self, rpc_name: &str) -> Result<NP_RPC_Response, NP...
function open_response (line 1003) | pub fn open_response(&self, bytes: Vec<u8>) -> Result<NP_RPC_Response, N...
type NP_ResponseKinds (line 1091) | pub enum NP_ResponseKinds {
method from (line 1101) | fn from(value: u8) -> Self {
type RPC_Type (line 1111) | pub enum RPC_Type {
method from (line 1118) | fn from(value: u8) -> Self {
type NP_RPC_Request (line 1125) | pub struct NP_RPC_Request<'request> {
function rpc_name (line 1140) | pub fn rpc_name(&self) -> &str {
function new_response (line 1145) | pub fn new_response(&self) -> Result<NP_RPC_Response, NP_Error> {
function rpc_close (line 1180) | pub fn rpc_close(self) -> Vec<u8> {
type NP_RPC_Response (line 1192) | pub struct NP_RPC_Response<'response> {
function rpc_name (line 1213) | pub fn rpc_name(&self) -> &str {
function rpc_close (line 1221) | pub fn rpc_close(self) -> Result<Vec<u8>, NP_Error> {
function rpc_test (line 1248) | fn rpc_test() -> Result<(), NP_Error> {
FILE: no_proto_js/src/schema.rs
type NP_TypeKeys (line 581) | pub enum NP_TypeKeys {
method from (line 610) | fn from(value: u8) -> Self {
method into_type_idx (line 618) | pub fn into_type_idx<'idx>(&self) -> (&'idx str, NP_TypeKeys) {
type NP_Schema_Addr (line 651) | pub type NP_Schema_Addr = usize;
type String_Case (line 656) | pub enum String_Case {
method from (line 663) | fn from(value: u8) -> Self {
type NP_Parsed_Schema (line 673) | pub enum NP_Parsed_Schema {
method get_type_key (line 704) | pub fn get_type_key(&self) -> &NP_TypeKeys {
method get_type_data (line 735) | pub fn get_type_data(&self) -> (&str, NP_TypeKeys) {
method is_sortable (line 766) | pub fn is_sortable(&self) -> bool {
type NP_Schema (line 802) | pub struct NP_Schema {
method to_json (line 812) | pub fn to_json(&self) -> Result<NP_JSON, NP_Error> {
method _type_to_json (line 818) | pub fn _type_to_json(parsed_schema: &Vec<NP_Parsed_Schema>, address: u...
method _get_type (line 850) | pub fn _get_type(json_schema: &Box<NP_JSON>) -> Result<String, NP_Erro...
method from_bytes (line 862) | pub fn from_bytes(mut cache: Vec<NP_Parsed_Schema>, address: usize, by...
method from_json (line 899) | pub fn from_json(schema: Vec<NP_Parsed_Schema>, json_schema: &Box<NP_J...
FILE: no_proto_js/src/utils.rs
constant KX (line 8) | const KX: u32 = 123456789;
constant KY (line 9) | const KY: u32 = 362436069;
constant KZ (line 10) | const KZ: u32 = 521288629;
constant KW (line 11) | const KW: u32 = 88675123;
function to_unsigned (line 14) | pub fn to_unsigned(byte: u8) -> u8 {
function to_signed (line 19) | pub fn to_signed(byte: u8) -> u8 {
type Rand (line 25) | pub struct Rand {
method new (line 30) | pub fn new(seed: u32) -> Rand {
method rand (line 38) | pub fn rand(&mut self) -> u32 {
method gen_range (line 45) | pub fn gen_range(&mut self, a: i32, b: i32) -> i32 {
function opt_err (line 52) | pub fn opt_err<T>(optin: Option<T>) -> Result<T, NP_Error> {
function to_base32 (line 59) | pub fn to_base32(num: u128, length: i32) -> String {
FILE: no_proto_rs/src/buffer/mod.rs
type NP_Cursor (line 6) | struct NP_Cursor {
type NP_Buffer_Type (line 12) | pub struct NP_Buffer_Type {
type NP_Type_Size (line 18) | pub enum NP_Type_Size {
method default (line 25) | fn default() -> Self { NP_Type_Size::pointer }
FILE: no_proto_rs/src/collection/list.rs
type NP_List_Bytes (line 15) | pub struct NP_List_Bytes {
method set_head (line 23) | pub fn set_head(&mut self, head: u32) {
method get_head (line 27) | pub fn get_head(&self) -> u32 {
method set_tail (line 31) | pub fn set_tail(&mut self, tail: u32) {
method get_tail (line 35) | pub fn get_tail(&self) -> u32 {
type List_Item (line 42) | struct List_Item {
type NP_List (line 51) | pub struct NP_List {
method select (line 68) | pub fn select(list_cursor: NP_Cursor, index: usize, make_path: bool, s...
method make_item_in_loop (line 159) | pub fn make_item_in_loop(self, memory: &NP_Memory) -> Result<NP_Cursor...
method make_list (line 189) | pub fn make_list<'make>(list_cursor: &NP_Cursor, memory: &'make NP_Mem...
method get_list (line 197) | pub fn get_list<'list>(list_cursor_value_addr: usize, memory: &'list N...
method new_iter (line 206) | pub fn new_iter(list_cursor: &NP_Cursor, memory: &NP_Memory, only_real...
method step_iter (line 257) | pub fn step_iter(&mut self, memory: &NP_Memory) -> Option<(usize, Opti...
method push (line 315) | pub fn push<'push>(list_cursor: &NP_Cursor, memory: &NP_Memory, index:...
method to_json (line 367) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method type_idx (line 389) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("list", NP_TypeKeys::Li...
method self_type_idx (line 390) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("list", NP_Ty...
method schema_to_json (line 392) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_from_json (line 405) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method get_size (line 432) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Re...
method do_compact (line 458) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'valu...
method schema_to_idl (line 480) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 490) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 529) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method default_value (line 557) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_...
method from_bytes_to_schema (line 561) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
function schema_parsing_works_idl (line 579) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 589) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 599) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function parseing_works (line 636) | fn parseing_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/collection/map.rs
type NP_Map_Bytes (line 16) | pub struct NP_Map_Bytes {
method set_head (line 23) | pub fn set_head(&mut self, head: u32) {
method get_head (line 27) | pub fn get_head(&self) -> u32 {
type Map_Item (line 34) | struct Map_Item<'item> {
function new (line 40) | pub fn new(key: &'item str, buff_addr: usize) -> Self {
type NP_Map (line 49) | pub struct NP_Map<'map> {
function select (line 61) | pub fn select(map_cursor: NP_Cursor, key: &str, make_path: bool, schema_...
function get_map (line 89) | pub fn get_map<'get>(map_buff_addr: usize, memory: &'get NP_Memory) -> &...
function new_iter (line 98) | pub fn new_iter(map_cursor: &NP_Cursor, memory: &'map NP_Memory) -> Self {
function step_iter (line 129) | pub fn step_iter(&mut self, memory: &'map NP_Memory) -> Option<(&'map st...
function insert (line 168) | pub fn insert(map_cursor: &NP_Cursor, memory: &NP_Memory, key: &str) -> ...
function to_json (line 204) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function set_from_json (line 222) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Cursor...
function type_idx (line 241) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("map", NP_TypeKeys::Map) }
function self_type_idx (line 242) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("map", NP_TypeK...
function schema_to_json (line 244) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 257) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
function do_compact (line 283) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'value ...
function schema_to_idl (line 302) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
function from_idl_to_schema (line 312) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
function from_json_to_schema (line 352) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 381) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_Sc...
function from_bytes_to_schema (line 385) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_parsing_works_idl (line 400) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 410) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 420) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/collection/struc.rs
type NP_Struct (line 19) | pub struct NP_Struct<'table> {
function select (line 31) | pub fn select(mut table_cursor: NP_Cursor, schema: &NP_Parsed_Schema, k...
function make_first_vtable (line 90) | pub fn make_first_vtable<'make>(table_cursor: NP_Cursor, memory: &'make ...
function make_next_vtable (line 100) | pub fn make_next_vtable<'make>(prev_vtable: &'make mut NP_Vtable, memory...
function new_iter (line 110) | pub fn new_iter(cursor: &NP_Cursor, memory: &'table NP_Memory) -> Self {
function get_vtable (line 130) | pub fn get_vtable<'vtable>(v_table_addr: usize, memory: &'vtable NP_Memo...
function step_iter (line 139) | pub fn step_iter(&mut self, memory: &'table NP_Memory) -> Option<(usize,...
function to_json (line 182) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function type_idx (line 202) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("struct", NP_TypeKeys::St...
function self_type_idx (line 203) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("struct", NP_Ty...
function set_from_json (line 205) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Cursor...
function from_bytes_to_schema (line 240) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_to_json (line 294) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 313) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
function do_compact (line 349) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'value ...
function schema_to_idl (line 388) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
function from_idl_to_schema (line 408) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
function from_json_to_schema (line 514) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 598) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_Sc...
function schema_parsing_works_idl (line 605) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 616) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 626) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function test_vtables (line 663) | fn test_vtables() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/collection/tuple.rs
type NP_Tuple (line 18) | pub struct NP_Tuple {
method select (line 27) | pub fn select(mut tuple_cursor: NP_Cursor, schema: &NP_Parsed_Schema, ...
method alloc_tuple (line 73) | pub fn alloc_tuple<'make>(tuple_cursor: NP_Cursor, empty: &Vec<u8>, me...
method new_iter (line 82) | pub fn new_iter(cursor: &NP_Cursor, _memory: &NP_Memory) -> Self {
method step_iter (line 90) | pub fn step_iter(&mut self, memory: &NP_Memory, show_empty: bool) -> O...
method to_json (line 125) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method type_idx (line 146) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("tuple", NP_TypeKeys::T...
method self_type_idx (line 147) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("tuple", NP_T...
method schema_to_json (line 149) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_from_json (line 168) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method get_size (line 189) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method do_compact (line 219) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'valu...
method schema_to_idl (line 245) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 267) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 373) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method default_value (line 464) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_...
method from_bytes_to_schema (line 468) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize,...
function schema_parsing_works_idl (line 527) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 543) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 560) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function sorting_tuples_works (line 581) | fn sorting_tuples_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/error.rs
type NP_Error (line 10) | pub enum NP_Error {
method new (line 30) | pub fn new<S: AsRef<str>>(message: S) -> Self {
method unwrap (line 34) | pub fn unwrap<T>(value: Option<T>) -> Result<T, NP_Error> {
method from (line 43) | fn from(err: FromUtf8Error) -> NP_Error {
method from (line 49) | fn from(err: core::num::ParseFloatError) -> NP_Error {
method from (line 55) | fn from(err: core::num::ParseIntError) -> NP_Error {
FILE: no_proto_rs/src/json_flex.rs
type JSMAP (line 48) | pub struct JSMAP {
method new (line 56) | pub fn new() -> Self {
method insert (line 61) | pub fn insert(&mut self, key: String, value: NP_JSON) -> usize {
method get_mut (line 76) | pub fn get_mut(&mut self, key: &str) -> Option<&mut NP_JSON> {
method get (line 86) | pub fn get(&self, key: &str) -> Option<&NP_JSON> {
method has (line 96) | pub fn has(&self, key: &str) -> bool {
type NP_JSON (line 108) | pub enum NP_JSON {
method clone (line 133) | pub fn clone(&self) -> NP_JSON {
method into_string (line 179) | pub fn into_string(&self) -> Option<&String> {
method into_i64 (line 186) | pub fn into_i64(&self) -> Option<&i64> {
method into_f64 (line 193) | pub fn into_f64(&self) -> Option<&f64> {
method into_hashmap (line 200) | pub fn into_hashmap(&self) -> Option<&JSMAP> {
method into_vec (line 207) | pub fn into_vec(&self) -> Option<&Vec<NP_JSON>> {
method is_null (line 214) | pub fn is_null(&self) -> bool {
method is_true (line 221) | pub fn is_true(&self) -> bool {
method is_false (line 228) | pub fn is_false(&self) -> bool {
method is_array (line 235) | pub fn is_array(&self) -> bool {
method is_dictionary (line 242) | pub fn is_dictionary(&self) -> bool {
method is_string (line 249) | pub fn is_string(&self) -> bool {
method is_integer (line 256) | pub fn is_integer(&self) -> bool {
method is_float (line 263) | pub fn is_float(&self) -> bool {
method unwrap_string (line 270) | pub fn unwrap_string(&self) -> Option<&String> {
method unwrap_i64 (line 277) | pub fn unwrap_i64(&self) -> Option<&i64> {
method unwrap_f64 (line 284) | pub fn unwrap_f64(&self) -> Option<&f64> {
method unwrap_hashmap (line 291) | pub fn unwrap_hashmap(&self) -> Option<&JSMAP> {
method unwrap_vec (line 298) | pub fn unwrap_vec(&self) -> Option<&Vec<NP_JSON>> {
method stringify (line 305) | pub fn stringify(&self) -> String {
type Output (line 357) | type Output = NP_JSON;
method index (line 358) | fn index<'a>(&'a self, id: usize) -> &'a Self::Output {
type Output (line 372) | type Output = NP_JSON;
method index (line 373) | fn index<'a>(&'a self, id: String) -> &'a Self::Output {
type Output (line 387) | type Output = NP_JSON;
method index (line 388) | fn index<'b>(&'b self, id: &str) -> &'b Self::Output {
function recursive (line 402) | fn recursive(v: &mut NP_JSON,
function json_decode (line 497) | pub fn json_decode<'json>(text: String) -> Result<Box<NP_JSON>, NP_Error> {
FILE: no_proto_rs/src/lib.rs
type NP_Factory (line 80) | pub struct NP_Factory {
type NP_Size_Data (line 91) | pub struct NP_Size_Data {
FILE: no_proto_rs/src/map.rs
type NP_OrderedMap (line 16) | pub struct NP_OrderedMap<V: Debug + PartialEq> {
method default (line 21) | fn default() -> Self {
method fmt (line 42) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
function empty (line 158) | pub fn empty() -> Self {
function new (line 162) | pub fn new() -> Self {
function set (line 166) | pub fn set(&mut self, key: &str, value: V) {
function get (line 183) | pub fn get(&self, key: &str) -> Option<&V> {
function del (line 190) | pub fn del(&mut self, key: &str) {
function iter (line 201) | pub fn iter(&self) -> NP_HashMap_Iterator<V> {
function iter_keys (line 205) | pub fn iter_keys(&self) -> NP_HashMap_Iterator_Keys<V> {
function _read (line 209) | pub fn _read(&self) -> &Vec<(String, V)> {
type NP_HashMap_Iterator_Keys (line 216) | pub struct NP_HashMap_Iterator_Keys<'iter, V: Debug + PartialEq> {
type Item (line 223) | type Item = &'iter String;
method next (line 225) | fn next(&mut self) -> Option<Self::Item> {
type NP_HashMap_Iterator (line 239) | pub struct NP_HashMap_Iterator<'iter, V: Debug + PartialEq> {
type Item (line 246) | type Item = (&'iter String, &'iter V);
method next (line 248) | fn next(&mut self) -> Option<Self::Item> {
function fmix32 (line 304) | fn fmix32(mut h: u32) -> u32 {
function get_32_block (line 315) | fn get_32_block(bytes: &[u8], index: usize) -> u32 {
function murmurhash3_x86_32 (line 326) | pub fn murmurhash3_x86_32(bytes: &[u8], seed: u32) -> u32 {
function fmix64 (line 364) | fn fmix64(mut k: u64) -> u64 {
function get_128_block (line 374) | fn get_128_block(bytes: &[u8], index: usize) -> (u64, u64) {
function murmurhash3_x64_128 (line 379) | pub fn murmurhash3_x64_128(bytes: &[u8], seed: u64) -> (u64, u64) {
FILE: no_proto_rs/src/memory.rs
type NP_Memory_Kind (line 11) | pub enum NP_Memory_Kind {
type NP_Memory (line 20) | pub struct NP_Memory {
method existing_owned (line 46) | pub fn existing_owned(bytes: Vec<u8>, schema: Arc<NP_Schema>, root: us...
method existing_ref (line 58) | pub fn existing_ref(bytes: *const [u8], schema: Arc<NP_Schema>, root: ...
method existing_ref_mut (line 70) | pub fn existing_ref_mut(bytes: *mut [u8], len: usize, schema: Arc<NP_S...
method new (line 82) | pub fn new(capacity: Option<usize>, schema: Arc<NP_Schema>, root: usiz...
method new_ref_mut (line 103) | pub fn new_ref_mut(bytes: *mut [u8], schema: Arc<NP_Schema>, root: usi...
method new_empty (line 114) | pub fn new_empty(&self, capacity: Option<usize>) -> Result<Self, NP_Er...
method is_ref_mut (line 134) | pub fn is_ref_mut(&self) -> bool {
method set_length (line 143) | pub fn set_length(&mut self, new_len: usize) -> Result<(), NP_Error> {
method set_max_length (line 165) | pub fn set_max_length(&mut self, len: usize) {
method length (line 183) | pub fn length(&self) -> usize {
method get_schema (line 193) | pub fn get_schema(&self) -> &NP_Schema {
method malloc_borrow (line 203) | pub fn malloc_borrow(&self, bytes: &[u8]) -> Result<usize, NP_Error> {
method malloc (line 236) | pub fn malloc(&self, bytes: Vec<u8>) -> Result<usize, NP_Error> {
method read_bytes (line 241) | pub fn read_bytes(&self) -> &[u8] {
method write_bytes (line 251) | pub fn write_bytes(&self) -> &mut [u8] {
method get_1_byte (line 265) | pub fn get_1_byte(&self, address: usize) -> Option<u8> {
method get_2_bytes (line 276) | pub fn get_2_bytes(&self, address: usize) -> Option<&[u8; 2]> {
method get_4_bytes (line 295) | pub fn get_4_bytes(&self, address: usize) -> Option<&[u8; 4]> {
method get_8_bytes (line 314) | pub fn get_8_bytes(&self, address: usize) -> Option<&[u8; 8]> {
method get_16_bytes (line 333) | pub fn get_16_bytes(&self, address: usize) -> Option<&[u8; 16]> {
method get_32_bytes (line 352) | pub fn get_32_bytes(&self, address: usize) -> Option<&[u8; 32]> {
method dump (line 370) | pub fn dump(self) -> Vec<u8> {
method clone (line 31) | fn clone(&self) -> Self {
FILE: no_proto_rs/src/pointer/any.rs
type NP_Any (line 15) | pub struct NP_Any { }
method type_idx (line 20) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("any", NP_TypeKeys::Any) }
method self_type_idx (line 21) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("any", NP_Typ...
method schema_to_json (line 23) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> ...
method schema_to_idl (line 30) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> R...
method from_idl_to_schema (line 34) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl...
method set_from_json (line 38) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method set_value (line 42) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 45) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 48) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method get_size (line 51) | fn get_size(depth:usize, _cursor: &NP_Cursor, _memory: &NP_Memory) -> ...
method do_compact (line 54) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'valu...
method from_json_to_schema (line 57) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema...
method default_value (line 71) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method from_bytes_to_schema (line 75) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: u...
method default (line 87) | fn default() -> Self {
function schema_parsing_works (line 94) | fn schema_parsing_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/bool.rs
function schema_default (line 34) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 37) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 41) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 48) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("bool", NP_TypeKeys::Bool...
function self_type_idx (line 49) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("bool", NP_Type...
function schema_to_json (line 51) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function default_value (line 68) | fn default_value(_depth: usize, address: usize, schema: &Vec<NP_Parsed_S...
function set_from_json (line 74) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Curs...
function set_value (line 88) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function into_value (line 121) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 140) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
function get_size (line 175) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Res...
function schema_to_idl (line 184) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
function from_idl_to_schema (line 203) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
function from_json_to_schema (line 256) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function from_bytes_to_schema (line 286) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_parsing_works_idl (line 304) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 320) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 336) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 347) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/bytes.rs
type NP_Bytes (line 33) | pub type NP_Bytes = Vec<u8>;
method schema_default (line 41) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 56) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 74) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method type_idx (line 98) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("bytes", NP_TypeKeys::B...
method self_type_idx (line 99) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("bytes", NP_T...
method schema_to_json (line 101) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 124) | fn default_value(_depth: usize, address: usize, schema: &Vec<NP_Parsed...
method set_value (line 136) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method schema_to_idl (line 141) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 171) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method set_from_json (line 258) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method into_value (line 285) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 292) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 327) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 352) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 424) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
type NP_Borrow_Bytes (line 37) | pub type NP_Borrow_Bytes<'bytes> = &'bytes [u8];
function schema_default (line 471) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 475) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 479) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 488) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_Bytes::type_idx() }
function self_type_idx (line 489) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_Bytes::type_i...
function schema_to_json (line 491) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function set_from_json (line 495) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_Cur...
function default_value (line 499) | fn default_value(_depth: usize, addr: usize, schema: &'value Vec<NP_Pars...
function schema_to_idl (line 511) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Res...
function from_idl_to_schema (line 516) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl: ...
function set_value (line 521) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function into_value (line 619) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 652) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function get_size (line 656) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Resu...
function from_json_to_schema (line 660) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, json_schema: &Box<...
function from_bytes_to_schema (line 664) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize, b...
function schema_parsing_works_idl (line 670) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 693) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 717) | fn default_value_works() -> Result<(), NP_Error> {
function fixed_size_works (line 727) | fn fixed_size_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 738) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/date.rs
type NP_Date (line 42) | pub struct NP_Date {
method schema_default (line 48) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Se...
method np_max_value (line 52) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method np_min_value (line 56) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method new (line 64) | pub fn new(time_ms: u64) -> Self {
method type_idx (line 85) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("date", NP_TypeKeys::Da...
method self_type_idx (line 86) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("date", NP_Ty...
method schema_to_json (line 88) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 101) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method set_from_json (line 112) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method set_value (line 124) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 150) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 169) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 194) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method schema_to_idl (line 206) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 220) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 275) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 303) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 70) | fn default() -> Self {
method fmt (line 76) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
function schema_parsing_works (line 327) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 338) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 350) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/dec.rs
type NP_Dec (line 84) | pub struct NP_Dec {
method schema_default (line 92) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 97) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 102) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method to_float (line 121) | pub fn to_float(&self) -> f64 {
method shift_exp (line 148) | pub fn shift_exp(&mut self, new_exp: u8) -> NP_Dec {
method new (line 198) | pub fn new(num: i64, exp: u8) -> Self {
method match_exp (line 218) | pub fn match_exp(&self, other: &NP_Dec) -> NP_Dec {
method export (line 239) | pub fn export(&self) -> (i64, u8) {
method ne (line 265) | fn ne(&self, other: &NP_Dec) -> bool {
method eq (line 277) | fn eq(&self, other: &NP_Dec) -> bool {
method lt (line 312) | fn lt(&self, other: &NP_Dec) -> bool {
method le (line 321) | fn le(&self, other: &NP_Dec) -> bool {
method gt (line 330) | fn gt(&self, other: &NP_Dec) -> bool {
method ge (line 339) | fn ge(&self, other: &NP_Dec) -> bool {
method partial_cmp (line 348) | fn partial_cmp(&self, other: &NP_Dec) -> Option<core::cmp::Ordering> {
method into (line 380) | fn into(self) -> i32 {
method into (line 417) | fn into(self) -> i64 {
method into (line 497) | fn into(self) -> f64 {
method into (line 543) | fn into(self) -> f32 {
method div_assign (line 580) | fn div_assign(&mut self, other: NP_Dec) {
type Output (line 591) | type Output = NP_Dec;
method div (line 592) | fn div(mut self, other: NP_Dec) -> <Self as core::ops::Sub<NP_Dec>>::O...
method sub_assign (line 604) | fn sub_assign(&mut self, other: NP_Dec) {
type Output (line 615) | type Output = NP_Dec;
method sub (line 616) | fn sub(mut self, other: NP_Dec) -> <Self as core::ops::Sub<NP_Dec>>::O...
method add_assign (line 628) | fn add_assign(&mut self, other: NP_Dec) {
type Output (line 639) | type Output = NP_Dec;
method add (line 640) | fn add(mut self, other: NP_Dec) -> <Self as core::ops::Add<NP_Dec>>::O...
method mul_assign (line 652) | fn mul_assign(&mut self, other: NP_Dec) {
type Output (line 663) | type Output = NP_Dec;
method mul (line 664) | fn mul(mut self, other: NP_Dec) -> <Self as core::ops::Mul<NP_Dec>>::O...
method type_idx (line 687) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("decimal", NP_TypeKeys:...
method self_type_idx (line 688) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("decimal", NP...
method schema_to_json (line 690) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 707) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method set_from_json (line 718) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method set_value (line 741) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 784) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 809) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 856) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method schema_to_idl (line 868) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 882) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 963) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 1016) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
function into (line 401) | fn into(self) -> NP_Dec {
function into (line 438) | fn into(self) -> NP_Dec {
function round_f64 (line 445) | fn round_f64(n: f64) -> f64 {
function round_f32 (line 453) | fn round_f32(n: f32) -> f32 {
function round (line 461) | fn round(n: f64, precision: u32) -> f64 {
function precision (line 465) | fn precision(x: f64) -> Option<u32> {
function round32 (line 474) | fn round32(n: f32, precision: u32) -> f32 {
function precision32 (line 478) | fn precision32(x: f32) -> Option<u32> {
function into (line 512) | fn into(self) -> NP_Dec {
function into (line 558) | fn into(self) -> NP_Dec {
method default (line 677) | fn default() -> Self {
function schema_parsing_works_idl (line 1040) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 1057) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 1074) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 1087) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/geo.rs
type NP_Geo_Bytes (line 41) | pub struct NP_Geo_Bytes {
method schema_default (line 52) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 57) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 62) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method into_geo (line 70) | pub fn into_geo(self) -> NP_Geo {
method set_from_json (line 139) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_C...
method default_value (line 143) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_...
method type_idx (line 146) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_Geo::type_idx() }
method self_type_idx (line 147) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_Geo::type_i...
method schema_to_idl (line 149) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 153) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, name: &str, idl: ...
method schema_to_json (line 157) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_value (line 159) | fn set_value<'set>(_cursor: NP_Cursor, _memory: &'set NP_Memory, _valu...
method to_json (line 162) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method get_size (line 165) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method into_value (line 177) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method from_json_to_schema (line 217) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, json_schema: &Bo...
method from_bytes_to_schema (line 221) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize,...
method default (line 132) | fn default() -> Self {
type NP_Geo (line 233) | pub struct NP_Geo {
method schema_default (line 243) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 248) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 253) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method new (line 262) | pub fn new(size: u8, lat: f64, lng: f64) -> Self {
method get_deviser (line 267) | pub fn get_deviser(size: i64) -> f64 {
method into_json (line 278) | pub fn into_json(&self) -> NP_JSON {
method get_bytes (line 286) | pub fn get_bytes(&self) -> Option<NP_Geo_Bytes> {
method default_value (line 393) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method set_from_json (line 404) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method type_idx (line 438) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("geo", NP_TypeKeys::Geo) }
method self_type_idx (line 439) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("geo", NP_Typ...
method schema_to_json (line 441) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_value (line 461) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 588) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 655) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method schema_to_idl (line 692) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 719) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, name: &str, i...
method get_size (line 809) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 823) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 909) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 339) | fn default() -> Self {
function geo_default_value (line 344) | fn geo_default_value(size: u8, json: &NP_JSON) -> Result<Option<NP_Geo_B...
function schema_parsing_works_idl (line 970) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 1011) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 1053) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 1073) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/numbers.rs
type NP_NumType (line 55) | pub enum NP_NumType {
type NP_BigEndian (line 479) | trait NP_BigEndian {
method np_get_default_from_json (line 480) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> where Self...
method np_get_default_from_bytes (line 481) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 482) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_unwrap_default (line 483) | fn np_unwrap_default(value: Option<String>) -> Option<Self> where Self...
method np_get_default (line 498) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 504) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 517) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 591) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 595) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 608) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 666) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 670) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 683) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 739) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 743) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 756) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 814) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 818) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 831) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 887) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 891) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 904) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 960) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 964) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 977) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 1033) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 1037) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 1050) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 1105) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 1109) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 1122) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
method np_get_default (line 1178) | fn np_get_default<'default>(schema_addr: usize, ptr: &'default Vec<NP_...
method np_get_default_from_json (line 1182) | fn np_get_default_from_json(json: &NP_JSON) -> Option<Self> {
method np_get_default_from_bytes (line 1195) | fn np_get_default_from_bytes<'default>(address: usize, bytes: &'defaul...
function i8_schema_parsing_works (line 529) | fn i8_schema_parsing_works() -> Result<(), NP_Error> {
function i8_schema_parsing_works_idl (line 546) | fn i8_schema_parsing_works_idl() -> Result<(), NP_Error> {
function i8_default_value_works (line 563) | fn i8_default_value_works() -> Result<(), NP_Error> {
function i8_set_clear_value_and_compaction_works (line 575) | fn i8_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function i16_schema_parsing_works (line 620) | fn i16_schema_parsing_works() -> Result<(), NP_Error> {
function i16_default_value_works (line 638) | fn i16_default_value_works() -> Result<(), NP_Error> {
function i16_set_clear_value_and_compaction_works (line 650) | fn i16_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function i32_schema_parsing_works (line 695) | fn i32_schema_parsing_works() -> Result<(), NP_Error> {
function i32_default_value_works (line 713) | fn i32_default_value_works() -> Result<(), NP_Error> {
function i32_set_clear_value_and_compaction_works (line 723) | fn i32_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function i64_schema_parsing_works (line 768) | fn i64_schema_parsing_works() -> Result<(), NP_Error> {
function i64_default_value_works (line 786) | fn i64_default_value_works() -> Result<(), NP_Error> {
function i64_set_clear_value_and_compaction_works (line 798) | fn i64_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function u8_schema_parsing_works (line 844) | fn u8_schema_parsing_works() -> Result<(), NP_Error> {
function u8_default_value_works (line 861) | fn u8_default_value_works() -> Result<(), NP_Error> {
function u8_set_clear_value_and_compaction_works (line 871) | fn u8_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function u16_schema_parsing_works (line 916) | fn u16_schema_parsing_works() -> Result<(), NP_Error> {
function u16_default_value_works (line 934) | fn u16_default_value_works() -> Result<(), NP_Error> {
function u16_set_clear_value_and_compaction_works (line 944) | fn u16_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function u32_schema_parsing_works (line 989) | fn u32_schema_parsing_works() -> Result<(), NP_Error> {
function u32_default_value_works (line 1007) | fn u32_default_value_works() -> Result<(), NP_Error> {
function u32_set_clear_value_and_compaction_works (line 1017) | fn u32_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function u64_schema_parsing_works (line 1062) | fn u64_schema_parsing_works() -> Result<(), NP_Error> {
function u64_default_value_works (line 1079) | fn u64_default_value_works() -> Result<(), NP_Error> {
function u64_set_clear_value_and_compaction_works (line 1089) | fn u64_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function float_schema_parsing_works (line 1134) | fn float_schema_parsing_works() -> Result<(), NP_Error> {
function float_default_value_works (line 1151) | fn float_default_value_works() -> Result<(), NP_Error> {
function float_set_clear_value_and_compaction_works (line 1161) | fn float_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function double_schema_parsing_works (line 1207) | fn double_schema_parsing_works() -> Result<(), NP_Error> {
function double_default_value_works (line 1224) | fn double_default_value_works() -> Result<(), NP_Error> {
function double_set_clear_value_and_compaction_works (line 1234) | fn double_set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/option.rs
type NP_Enum (line 38) | pub enum NP_Enum {
method schema_default (line 46) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Se...
method np_max_value (line 50) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 55) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method new (line 64) | pub fn new<S: Into<String>>(value: S) -> Self {
method len (line 71) | pub fn len(&self) -> usize {
method as_bytes (line 79) | pub fn as_bytes(&self) -> &[u8] {
method to_str (line 87) | pub fn to_str(&self) -> &str {
method to_string (line 95) | pub fn to_string(&self) -> String {
method type_idx (line 111) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("option", NP_TypeKeys::...
method self_type_idx (line 112) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("option", NP_...
method schema_to_json (line 114) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_from_json (line 136) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method set_value (line 147) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method schema_to_idl (line 191) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 225) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method into_value (line 314) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method default_value (line 342) | fn default_value(_depth: usize, schema_addr: usize,schema: &Vec<NP_Par...
method to_json (line 355) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 405) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 417) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 491) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 104) | fn default() -> Self {
function schema_parsing_works_idl (line 529) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 546) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 564) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 574) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/portal.rs
type NP_Portal (line 70) | pub struct NP_Portal();
method type_idx (line 74) | fn type_idx() -> (&'value str, NP_TypeKeys) {
method self_type_idx (line 78) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) {
method schema_to_json (line 82) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method schema_to_idl (line 102) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 113) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 156) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 177) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default_value (line 196) | fn default_value(_depth: usize, _schema_addr: usize, _schemas: &Vec<NP...
method to_json (line 200) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method set_from_json (line 209) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method get_size (line 220) | fn get_size(depth:usize, cursor: &'value NP_Cursor, memory: &'value NP...
method do_compact (line 229) | fn do_compact(depth:usize, mut from_cursor: NP_Cursor, from_memory: &'...
function schema_parsing_works (line 245) | fn schema_parsing_works() -> Result<(), NP_Error> {
function infinite_recursion (line 258) | fn infinite_recursion() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 292) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/string.rs
type NP_String (line 35) | pub type NP_String<'string> = &'string str;
method schema_default (line 44) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Self:...
method np_max_value (line 60) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 80) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method type_idx (line 106) | fn type_idx() -> (&'value str, NP_TypeKeys) {
method self_type_idx (line 109) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) {
method schema_to_json (line 113) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize) -> Res...
method schema_to_idl (line 149) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
method from_idl_to_schema (line 191) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
method set_from_json (line 288) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Curs...
method from_bytes_to_schema (line 299) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
method set_value (line 345) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
method into_value (line 349) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
method get_size (line 357) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Res...
method from_json_to_schema (line 383) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
method to_json (line 485) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
method default_value (line 504) | fn default_value(_depth: usize, schema_addr: usize,schema: &Vec<NP_Parse...
function schema_default (line 515) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 518) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 522) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 529) | fn type_idx() -> (&'value str, NP_TypeKeys) { String::type_idx() }
function self_type_idx (line 530) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { String::default(...
function schema_to_json (line 532) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Re...
function set_from_json (line 536) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_Cur...
function set_value (line 541) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function default_value (line 647) | fn default_value(_depth: usize, schema_addr: usize,schema: &'value Vec<N...
function schema_to_idl (line 657) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Res...
function from_idl_to_schema (line 662) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl: ...
function into_value (line 666) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 700) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function get_size (line 704) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Resu...
function from_json_to_schema (line 708) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, _json_schema: &Box...
function from_bytes_to_schema (line 713) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, _address: usize, ...
function schema_parsing_works_idl (line 720) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 755) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 790) | fn default_value_works() -> Result<(), NP_Error> {
function fixed_size_works (line 800) | fn fixed_size_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 811) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function uppercase_lowercase_works (line 831) | fn uppercase_lowercase_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/ulid.rs
type NP_ULID (line 44) | pub struct NP_ULID {
method generate (line 60) | pub fn generate(now_ms: u64, random_seed: u32) -> NP_ULID {
method generate_with_rand (line 83) | pub fn generate_with_rand<F>(now_ms: u64, random_fn: F) -> NP_ULID whe...
method get_time (line 103) | pub fn get_time(&self) -> u64 {
method get_random (line 112) | pub fn get_random(&self) -> &[u8; 10] {
method to_string (line 118) | pub fn to_string(&self) -> String {
method from_string (line 139) | pub fn from_string<S: AsRef<str>>(value: S) -> Self {
method schema_default (line 172) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Se...
method np_max_value (line 176) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method np_min_value (line 180) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method type_idx (line 188) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("ulid", NP_TypeKeys::Ul...
method self_type_idx (line 189) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("ulid", NP_Ty...
method schema_to_json (line 191) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> ...
method set_from_json (line 198) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method schema_to_idl (line 209) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> R...
method from_idl_to_schema (line 213) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl...
method set_value (line 217) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 221) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method default_value (line 228) | fn default_value(_depth: usize, _scham_addr: usize,_schema: &Vec<NP_Pa...
method to_json (line 232) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 251) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 262) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema...
method from_bytes_to_schema (line 278) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: u...
type _NP_ULID (line 49) | pub type _NP_ULID<'a> = &'a NP_ULID;
method default (line 160) | fn default() -> Self {
method fmt (line 166) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
function schema_default (line 292) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 295) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 299) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 307) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_ULID::type_idx() }
function self_type_idx (line 308) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_ULID::default...
function schema_to_json (line 310) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Re...
function set_from_json (line 314) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_Cur...
function schema_to_idl (line 319) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Res...
function from_idl_to_schema (line 323) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl: ...
function set_value (line 327) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function default_value (line 350) | fn default_value(_depth: usize, _scham_addr: usize,_schema: &Vec<NP_Pars...
function into_value (line 354) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 373) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function get_size (line 377) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Resu...
function from_json_to_schema (line 381) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, _json_schema: &Box...
function from_bytes_to_schema (line 386) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, _address: usize, ...
function schema_parsing_works_idl (line 393) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 404) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 416) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/union.rs
type NP_Union (line 23) | pub struct NP_Union {
method schema_default (line 32) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Se...
method np_max_value (line 36) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method np_min_value (line 40) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method select (line 49) | pub fn select(mut cursor: NP_Cursor, types: &Vec<(u8, String, usize)>,...
method type_idx (line 102) | fn type_idx() -> (&'value str, NP_TypeKeys) {
method self_type_idx (line 106) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) {
method schema_to_json (line 110) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method schema_to_idl (line 132) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> R...
method from_idl_to_schema (line 136) | fn from_idl_to_schema(_schema: Vec<NP_Parsed_Schema>, _name: &str, _id...
method from_json_to_schema (line 140) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 228) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method set_from_json (line 281) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_C...
method default_value (line 285) | fn default_value(_depth: usize, _schema_addr: usize, _schemas: &Vec<NP...
method into_value (line 291) | fn into_value(_cursor: &NP_Cursor, _memory: &'value NP_Memory) -> Resu...
method to_json (line 297) | fn to_json(_depth:usize, _cursor: &NP_Cursor, _memory: &'value NP_Memo...
method get_size (line 310) | fn get_size(_depth:usize, _cursor: &'value NP_Cursor, _memory: &'value...
method do_compact (line 323) | fn do_compact<, M2: NP_Memory>(_depth:usize, mut _from_cursor: NP_Curs...
function schema_parsing_works (line 341) | fn schema_parsing_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/pointer/uuid.rs
type NP_UUID (line 49) | pub struct NP_UUID {
method generate (line 62) | pub fn generate(random_seed: u32) -> Self {
method generate_with_rand (line 85) | pub fn generate_with_rand<F>(random_fn: F) -> Self where F: Fn() -> u8 {
method from_string (line 103) | pub fn from_string<S: AsRef<str>>(uuid: S) -> NP_UUID {
method to_string (line 121) | pub fn to_string(&self) -> String {
method schema_default (line 150) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Se...
method np_max_value (line 153) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method np_min_value (line 157) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method type_idx (line 166) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("uuid", NP_TypeKeys::Uu...
method self_type_idx (line 167) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("uuid", NP_Ty...
method schema_to_json (line 169) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> ...
method set_value (line 176) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method set_from_json (line 180) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method schema_to_idl (line 193) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> R...
method from_idl_to_schema (line 197) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl...
method default_value (line 201) | fn default_value(_depth: usize, _scham_addr: usize,_schema: &Vec<NP_Pa...
method into_value (line 205) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 212) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 231) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 242) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema...
method from_bytes_to_schema (line 258) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: u...
type _NP_UUID (line 56) | pub type _NP_UUID<'a> = &'a NP_UUID;
method fmt (line 138) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
method default (line 144) | fn default() -> Self {
function schema_default (line 271) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 275) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 279) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 286) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_UUID::type_idx() }
function self_type_idx (line 287) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_UUID::default...
function schema_to_json (line 289) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Re...
function set_value (line 293) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function schema_to_idl (line 316) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Res...
function from_idl_to_schema (line 320) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl: ...
function default_value (line 324) | fn default_value(_depth: usize, _scham_addr: usize,_schema: &Vec<NP_Pars...
function set_from_json (line 328) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_Cur...
function into_value (line 332) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 351) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function get_size (line 355) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Resu...
function from_json_to_schema (line 359) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, _json_schema: &Box...
function from_bytes_to_schema (line 363) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, _address: usize, ...
function schema_parsing_works_idl (line 369) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 380) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 393) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/schema/args.rs
type NP_Schema_Args (line 9) | pub enum NP_Schema_Args {
method query (line 97) | pub fn query<'q>(&'q self, path: &str, str_source: &'q str) -> Option<...
type NP_Args (line 21) | pub enum NP_Args<'a> {
function from_schema_args (line 33) | pub fn from_schema_args(schema: &NP_Schema_Args, source_string: &'a str)...
function to_json (line 55) | pub fn to_json(&self) -> NP_JSON {
method default (line 89) | fn default() -> Self {
FILE: no_proto_rs/src/schema/ast.rs
constant AST_ERROR_RANGE (line 20) | const AST_ERROR_RANGE: usize = 20;
type AST (line 26) | pub enum AST {
method parse (line 70) | pub fn parse(input: &str) -> Result<Vec<Self>, NP_Error> {
method recursive_parse (line 79) | fn recursive_parse(depth: usize, result: &mut Vec<AST>, chars: &[u8], ...
type ast_cursor_state (line 44) | enum ast_cursor_state {
type ast_state (line 57) | struct ast_state {
FILE: no_proto_rs/src/schema/mod.rs
type AST_STR (line 17) | pub struct AST_STR {
method read (line 24) | pub fn read<'read>(&self, source: &'read str) -> &'read str {
method read_bytes (line 28) | pub fn read_bytes<'read>(&self, source: &'read [u8]) -> &'read str {
method from_bytes (line 32) | pub fn from_bytes(pos: usize, buffer: &[u8]) -> Result<(usize, Self), ...
method to_bytes (line 48) | pub fn to_bytes(&self) -> [u8; 3] {
type NP_Schem_Kind (line 67) | pub struct NP_Schem_Kind {
method new (line 72) | pub fn new(val: NP_Type<usize, AST_STR>) -> Self {
type Target (line 78) | type Target = NP_Type<usize, AST_STR>;
method deref (line 79) | fn deref(&self) -> &Self::Target {
method deref_mut (line 85) | fn deref_mut(&mut self) -> &mut Self::Target {
type NP_Schema_Value (line 91) | pub struct NP_Schema_Value {
type NP_Parsed_Generics (line 100) | enum NP_Parsed_Generics {
method default (line 107) | fn default() -> Self {
constant POINTER_SIZE (line 113) | const POINTER_SIZE: u32 = 4u32;
type NP_Schema (line 116) | pub struct NP_Schema {
type NP_Schema_Index (line 127) | pub struct NP_Schema_Index {
FILE: no_proto_rs/src/schema/parser.rs
type ChildItemParseState (line 22) | enum ChildItemParseState {
method get_source_as_str (line 122) | pub fn get_source_as_str(&self) -> &str {
method parse (line 333) | pub fn parse<S>(input: S) -> Result<Self, NP_Error>
method maybe_error_on_generics (line 435) | fn maybe_error_on_generics(result_schema: &NP_Schema_Value) -> Result<()...
method maybe_parse_children (line 455) | fn maybe_parse_children(
method maybe_parse_title (line 478) | fn maybe_parse_title(
method maybe_parse_generics (line 497) | fn maybe_parse_generics(
method parse_argument_groups (line 537) | fn parse_argument_groups(source: &str, items: &Vec<AST>) -> Result<NP_Sc...
method maybe_parse_arguments (line 705) | fn maybe_parse_arguments(
method str_to_type (line 725) | fn str_to_type(
method parse_single_type (line 887) | fn parse_single_type(
method read_ast_str (line 2117) | pub fn read_ast_str(&self, ast_str: AST_STR) -> &str {
method bytes_to_args (line 2121) | fn bytes_to_args(
method args_to_bytes (line 2175) | fn args_to_bytes(
method to_bytes (line 2716) | pub fn to_bytes(&self) -> Result<Vec<u8>, NP_Error> {
FILE: no_proto_rs/src/schema/tests.rs
function empty_parse_1 (line 14) | fn empty_parse_1() -> Result<(), NP_Error> {
function any_parse_1 (line 27) | fn any_parse_1() -> Result<(), NP_Error> {
function info_parse_1 (line 49) | fn info_parse_1() -> Result<(), NP_Error> {
function string_parse_1 (line 105) | fn string_parse_1() -> Result<(), NP_Error> {
function string_parse_2 (line 126) | fn string_parse_2() -> Result<(), NP_Error> {
function string_parse_3 (line 153) | fn string_parse_3() -> Result<(), NP_Error> {
function char_parse_1 (line 180) | fn char_parse_1() -> Result<(), NP_Error> {
function i8_parse_1 (line 202) | fn i8_parse_1() -> Result<(), NP_Error> {
function i16_parse_1 (line 226) | fn i16_parse_1() -> Result<(), NP_Error> {
function i32_parse_1 (line 250) | fn i32_parse_1() -> Result<(), NP_Error> {
function i64_parse_1 (line 274) | fn i64_parse_1() -> Result<(), NP_Error> {
function u8_parse_1 (line 298) | fn u8_parse_1() -> Result<(), NP_Error> {
function u16_parse_1 (line 322) | fn u16_parse_1() -> Result<(), NP_Error> {
function u32_parse_1 (line 346) | fn u32_parse_1() -> Result<(), NP_Error> {
function u64_parse_1 (line 370) | fn u64_parse_1() -> Result<(), NP_Error> {
function f32_parse_1 (line 394) | fn f32_parse_1() -> Result<(), NP_Error> {
function f64_parse_1 (line 418) | fn f64_parse_1() -> Result<(), NP_Error> {
function dec32_parse_1 (line 442) | fn dec32_parse_1() -> Result<(), NP_Error> {
function dec64_parse_1 (line 467) | fn dec64_parse_1() -> Result<(), NP_Error> {
function bool_parse_1 (line 492) | fn bool_parse_1() -> Result<(), NP_Error> {
function geo32_parse_1 (line 514) | fn geo32_parse_1() -> Result<(), NP_Error> {
function geo64_parse_1 (line 537) | fn geo64_parse_1() -> Result<(), NP_Error> {
function geo128_parse_1 (line 560) | fn geo128_parse_1() -> Result<(), NP_Error> {
function uuid_parse_1 (line 583) | fn uuid_parse_1() -> Result<(), NP_Error> {
function ulid_parse_1 (line 604) | fn ulid_parse_1() -> Result<(), NP_Error> {
function map_parse_1 (line 625) | fn map_parse_1() -> Result<(), NP_Error> {
function vec_parse_1 (line 650) | fn vec_parse_1() -> Result<(), NP_Error> {
function result_parse_1 (line 676) | fn result_parse_1() -> Result<(), NP_Error> {
function option_parse_1 (line 703) | fn option_parse_1() -> Result<(), NP_Error> {
function array_parse_1 (line 728) | fn array_parse_1() -> Result<(), NP_Error> {
function nested_opts_1 (line 753) | fn nested_opts_1() -> Result<(), NP_Error> {
function nested_opts_2 (line 782) | fn nested_opts_2() -> Result<(), NP_Error> {
function nested_opts_3 (line 811) | fn nested_opts_3() -> Result<(), NP_Error> {
function struct_test_1 (line 838) | fn struct_test_1() -> Result<(), NP_Error> {
function struct_test_2 (line 880) | fn struct_test_2() -> Result<(), NP_Error> {
function enum_test_1 (line 922) | fn enum_test_1() -> Result<(), NP_Error> {
function enum_test_2 (line 953) | fn enum_test_2() -> Result<(), NP_Error> {
function enum_test_3 (line 1005) | fn enum_test_3() -> Result<(), NP_Error> {
function enum_test_4 (line 1059) | fn enum_test_4() -> Result<(), NP_Error> {
function tuple_test_1 (line 1091) | fn tuple_test_1() -> Result<(), NP_Error> {
function tuple_test_2 (line 1128) | fn tuple_test_2() -> Result<(), NP_Error> {
function tuple_test_3 (line 1165) | fn tuple_test_3() -> Result<(), NP_Error> {
function nesting_test_1 (line 1202) | fn nesting_test_1() -> Result<(), NP_Error> {
function generic_test_1 (line 1324) | fn generic_test_1() -> Result<(), NP_Error> {
function impl_test_1 (line 1398) | fn impl_test_1() -> Result<(), NP_Error> {
FILE: no_proto_rs/src/types.rs
type NP_String_Casing (line 9) | pub enum NP_String_Casing {
method default (line 16) | fn default() -> Self {
type NP_Type (line 23) | pub enum NP_Type<CHILD: Debug + PartialEq + Default, STR: Debug + Partia...
method default (line 74) | fn default() -> Self {
function from (line 80) | fn from(value: u8) -> Self {
function from (line 130) | fn from(value: NP_Type<CHILD, STR>) -> Self {
function from (line 180) | fn from(value: &str) -> Self {
function from (line 235) | fn from(value: &NP_Type<CHILD, STR>) -> Self {
function get_str (line 285) | pub fn get_str(&self) -> &str {
FILE: no_proto_rs/src/utils.rs
constant KX (line 10) | const KX: u32 = 123456789;
constant KY (line 11) | const KY: u32 = 362436069;
constant KZ (line 12) | const KZ: u32 = 521288629;
constant KW (line 13) | const KW: u32 = 88675123;
function to_unsigned (line 16) | pub fn to_unsigned(byte: u8) -> u8 {
function to_signed (line 21) | pub fn to_signed(byte: u8) -> u8 {
type Rand (line 25) | pub struct Rand {
method new (line 30) | pub fn new(seed: u32) -> Rand {
method rand (line 38) | pub fn rand(&mut self) -> u32 {
method gen_range (line 45) | pub fn gen_range(&mut self, a: i32, b: i32) -> i32 {
function opt_err (line 52) | pub fn opt_err<T>(optin: Option<T>) -> Result<T, NP_Error> {
function from_base32 (line 62) | pub fn from_base32<S: AsRef<str>>(value_str: S) -> u128 {
function to_base32 (line 85) | pub fn to_base32(num: u128, length: i32) -> String {
FILE: no_proto_rs/src/values/mod.rs
type NP_Value (line 6) | pub trait NP_Value: Sized {
method write_value (line 8) | fn write_value(self, address: usize, memory: &NP_Memory) -> Result<(),...
method read_value (line 9) | fn read_value(address: usize, memory: &NP_Memory) -> Result<Self, NP_E...
method write_json (line 11) | fn write_json(json: &NP_JSON, address: usize, memory: &NP_Memory) -> R...
method read_json (line 12) | fn read_json(address: usize, memory: &NP_Memory) -> Result<NP_JSON, NP...
method read_bytes (line 14) | fn read_bytes(address: usize, memory: &NP_Memory) -> Result<&[u8], NP_...
FILE: no_proto_rs_old/src/buffer.rs
constant DEFAULT_ROOT_PTR_ADDR (line 23) | pub const DEFAULT_ROOT_PTR_ADDR: usize = 2;
constant LIST_MAX_SIZE (line 26) | pub const LIST_MAX_SIZE: usize = core::u16::MAX as usize;
constant VTABLE_SIZE (line 28) | pub const VTABLE_SIZE: usize = 4;
constant VTABLE_BYTES (line 30) | pub const VTABLE_BYTES: usize = 20;
type NP_Buffer (line 37) | pub struct NP_Buffer {
method _new (line 79) | pub fn _new(memory: NP_Memory) -> Self { // make new buffer
method json_encode (line 112) | pub fn json_encode(&self, path: &[&str]) -> Result<NP_JSON, NP_Error> {
method finish (line 152) | pub fn finish(self) -> NP_Finished_Buffer {
method read_bytes (line 158) | pub fn read_bytes(&self) -> &[u8] {
method move_cursor (line 166) | pub fn move_cursor(&mut self, path: &[&str]) -> Result<bool, NP_Error> {
method cursor_to_root (line 183) | pub fn cursor_to_root(&mut self) {
method set_max (line 233) | pub fn set_max(&mut self, path: &[&str]) -> Result<bool, NP_Error> {
method set_min (line 293) | pub fn set_min(&mut self, path: &[&str]) -> Result<bool, NP_Error> {
method set (line 333) | pub fn set<'set, X: 'set>(&mut self, path: &[&str], value: X) -> Resul...
method set_with_json (line 397) | pub fn set_with_json<S: Into<String>>(&mut self, path: &[&str], json_v...
method get_collection (line 568) | pub fn get_collection<'iter>(&'iter self, path: &'iter [&str]) -> Resu...
method list_push (line 639) | pub fn list_push<'push, X: 'push>(&mut self, path: &[&str], value: X) ...
method get_length (line 779) | pub fn get_length(&self, path: &[&str]) -> Result<Option<usize>, NP_Er...
method del (line 893) | pub fn del(&mut self, path: &[&str]) -> Result<bool, NP_Error> {
method get_schema_type (line 929) | pub fn get_schema_type(&self, path: &[&str]) -> Result<Option<NP_TypeK...
method get_schema_default (line 975) | pub fn get_schema_default<'get, X: 'get>(&'get self, path: &[&str]) ->...
method get (line 1021) | pub fn get<'get, X: 'get>(&'get self, path: &[&str]) -> Result<Option<...
method maybe_compact (line 1109) | pub fn maybe_compact<F>(&mut self, new_capacity: Option<usize>, mut ca...
method compact (line 1171) | pub fn compact<'compact>(&mut self, new_capacity: Option<usize>) -> Re...
method compact_into (line 1223) | pub fn compact_into(&mut self, new_capacity: Option<usize>) -> Result<...
method copy_buffer (line 1244) | pub fn copy_buffer(&self) -> NP_Buffer {
method calc_bytes (line 1271) | pub fn calc_bytes<'bytes>(&self) -> Result<NP_Size_Data, NP_Error> {
method set_max_data_length (line 1295) | pub fn set_max_data_length(&mut self, len: usize) {
method data_length (line 1303) | pub fn data_length(&self) -> usize {
type NP_Finished_Buffer (line 50) | pub struct NP_Finished_Buffer {
method buffer_len (line 57) | pub fn buffer_len(self) -> usize {
method data_len (line 63) | pub fn data_len(self) -> usize {
method bytes (line 71) | pub fn bytes(self) -> Vec<u8> {
type NP_Item (line 1309) | pub struct NP_Item<'item> {
function has_value (line 1325) | pub fn has_value(&self) -> bool {
function get (line 1334) | pub fn get<X>(&'item self) -> Result<Option<X>, NP_Error> where X: NP_Va...
function set (line 1357) | pub fn set<X>(&'item mut self, value: X) -> Result<(), NP_Error> where X...
function del (line 1389) | pub fn del(&'item mut self) -> bool {
type NP_Iterator_Collection (line 1412) | pub enum NP_Iterator_Collection<'col> {
function new (line 1427) | pub fn new(cursor: NP_Cursor, memory: &'col NP_Memory) -> Result<Self, N...
type NP_Generic_Iterator (line 1451) | pub struct NP_Generic_Iterator<'it> {
function new (line 1460) | pub fn new(cursor: NP_Cursor, memory: &'it NP_Memory) -> Result<Self, NP...
type Item (line 1472) | type Item = NP_Item<'it>;
method next (line 1474) | fn next(&mut self) -> Option<Self::Item> {
FILE: no_proto_rs_old/src/collection/list.rs
type NP_List_Bytes (line 15) | pub struct NP_List_Bytes {
method set_head (line 23) | pub fn set_head(&mut self, head: u32) {
method get_head (line 27) | pub fn get_head(&self) -> u32 {
method set_tail (line 31) | pub fn set_tail(&mut self, tail: u32) {
method get_tail (line 35) | pub fn get_tail(&self) -> u32 {
type List_Item (line 42) | struct List_Item {
type NP_List (line 51) | pub struct NP_List {
method select (line 68) | pub fn select(list_cursor: NP_Cursor, index: usize, make_path: bool, s...
method make_item_in_loop (line 159) | pub fn make_item_in_loop(self, memory: &NP_Memory) -> Result<NP_Cursor...
method make_list (line 189) | pub fn make_list<'make>(list_cursor: &NP_Cursor, memory: &'make NP_Mem...
method get_list (line 197) | pub fn get_list<'list>(list_cursor_value_addr: usize, memory: &'list N...
method new_iter (line 206) | pub fn new_iter(list_cursor: &NP_Cursor, memory: &NP_Memory, only_real...
method step_iter (line 257) | pub fn step_iter(&mut self, memory: &NP_Memory) -> Option<(usize, Opti...
method push (line 315) | pub fn push<'push>(list_cursor: &NP_Cursor, memory: &NP_Memory, index:...
method to_json (line 367) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method type_idx (line 389) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("list", NP_TypeKeys::Li...
method self_type_idx (line 390) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("list", NP_Ty...
method schema_to_json (line 392) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_from_json (line 405) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method get_size (line 432) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Re...
method do_compact (line 458) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'valu...
method schema_to_idl (line 480) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 490) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 529) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method default_value (line 557) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_...
method from_bytes_to_schema (line 561) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
function schema_parsing_works_idl (line 579) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 589) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 599) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function parseing_works (line 636) | fn parseing_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/collection/map.rs
type NP_Map_Bytes (line 16) | pub struct NP_Map_Bytes {
method set_head (line 23) | pub fn set_head(&mut self, head: u32) {
method get_head (line 27) | pub fn get_head(&self) -> u32 {
type Map_Item (line 34) | struct Map_Item<'item> {
function new (line 40) | pub fn new(key: &'item str, buff_addr: usize) -> Self {
type NP_Map (line 49) | pub struct NP_Map<'map> {
function select (line 61) | pub fn select(map_cursor: NP_Cursor, key: &str, make_path: bool, schema_...
function get_map (line 89) | pub fn get_map<'get>(map_buff_addr: usize, memory: &'get NP_Memory) -> &...
function new_iter (line 98) | pub fn new_iter(map_cursor: &NP_Cursor, memory: &'map NP_Memory) -> Self {
function step_iter (line 129) | pub fn step_iter(&mut self, memory: &'map NP_Memory) -> Option<(&'map st...
function insert (line 168) | pub fn insert(map_cursor: &NP_Cursor, memory: &NP_Memory, key: &str) -> ...
function to_json (line 204) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function set_from_json (line 222) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Cursor...
function type_idx (line 241) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("map", NP_TypeKeys::Map) }
function self_type_idx (line 242) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("map", NP_TypeK...
function schema_to_json (line 244) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 257) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
function do_compact (line 283) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'value ...
function schema_to_idl (line 302) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
function from_idl_to_schema (line 312) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
function from_json_to_schema (line 352) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 381) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_Sc...
function from_bytes_to_schema (line 385) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_parsing_works_idl (line 400) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 410) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 420) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/collection/struc.rs
type NP_Struct (line 19) | pub struct NP_Struct<'table> {
function select (line 31) | pub fn select(mut table_cursor: NP_Cursor, schema: &NP_Parsed_Schema, k...
function make_first_vtable (line 90) | pub fn make_first_vtable<'make>(table_cursor: NP_Cursor, memory: &'make ...
function make_next_vtable (line 100) | pub fn make_next_vtable<'make>(prev_vtable: &'make mut NP_Vtable, memory...
function new_iter (line 110) | pub fn new_iter(cursor: &NP_Cursor, memory: &'table NP_Memory) -> Self {
function get_vtable (line 130) | pub fn get_vtable<'vtable>(v_table_addr: usize, memory: &'vtable NP_Memo...
function step_iter (line 139) | pub fn step_iter(&mut self, memory: &'table NP_Memory) -> Option<(usize,...
function to_json (line 182) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function type_idx (line 202) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("struct", NP_TypeKeys::St...
function self_type_idx (line 203) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("struct", NP_Ty...
function set_from_json (line 205) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Cursor...
function from_bytes_to_schema (line 240) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_to_json (line 294) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function get_size (line 313) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
function do_compact (line 349) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'value ...
function schema_to_idl (line 388) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
function from_idl_to_schema (line 408) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
function from_json_to_schema (line 514) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function default_value (line 598) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_Sc...
function schema_parsing_works_idl (line 605) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 616) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 626) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function test_vtables (line 663) | fn test_vtables() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/collection/tuple.rs
type NP_Tuple (line 18) | pub struct NP_Tuple {
method select (line 27) | pub fn select(mut tuple_cursor: NP_Cursor, schema: &NP_Parsed_Schema, ...
method alloc_tuple (line 73) | pub fn alloc_tuple<'make>(tuple_cursor: NP_Cursor, empty: &Vec<u8>, me...
method new_iter (line 82) | pub fn new_iter(cursor: &NP_Cursor, _memory: &NP_Memory) -> Self {
method step_iter (line 90) | pub fn step_iter(&mut self, memory: &NP_Memory, show_empty: bool) -> O...
method to_json (line 125) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method type_idx (line 146) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("tuple", NP_TypeKeys::T...
method self_type_idx (line 147) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("tuple", NP_T...
method schema_to_json (line 149) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_from_json (line 168) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method get_size (line 189) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method do_compact (line 219) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'valu...
method schema_to_idl (line 245) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 267) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 373) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method default_value (line 464) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_...
method from_bytes_to_schema (line 468) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize,...
function schema_parsing_works_idl (line 527) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 543) | fn schema_parsing_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 560) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
function sorting_tuples_works (line 581) | fn sorting_tuples_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/error.rs
type NP_Error (line 10) | pub enum NP_Error {
method new (line 28) | pub fn new<S: AsRef<str>>(message: S) -> Self {
method unwrap (line 32) | pub fn unwrap<T>(value: Option<T>) -> Result<T, NP_Error> {
method from (line 41) | fn from(err: FromUtf8Error) -> NP_Error {
method from (line 47) | fn from(err: core::num::ParseFloatError) -> NP_Error {
method from (line 53) | fn from(err: core::num::ParseIntError) -> NP_Error {
FILE: no_proto_rs_old/src/hashmap.rs
type NP_HashMap (line 9) | pub struct NP_HashMap<V> {
constant HASH_SIZE (line 13) | const HASH_SIZE: usize = 4096;
function empty (line 17) | pub fn empty() -> Self {
function new (line 21) | pub fn new() -> Self {
function insert (line 27) | pub fn insert(&mut self, key: &str, value: V) -> Result<(), NP_Error> {
function get (line 48) | pub fn get(&self, key: &str) -> Option<&V> {
function delete (line 76) | pub fn delete(&mut self, key: &str) {
function fmix32 (line 113) | fn fmix32(mut h: u32) -> u32 {
function get_32_block (line 124) | fn get_32_block(bytes: &[u8], index: usize) -> u32 {
function murmurhash3_x86_32 (line 135) | pub fn murmurhash3_x86_32(bytes: &[u8], seed: u32) -> u32 {
FILE: no_proto_rs_old/src/idl.rs
type AST_STR (line 11) | pub struct AST_STR {
type JS_AST (line 19) | pub enum JS_AST {
type JS_Schema (line 33) | pub struct JS_Schema {
method new (line 49) | pub fn new(schema: String) -> Result<Self, NP_Error> {
method get_str (line 74) | pub fn get_str(&self, addr: &AST_STR) -> &str {
method parse (line 78) | fn parse(depth: usize, start: usize, end: usize, schema: &str) -> Resu...
type js_control (line 39) | enum js_control {
function test (line 517) | fn test() {
FILE: no_proto_rs_old/src/json_flex.rs
type JSMAP (line 48) | pub struct JSMAP {
method new (line 56) | pub fn new() -> Self {
method insert (line 61) | pub fn insert(&mut self, key: String, value: NP_JSON) -> usize {
method get_mut (line 76) | pub fn get_mut(&mut self, key: &str) -> Option<&mut NP_JSON> {
method get (line 86) | pub fn get(&self, key: &str) -> Option<&NP_JSON> {
method has (line 96) | pub fn has(&self, key: &str) -> bool {
type NP_JSON (line 108) | pub enum NP_JSON {
method clone (line 133) | pub fn clone(&self) -> NP_JSON {
method into_string (line 179) | pub fn into_string(&self) -> Option<&String> {
method into_i64 (line 186) | pub fn into_i64(&self) -> Option<&i64> {
method into_f64 (line 193) | pub fn into_f64(&self) -> Option<&f64> {
method into_hashmap (line 200) | pub fn into_hashmap(&self) -> Option<&JSMAP> {
method into_vec (line 207) | pub fn into_vec(&self) -> Option<&Vec<NP_JSON>> {
method is_null (line 214) | pub fn is_null(&self) -> bool {
method is_true (line 221) | pub fn is_true(&self) -> bool {
method is_false (line 228) | pub fn is_false(&self) -> bool {
method is_array (line 235) | pub fn is_array(&self) -> bool {
method is_dictionary (line 242) | pub fn is_dictionary(&self) -> bool {
method is_string (line 249) | pub fn is_string(&self) -> bool {
method is_integer (line 256) | pub fn is_integer(&self) -> bool {
method is_float (line 263) | pub fn is_float(&self) -> bool {
method unwrap_string (line 270) | pub fn unwrap_string(&self) -> Option<&String> {
method unwrap_i64 (line 277) | pub fn unwrap_i64(&self) -> Option<&i64> {
method unwrap_f64 (line 284) | pub fn unwrap_f64(&self) -> Option<&f64> {
method unwrap_hashmap (line 291) | pub fn unwrap_hashmap(&self) -> Option<&JSMAP> {
method unwrap_vec (line 298) | pub fn unwrap_vec(&self) -> Option<&Vec<NP_JSON>> {
method stringify (line 305) | pub fn stringify(&self) -> String {
type Output (line 357) | type Output = NP_JSON;
method index (line 358) | fn index<'a>(&'a self, id: usize) -> &'a Self::Output {
type Output (line 372) | type Output = NP_JSON;
method index (line 373) | fn index<'a>(&'a self, id: String) -> &'a Self::Output {
type Output (line 387) | type Output = NP_JSON;
method index (line 388) | fn index<'b>(&'b self, id: &str) -> &'b Self::Output {
function recursive (line 402) | fn recursive(v: &mut NP_JSON,
function json_decode (line 497) | pub fn json_decode<'json>(text: String) -> Result<Box<NP_JSON>, NP_Error> {
FILE: no_proto_rs_old/src/lib.rs
type NP_Factory (line 466) | pub struct NP_Factory {
method new (line 492) | pub fn new<S>(es6_schema: S) -> Result<Self, NP_Error> where S: Into<S...
method new_bytes (line 511) | pub fn new_bytes(schema_bytes: &[u8]) -> Result<Self, NP_Error> {
method export_schema_bytes (line 528) | pub fn export_schema_bytes(&self) -> &[u8] {
method export_schema_idl (line 534) | pub fn export_schema_idl(&self) -> Result<String, NP_Error> {
method open_buffer (line 540) | pub fn open_buffer(&self, bytes: Vec<u8>) -> NP_Buffer {
method open_buffer_ref (line 550) | pub fn open_buffer_ref<'buffer>(&'buffer self, bytes: &'buffer [u8]) -...
method open_buffer_ref_mut (line 563) | pub fn open_buffer_ref_mut<'buffer>(&'buffer self, bytes: &'buffer mut...
method new_buffer (line 572) | pub fn new_buffer<'buffer>(&'buffer self, capacity: Option<usize>) -> ...
method new_buffer_ref_mut (line 580) | pub fn new_buffer_ref_mut<'buffer>(&'buffer self, bytes: &'buffer mut ...
type NP_Size_Data (line 477) | pub struct NP_Size_Data {
function threading_works (line 687) | fn threading_works() {
FILE: no_proto_rs_old/src/memory.rs
type NP_Memory_Kind (line 10) | pub enum NP_Memory_Kind {
type NP_Memory (line 20) | pub struct NP_Memory {
method existing_owned (line 46) | pub fn existing_owned(bytes: Vec<u8>, schema: *const Vec<NP_Parsed_Sch...
method existing_ref (line 58) | pub fn existing_ref(bytes: *const [u8], schema: *const Vec<NP_Parsed_S...
method existing_ref_mut (line 70) | pub fn existing_ref_mut(bytes: *mut [u8], len: usize, schema: *const V...
method new (line 82) | pub fn new(capacity: Option<usize>, schema: *const Vec<NP_Parsed_Schem...
method new_ref_mut (line 103) | pub fn new_ref_mut(bytes: *mut [u8], schema: *const Vec<NP_Parsed_Sche...
method new_empty (line 114) | pub fn new_empty(&self, capacity: Option<usize>) -> Result<Self, NP_Er...
method is_ref_mut (line 134) | pub fn is_ref_mut(&self) -> bool {
method set_length (line 143) | pub fn set_length(&mut self, new_len: usize) -> Result<(), NP_Error> {
method set_max_length (line 165) | pub fn set_max_length(&mut self, len: usize) {
method length (line 183) | pub fn length(&self) -> usize {
method get_schemas (line 193) | pub fn get_schemas(&self) -> &Vec<NP_Parsed_Schema> {
method get_schema (line 198) | pub fn get_schema(&self, idx: usize) -> &NP_Parsed_Schema {
method malloc_borrow (line 203) | pub fn malloc_borrow(&self, bytes: &[u8]) -> Result<usize, NP_Error> {
method malloc (line 236) | pub fn malloc(&self, bytes: Vec<u8>) -> Result<usize, NP_Error> {
method read_bytes (line 241) | pub fn read_bytes(&self) -> &[u8] {
method write_bytes (line 251) | pub fn write_bytes(&self) -> &mut [u8] {
method get_1_byte (line 265) | pub fn get_1_byte(&self, address: usize) -> Option<u8> {
method get_2_bytes (line 276) | pub fn get_2_bytes(&self, address: usize) -> Option<&[u8; 2]> {
method get_4_bytes (line 295) | pub fn get_4_bytes(&self, address: usize) -> Option<&[u8; 4]> {
method get_8_bytes (line 314) | pub fn get_8_bytes(&self, address: usize) -> Option<&[u8; 8]> {
method get_16_bytes (line 333) | pub fn get_16_bytes(&self, address: usize) -> Option<&[u8; 16]> {
method get_32_bytes (line 352) | pub fn get_32_bytes(&self, address: usize) -> Option<&[u8; 32]> {
method dump (line 370) | pub fn dump(self) -> Vec<u8> {
method clone (line 31) | fn clone(&self) -> Self {
FILE: no_proto_rs_old/src/new_idl.rs
type AST_STR (line 12) | pub struct AST_STR {
type AST (line 22) | pub enum AST {
method parse (line 60) | pub fn parse(input: &str) -> Result<Vec<Self>, NP_Error> {
method recursive_parse (line 67) | pub fn recursive_parse(depth: usize, result: &mut Vec<AST>, source: &s...
type ast_cursor_state (line 36) | enum ast_cursor_state {
type ast_state (line 48) | struct ast_state {
function test (line 328) | fn test() {
FILE: no_proto_rs_old/src/pointer/any.rs
type NP_Any (line 15) | pub struct NP_Any { }
method type_idx (line 20) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("any", NP_TypeKeys::Any) }
method self_type_idx (line 21) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("any", NP_Typ...
method schema_to_json (line 23) | fn schema_to_json(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> ...
method schema_to_idl (line 30) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> R...
method from_idl_to_schema (line 34) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl...
method set_from_json (line 38) | fn set_from_json<'set>(depth: usize, apply_null: bool, cursor: NP_Curs...
method set_value (line 42) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 45) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 48) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method get_size (line 51) | fn get_size(depth:usize, _cursor: &NP_Cursor, _memory: &NP_Memory) -> ...
method do_compact (line 54) | fn do_compact(depth:usize, from_cursor: NP_Cursor, from_memory: &'valu...
method from_json_to_schema (line 57) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, _json_schema...
method default_value (line 71) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method from_bytes_to_schema (line 75) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, _address: u...
method default (line 87) | fn default() -> Self {
function schema_parsing_works (line 94) | fn schema_parsing_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/pointer/bool.rs
function schema_default (line 34) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 37) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 41) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 48) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("bool", NP_TypeKeys::Bool...
function self_type_idx (line 49) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("bool", NP_Type...
function schema_to_json (line 51) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function default_value (line 68) | fn default_value(_depth: usize, address: usize, schema: &Vec<NP_Parsed_S...
function set_from_json (line 74) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Curs...
function set_value (line 88) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function into_value (line 121) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 140) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) ...
function get_size (line 175) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Res...
function schema_to_idl (line 184) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resul...
function from_idl_to_schema (line 203) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, id...
function from_json_to_schema (line 256) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema: &...
function from_bytes_to_schema (line 286) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: usiz...
function schema_parsing_works_idl (line 304) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 320) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 336) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 347) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/pointer/bytes.rs
type NP_Bytes (line 33) | pub type NP_Bytes = Vec<u8>;
method schema_default (line 41) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 56) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 74) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method type_idx (line 98) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("bytes", NP_TypeKeys::B...
method self_type_idx (line 99) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("bytes", NP_T...
method schema_to_json (line 101) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 124) | fn default_value(_depth: usize, address: usize, schema: &Vec<NP_Parsed...
method set_value (line 136) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method schema_to_idl (line 141) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 171) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method set_from_json (line 258) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method into_value (line 285) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 292) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 327) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 352) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 424) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
type NP_Borrow_Bytes (line 37) | pub type NP_Borrow_Bytes<'bytes> = &'bytes [u8];
function schema_default (line 471) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Self...
function np_max_value (line 475) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function np_min_value (line 479) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Self> {
function type_idx (line 488) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_Bytes::type_idx() }
function self_type_idx (line 489) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_Bytes::type_i...
function schema_to_json (line 491) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Resu...
function set_from_json (line 495) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_Cur...
function default_value (line 499) | fn default_value(_depth: usize, addr: usize, schema: &'value Vec<NP_Pars...
function schema_to_idl (line 511) | fn schema_to_idl(_schema: &Vec<NP_Parsed_Schema>, _address: usize)-> Res...
function from_idl_to_schema (line 516) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, _name: &str, _idl: ...
function set_value (line 521) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: Se...
function into_value (line 619) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result<O...
function to_json (line 652) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory) -...
function get_size (line 656) | fn get_size(depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> Resu...
function from_json_to_schema (line 660) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, json_schema: &Box<...
function from_bytes_to_schema (line 664) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize, b...
function schema_parsing_works_idl (line 670) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 693) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 717) | fn default_value_works() -> Result<(), NP_Error> {
function fixed_size_works (line 727) | fn fixed_size_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 738) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/pointer/date.rs
type NP_Date (line 42) | pub struct NP_Date {
method schema_default (line 48) | fn schema_default(_schema: &NP_Parsed_Schema) -> Option<Self> where Se...
method np_max_value (line 52) | fn np_max_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method np_min_value (line 56) | fn np_min_value(_cursor: &NP_Cursor, _memory: &NP_Memory) -> Option<Se...
method new (line 64) | pub fn new(time_ms: u64) -> Self {
method type_idx (line 85) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("date", NP_TypeKeys::Da...
method self_type_idx (line 86) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("date", NP_Ty...
method schema_to_json (line 88) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 101) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method set_from_json (line 112) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method set_value (line 124) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 150) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 169) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 194) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method schema_to_idl (line 206) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 220) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 275) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 303) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 70) | fn default() -> Self {
method fmt (line 76) | fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
function schema_parsing_works (line 327) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 338) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 350) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/pointer/dec.rs
type NP_Dec (line 84) | pub struct NP_Dec {
method schema_default (line 92) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 97) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 102) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method to_float (line 121) | pub fn to_float(&self) -> f64 {
method shift_exp (line 148) | pub fn shift_exp(&mut self, new_exp: u8) -> NP_Dec {
method new (line 198) | pub fn new(num: i64, exp: u8) -> Self {
method match_exp (line 218) | pub fn match_exp(&self, other: &NP_Dec) -> NP_Dec {
method export (line 239) | pub fn export(&self) -> (i64, u8) {
method ne (line 265) | fn ne(&self, other: &NP_Dec) -> bool {
method eq (line 277) | fn eq(&self, other: &NP_Dec) -> bool {
method lt (line 312) | fn lt(&self, other: &NP_Dec) -> bool {
method le (line 321) | fn le(&self, other: &NP_Dec) -> bool {
method gt (line 330) | fn gt(&self, other: &NP_Dec) -> bool {
method ge (line 339) | fn ge(&self, other: &NP_Dec) -> bool {
method partial_cmp (line 348) | fn partial_cmp(&self, other: &NP_Dec) -> Option<core::cmp::Ordering> {
method into (line 380) | fn into(self) -> i32 {
method into (line 417) | fn into(self) -> i64 {
method into (line 497) | fn into(self) -> f64 {
method into (line 543) | fn into(self) -> f32 {
method div_assign (line 580) | fn div_assign(&mut self, other: NP_Dec) {
type Output (line 591) | type Output = NP_Dec;
method div (line 592) | fn div(mut self, other: NP_Dec) -> <Self as core::ops::Sub<NP_Dec>>::O...
method sub_assign (line 604) | fn sub_assign(&mut self, other: NP_Dec) {
type Output (line 615) | type Output = NP_Dec;
method sub (line 616) | fn sub(mut self, other: NP_Dec) -> <Self as core::ops::Sub<NP_Dec>>::O...
method add_assign (line 628) | fn add_assign(&mut self, other: NP_Dec) {
type Output (line 639) | type Output = NP_Dec;
method add (line 640) | fn add(mut self, other: NP_Dec) -> <Self as core::ops::Add<NP_Dec>>::O...
method mul_assign (line 652) | fn mul_assign(&mut self, other: NP_Dec) {
type Output (line 663) | type Output = NP_Dec;
method mul (line 664) | fn mul(mut self, other: NP_Dec) -> <Self as core::ops::Mul<NP_Dec>>::O...
method type_idx (line 687) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("decimal", NP_TypeKeys:...
method self_type_idx (line 688) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("decimal", NP...
method schema_to_json (line 690) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method default_value (line 707) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method set_from_json (line 718) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method set_value (line 741) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 784) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 809) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method get_size (line 856) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method schema_to_idl (line 868) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 882) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, _name: &str, ...
method from_json_to_schema (line 963) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 1016) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
function into (line 401) | fn into(self) -> NP_Dec {
function into (line 438) | fn into(self) -> NP_Dec {
function round_f64 (line 445) | fn round_f64(n: f64) -> f64 {
function round_f32 (line 453) | fn round_f32(n: f32) -> f32 {
function round (line 461) | fn round(n: f64, precision: u32) -> f64 {
function precision (line 465) | fn precision(x: f64) -> Option<u32> {
function round32 (line 474) | fn round32(n: f32, precision: u32) -> f32 {
function precision32 (line 478) | fn precision32(x: f32) -> Option<u32> {
function into (line 512) | fn into(self) -> NP_Dec {
function into (line 558) | fn into(self) -> NP_Dec {
method default (line 677) | fn default() -> Self {
function schema_parsing_works_idl (line 1040) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 1057) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 1074) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 1087) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/pointer/geo.rs
type NP_Geo_Bytes (line 41) | pub struct NP_Geo_Bytes {
method schema_default (line 52) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 57) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 62) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method into_geo (line 70) | pub fn into_geo(self) -> NP_Geo {
method set_from_json (line 139) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, _cursor: NP_C...
method default_value (line 143) | fn default_value(_depth: usize, _addr: usize, _schema: &Vec<NP_Parsed_...
method type_idx (line 146) | fn type_idx() -> (&'value str, NP_TypeKeys) { NP_Geo::type_idx() }
method self_type_idx (line 147) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { NP_Geo::type_i...
method schema_to_idl (line 149) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 153) | fn from_idl_to_schema(schema: Vec<NP_Parsed_Schema>, name: &str, idl: ...
method schema_to_json (line 157) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_value (line 159) | fn set_value<'set>(_cursor: NP_Cursor, _memory: &'set NP_Memory, _valu...
method to_json (line 162) | fn to_json(depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory)...
method get_size (line 165) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method into_value (line 177) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method from_json_to_schema (line 217) | fn from_json_to_schema(schema: Vec<NP_Parsed_Schema>, json_schema: &Bo...
method from_bytes_to_schema (line 221) | fn from_bytes_to_schema(schema: Vec<NP_Parsed_Schema>, address: usize,...
method default (line 132) | fn default() -> Self {
type NP_Geo (line 233) | pub struct NP_Geo {
method schema_default (line 243) | fn schema_default(schema: &NP_Parsed_Schema) -> Option<Self> where Sel...
method np_max_value (line 248) | fn np_max_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method np_min_value (line 253) | fn np_min_value(cursor: &NP_Cursor, memory: &NP_Memory) -> Option<Self> {
method new (line 262) | pub fn new(size: u8, lat: f64, lng: f64) -> Self {
method get_deviser (line 267) | pub fn get_deviser(size: i64) -> f64 {
method into_json (line 278) | pub fn into_json(&self) -> NP_JSON {
method get_bytes (line 286) | pub fn get_bytes(&self) -> Option<NP_Geo_Bytes> {
method default_value (line 393) | fn default_value(_depth: usize, addr: usize, schema: &Vec<NP_Parsed_Sc...
method set_from_json (line 404) | fn set_from_json<'set>(_depth: usize, _apply_null: bool, cursor: NP_Cu...
method type_idx (line 438) | fn type_idx() -> (&'value str, NP_TypeKeys) { ("geo", NP_TypeKeys::Geo) }
method self_type_idx (line 439) | fn self_type_idx(&self) -> (&'value str, NP_TypeKeys) { ("geo", NP_Typ...
method schema_to_json (line 441) | fn schema_to_json(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Re...
method set_value (line 461) | fn set_value<'set>(cursor: NP_Cursor, memory: &'set NP_Memory, value: ...
method into_value (line 588) | fn into_value(cursor: &NP_Cursor, memory: &'value NP_Memory) -> Result...
method to_json (line 655) | fn to_json(_depth:usize, cursor: &NP_Cursor, memory: &'value NP_Memory...
method schema_to_idl (line 692) | fn schema_to_idl(schema: &Vec<NP_Parsed_Schema>, address: usize)-> Res...
method from_idl_to_schema (line 719) | fn from_idl_to_schema(mut schema: Vec<NP_Parsed_Schema>, name: &str, i...
method get_size (line 809) | fn get_size(_depth:usize, cursor: &NP_Cursor, memory: &NP_Memory) -> R...
method from_json_to_schema (line 823) | fn from_json_to_schema(mut schema: Vec<NP_Parsed_Schema>, json_schema:...
method from_bytes_to_schema (line 909) | fn from_bytes_to_schema(mut schema: Vec<NP_Parsed_Schema>, address: us...
method default (line 339) | fn default() -> Self {
function geo_default_value (line 344) | fn geo_default_value(size: u8, json: &NP_JSON) -> Result<Option<NP_Geo_B...
function schema_parsing_works_idl (line 970) | fn schema_parsing_works_idl() -> Result<(), NP_Error> {
function schema_parsing_works (line 1011) | fn schema_parsing_works() -> Result<(), NP_Error> {
function default_value_works (line 1053) | fn default_value_works() -> Result<(), NP_Error> {
function set_clear_value_and_compaction_works (line 1073) | fn set_clear_value_and_compaction_works() -> Result<(), NP_Error> {
FILE: no_proto_rs_old/src/pointer/mod.rs
type NP_Pointer_Scalar (line 46) | pub struct NP_Pointer_Scalar {
method default (line 51) | fn default() -> Self {
type NP_Pointer_List_Item (line 59) | pub struct NP_Pointer_List_Item {
type NP_Pointer_Map_Item (line 68) | pub struct NP_Pointer_Map_Item {
type NP_Pointer_Bytes (line 76) | pub trait NP_Pointer_Bytes {
method get_type (line 77) | fn get_type(&self) -> &str { "" }
method get_addr_value (line 78) | fn get_addr_value(&self) -> u32 { 0 }
method set_addr_value (line 79) | fn set_addr_value(&mut self, addr: u32) { }
method get_next_addr (line 80) | fn get_next_addr(&self) -> u32 { 0 }
method set_next_addr (line 81) | fn set_next_addr(&mut self, addr: u32) { }
method set_index (line 82) | fn set_index(&mut self, index: u16) { }
method get_index (line 83) | fn get_index(&self) -> u16 { 0 }
method set_key_addr (line 84) | fn set_key_addr(&mut self, hash: u32) { }
method get_key_addr (line 85) | fn get_key_addr(&self) -> u32 { 0 }
method reset (line 86) | fn reset(&mut self) { }
method get_size (line 87) | fn get_size(&self) -> usize { 0 }
method get_key (line 88) | fn get_key<'key>(&self, memory: &'key NP_Memory) -> &'key str { "" }
method get_key_size (line 89) | fn get_key_size<'key>(&self, memory: &'key NP_Memory) -> usize { 0 }
method get_type (line 93) | fn get_type(&self) -> &str { "Scalar" }
method get_addr_value (line 95) | fn get_addr_value(&self) -> u32 { u32::from_be_bytes(self.addr_value) }
method set_addr_value (line 97) | fn set_addr_value(&mut self, addr: u32) { self.addr_value = addr.to_be...
method reset (line 99) | fn reset(&mut self) { self.addr_value = [0; 4]; }
method get_size (line 101) | fn get_size(&self) -> usize { 4 }
method get_type (line 104) | fn get_
Copy disabled (too large)
Download .json
Condensed preview — 475 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (40,122K chars).
[
{
"path": ".gitignore",
"chars": 117,
"preview": "no_proto_rs/target\n**/*.rs.bk\nno_proto_rs/Cargo.lock\ntest.json\n\nbench/target/**/*\nno_proto_js/target/**/*\ntarget/**/*"
},
{
"path": ".idea/.gitignore",
"chars": 176,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n# Datasource local storage ignored files\n/dataSources/\n/dataSources.local"
},
{
"path": ".idea/NoProto.iml",
"chars": 449,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"CPP_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\">\n"
},
{
"path": ".idea/modules.xml",
"chars": 266,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": ".idea/vcs.xml",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "LICENSE",
"chars": 1066,
"preview": "MIT License\n\nCopyright (c) 2020 Scott Lott\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "README.md",
"chars": 20414,
"preview": "## NoProto: Flexible, Fast & Compact Serialization with RPC\n\n<img src=\"https://github.com/only-cliches/NoProto/raw/maste"
},
{
"path": "bench/Cargo.toml",
"chars": 756,
"preview": "[package]\nname = \"bench\"\nversion = \"0.1.0\"\nauthors = [\"scottlott\"]\nedition = \"2018\"\n\n# See more keys and their definitio"
},
{
"path": "bench/README.md",
"chars": 26691,
"preview": "# NoProto Benchmarks\n\nThe benchmarks in this folder are used to record performance progress and provide entirely subject"
},
{
"path": "bench/src/bench.fbs",
"chars": 1158,
"preview": "// Copyright 2015 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "bench/src/bench_fb.rs",
"chars": 11223,
"preview": "// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\nextern crate flatbuffers;\n\n#[allow(unused_impor"
},
{
"path": "bench/src/bench_pb.proto",
"chars": 1303,
"preview": "// Copyright 2015 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "bench/src/bench_pb.rs",
"chars": 35364,
"preview": "// This file is generated by rust-protobuf 2.18.1. Do not edit\n// @generated\n\n// https://github.com/rust-lang/rust-clipp"
},
{
"path": "bench/src/main.rs",
"chars": 12370,
"preview": "use crate::run_bench_rawbson::RawBSONBench;\nuse crate::run_bench_rkyv::RkyvBench;\nuse run_bench_json::JSONBench;\nuse run"
},
{
"path": "bench/src/run_bench_abomonation.rs",
"chars": 5578,
"preview": "use crate::LOOPS;\n\n\nuse std::io::prelude::*;\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{Sy"
},
{
"path": "bench/src/run_bench_avro.rs",
"chars": 17949,
"preview": "use crate::LOOPS;\n\nuse avro_rs::{\n types::Record, types::Value, Codec, Days, Decimal, Duration, Error, Millis, Months"
},
{
"path": "bench/src/run_bench_bincode.rs",
"chars": 5190,
"preview": "use crate::LOOPS;\n\n\nuse std::io::prelude::*;\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{Sy"
},
{
"path": "bench/src/run_bench_bson.rs",
"chars": 5171,
"preview": "use crate::LOOPS;\n\nuse std::{io::prelude::*};\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{S"
},
{
"path": "bench/src/run_bench_flatbuffers.rs",
"chars": 7064,
"preview": "use crate::LOOPS;\nuse crate::bench_fb::benchfb::get_root_as_foo_bar_container;\nuse crate::bench_fb::benchfb::FooBarConta"
},
{
"path": "bench/src/run_bench_flexbuffers.rs",
"chars": 5556,
"preview": "use crate::LOOPS;\n\n\nuse std::io::prelude::*;\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{Sy"
},
{
"path": "bench/src/run_bench_json.rs",
"chars": 4988,
"preview": "use crate::LOOPS;\n\nuse std::{io::prelude::*, str::{from_utf8_unchecked}};\nuse flate2::Compression;\nuse flate2::write::Zl"
},
{
"path": "bench/src/run_bench_messagepack.rs",
"chars": 8046,
"preview": "use crate::LOOPS;\n\nuse std::io::{BufReader, Cursor};\nuse std::collections::BTreeMap;\n\n\nuse std::io::prelude::*;\nuse flat"
},
{
"path": "bench/src/run_bench_messagepack_rs.rs",
"chars": 8267,
"preview": "use crate::LOOPS;\nuse messagepack_rs::{deserializable::Deserializable, serializable::Serializable, value::Value};\nuse st"
},
{
"path": "bench/src/run_bench_no_proto.rs",
"chars": 7988,
"preview": "use crate::LOOPS;\nuse no_proto::{error::NP_Error};\nuse no_proto::NP_Factory;\nuse std::io::prelude::*;\nuse flate2::Compre"
},
{
"path": "bench/src/run_bench_postcard.rs",
"chars": 5196,
"preview": "use crate::LOOPS;\n\n\nuse std::io::prelude::*;\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{Sy"
},
{
"path": "bench/src/run_bench_prost.rs",
"chars": 6509,
"preview": "use crate::LOOPS;\n\nuse std::io::prelude::*;\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{Sys"
},
{
"path": "bench/src/run_bench_protocol_buffers.rs",
"chars": 6813,
"preview": "use crate::LOOPS;\nuse crate::bench_pb::FooBarContainer;\nuse crate::bench_pb::FooBar;\nuse crate::bench_pb::Bar;\nuse crate"
},
{
"path": "bench/src/run_bench_rawbson.rs",
"chars": 5293,
"preview": "use crate::LOOPS;\n\nuse std::{io::prelude::*};\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std::time::{S"
},
{
"path": "bench/src/run_bench_rkyv.rs",
"chars": 5473,
"preview": "use crate::{LOOPS};\n\n\nuse std::io::{Write, prelude::*};\nuse flate2::Compression;\nuse flate2::write::ZlibEncoder;\nuse std"
},
{
"path": "bench/src/run_bench_serde_json.rs",
"chars": 5279,
"preview": "use crate::LOOPS;\n\nuse serde_json::Result;\nuse std::io::prelude::*;\nuse flate2::Compression;\nuse flate2::write::ZlibEnco"
},
{
"path": "examples/quick.rs",
"chars": 2514,
"preview": "use no_proto::{error::NP_Error, NP_Factory};\n\nfn main() -> Result<(), NP_Error> {\n\n // JSON is used to describe schem"
},
{
"path": "idl.graphql",
"chars": 2417,
"preview": "# WIP IDL ideas...\n\nspec {\n id: \"My Schema\",\n author: \"Scoot Loot\",\n version: 1.2\n}\n\nimport \"../file\"\n\n# commen"
},
{
"path": "no_proto_js/Cargo.toml",
"chars": 405,
"preview": "[package]\nname = \"no_proto_js\"\nversion = \"0.1.0\"\nauthors = [\"Scott Lott <me@scottlott.com>\"]\nedition = \"2018\"\n\n[package."
},
{
"path": "no_proto_js/out.txt",
"chars": 1917213,
"preview": "(module\n (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))\n (type $i32_i32_=>_none (func (param i32 i32)))\n (ty"
},
{
"path": "no_proto_js/src/buffer.rs",
"chars": 46086,
"preview": "//! Top level abstraction for buffer objects\n\nuse crate::NP_Size_Data;\nuse crate::{memory::NP_Memory_Writable, utils::op"
},
{
"path": "no_proto_js/src/collection/list.rs",
"chars": 18072,
"preview": "use crate::utils::opt_err;\nuse crate::{pointer::{NP_List_Bytes}};\nuse crate::{error::NP_Error, json_flex::{JSMAP, NP_JSO"
},
{
"path": "no_proto_js/src/collection/map.rs",
"chars": 9713,
"preview": "use alloc::string::String;\nuse crate::{pointer::NP_Map_Bytes};\nuse crate::pointer::NP_Cursor;\nuse crate::{json_flex::JSM"
},
{
"path": "no_proto_js/src/collection/mod.rs",
"chars": 188,
"preview": "//! Collections: NP_Table, NP_Tuple, NP_List & NP_Map\n\n/// Table data type\npub mod table;\n/// Map data type\npub mod map;"
},
{
"path": "no_proto_js/src/collection/table.rs",
"chars": 15740,
"preview": "use crate::buffer::{VTABLE_BYTES, VTABLE_SIZE};\nuse alloc::string::String;\nuse crate::pointer::{NP_Vtable};\nuse crate::{"
},
{
"path": "no_proto_js/src/collection/tuple.rs",
"chars": 14968,
"preview": "use alloc::string::String;\nuse crate::{buffer::{VTABLE_BYTES, VTABLE_SIZE}, utils::opt_err};\nuse crate::{ pointer::NP_Vt"
},
{
"path": "no_proto_js/src/error.rs",
"chars": 1219,
"preview": "//! Primary error type used by the library\n\nuse alloc::string::FromUtf8Error;\nuse alloc::string::String;\nuse alloc::borr"
},
{
"path": "no_proto_js/src/format.rs",
"chars": 30470,
"preview": "//! # NoProto Data Format Documentaion\n//! \n//! NoProto buffers are built out of pointers and data. \n//! \n//! They are "
},
{
"path": "no_proto_js/src/hashmap.rs",
"chars": 4703,
"preview": "use alloc::string::String;\nuse alloc::vec::Vec;\n\nuse crate::error::NP_Error;\n\npub static SEED: u32 = 2181155409;\n\n#[deri"
},
{
"path": "no_proto_js/src/json_flex.rs",
"chars": 69031,
"preview": "//! JSON Parser, serializer and deserializer\n//! \n//! This file is derived from the json_flex crate.\n//! \n//! [github](h"
},
{
"path": "no_proto_js/src/lib.rs",
"chars": 21309,
"preview": "#![warn(missing_docs)]\n#![allow(non_camel_case_types)]\n#![no_std]\n\n//! ## Simple & Performant Serialization with RPC\n//!"
},
{
"path": "no_proto_js/src/lib_wasm.rs",
"chars": 15402,
"preview": "#![warn(missing_docs)]\n#![allow(non_camel_case_types)]\n#![no_std]\n\n//! ## Simple & Performant Serialization with RPC\n//!"
},
{
"path": "no_proto_js/src/memory.rs",
"chars": 5943,
"preview": "//! Internal buffer memory management\n\nuse crate::{schema::NP_Parsed_Schema};\nuse crate::{error::NP_Error};\nuse core::ce"
},
{
"path": "no_proto_js/src/pointer/any.rs",
"chars": 2687,
"preview": "use crate::{json_flex::{JSMAP}, schema::{NP_Parsed_Schema}};\nuse alloc::vec::Vec;\nuse crate::error::NP_Error;\nuse crate:"
},
{
"path": "no_proto_js/src/pointer/bool.rs",
"chars": 6453,
"preview": "//! NoProto supports Rust's native [`bool`](https://doc.rust-lang.org/std/primitive.bool.html) type.\n//! \n//! ```\n//! us"
},
{
"path": "no_proto_js/src/pointer/bytes.rs",
"chars": 12583,
"preview": "//! Represents arbitrary bytes type\n//! \n//! ```\n//! use no_proto::error::NP_Error;\n//! use no_proto::NP_Factory;\n//! us"
},
{
"path": "no_proto_js/src/pointer/date.rs",
"chars": 6861,
"preview": "//! Stores the current unix epoch in u64.\n//! \n//! Epoch should be stored in milliseconds.\n//! \n//! ```\n//! use no_proto"
},
{
"path": "no_proto_js/src/pointer/dec.rs",
"chars": 27236,
"preview": "//! Represents a fixed point decimal number.\n//! \n//! Allows floating point values to be stored without rounding errors,"
},
{
"path": "no_proto_js/src/pointer/geo.rs",
"chars": 27373,
"preview": "//! Represents a Geographic Coordinate (lat / lon)\n//! \n//! When `geo4`, `geo8`, or `geo16` types are used the data is s"
},
{
"path": "no_proto_js/src/pointer/mod.rs",
"chars": 23643,
"preview": "//! All values in buffers are accessed and modified through pointers\n//! \n//! NP_Ptr are the primary abstraction to read"
},
{
"path": "no_proto_js/src/pointer/numbers.rs",
"chars": 24357,
"preview": "//! NoProto supports a large number of native number types.\n//! \n//! Signed Integers: <br/>\n//! [`i8`](https://doc.rust-"
},
{
"path": "no_proto_js/src/pointer/option.rs",
"chars": 12587,
"preview": "//! Represents the string value of a choice in a schema\n//! \n//! ```\n//! use no_proto::error::NP_Error;\n//! use no_proto"
},
{
"path": "no_proto_js/src/pointer/string.rs",
"chars": 14116,
"preview": "//! NoProto supports Rust's native UTF8 [`String`](https://doc.rust-lang.org/std/string/struct.String.html) type.\n//!\n//"
},
{
"path": "no_proto_js/src/pointer/ulid.rs",
"chars": 7441,
"preview": "//! Represents a ULID type which has a 6 byte timestamp and 10 bytes of randomness\n//! \n//! Useful for storing time stam"
},
{
"path": "no_proto_js/src/pointer/uuid.rs",
"chars": 7177,
"preview": "//! Represents a V4 UUID, good for globally unique identifiers\n//! \n//! `uuid` types are always represented with this st"
},
{
"path": "no_proto_js/src/rpc.rs",
"chars": 56801,
"preview": "//! Remote Procedure Call APIs\n//! \n//! You can optionally omit all the RPC related code with `features = []` in your ca"
},
{
"path": "no_proto_js/src/schema.rs",
"chars": 50513,
"preview": "//! Schemas are JSON used to declare the shape of buffer objects\n//! \n//! No Proto Schemas are JSON objects that describ"
},
{
"path": "no_proto_js/src/utils.rs",
"chars": 1989,
"preview": "use core::str;\nuse alloc::string::String;\nuse alloc::borrow::ToOwned;\nuse alloc::vec::Vec;\n\nuse crate::error::NP_Error;\n"
},
{
"path": "no_proto_rs/.idea/.gitignore",
"chars": 98,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n# Editor-based HTTP Client requests\n/httpRequests/\n"
},
{
"path": "no_proto_rs/.idea/modules.xml",
"chars": 274,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "no_proto_rs/.idea/no_proto_rs.iml",
"chars": 589,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\">\n"
},
{
"path": "no_proto_rs/.idea/vcs.xml",
"chars": 183,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "no_proto_rs/CHANGELOG.md",
"chars": 7277,
"preview": "# 0.10.0\n- All breaking changes, everywhere. The API, schemas and buffers are all new and incompatible with previous ve"
},
{
"path": "no_proto_rs/Cargo.toml",
"chars": 636,
"preview": "[package]\nname = \"no_proto\"\nlicense = \"MIT\"\nversion = \"0.9.60\"\ndescription = \"Flexible, Fast & Compact Serialization wit"
},
{
"path": "no_proto_rs/README.md",
"chars": 20316,
"preview": "## NoProto: Flexible, Fast & Compact Serialization with RPC\n\n<img src=\"https://github.com/only-cliches/NoProto/raw/maste"
},
{
"path": "no_proto_rs/src/buffer/mod.rs",
"chars": 4861,
"preview": "use alloc::string::String;\nuse crate::types::NP_Type;\n\n\n#[derive(Debug, Clone)]\nstruct NP_Cursor {\n pub buffer_addr: "
},
{
"path": "no_proto_rs/src/collection/list.rs",
"chars": 24519,
"preview": "use alloc::{string::String, sync::Arc};\nuse crate::{idl::{JS_AST, JS_Schema}, schema::{NP_Map_List_Data, NP_Value_Kind},"
},
{
"path": "no_proto_rs/src/collection/map.rs",
"chars": 15622,
"preview": "use alloc::{string::String, sync::Arc};\nuse crate::{idl::{JS_AST, JS_Schema}, pointer::NP_Cursor, schema::{NP_Map_List_D"
},
{
"path": "no_proto_rs/src/collection/mod.rs",
"chars": 55,
"preview": "//! Collections: NP_Struct, NP_Tuple, NP_List & NP_Map\n"
},
{
"path": "no_proto_rs/src/collection/struc.rs",
"chars": 26672,
"preview": "use alloc::sync::Arc;\nuse crate::{idl::AST_STR, schema::{NP_Struct_Data, NP_Struct_Field, NP_Value_Kind}};\nuse crate::{b"
},
{
"path": "no_proto_rs/src/collection/tuple.rs",
"chars": 22391,
"preview": "use crate::{idl::JS_AST, pointer::NP_Cursor_Parent, schema::{NP_Tuple_Data, NP_Tuple_Field, NP_Value_Kind}};\nuse alloc::"
},
{
"path": "no_proto_rs/src/error.rs",
"chars": 1506,
"preview": "//! Primary error type used by the library\n\nuse alloc::string::FromUtf8Error;\nuse alloc::string::String;\nuse alloc::borr"
},
{
"path": "no_proto_rs/src/format.rs",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs/src/json_flex.rs",
"chars": 69295,
"preview": "//! JSON Parser, serializer and deserializer\n//! \n//! This file is derived from the json_flex crate.\n//! \n//! [github](h"
},
{
"path": "no_proto_rs/src/lib.rs",
"chars": 8407,
"preview": "//! Docs!\n//!\n\n#![warn(missing_docs)]\n#![allow(non_camel_case_types)]\n#![no_std]\n\n\n#[cfg(test)]\n#[macro_use]\nextern crat"
},
{
"path": "no_proto_rs/src/map.rs",
"chars": 13179,
"preview": "use alloc::string::String;\nuse alloc::vec::Vec;\n\nuse crate::error::NP_Error;\nuse core::fmt::{Debug, Formatter};\n\npub sta"
},
{
"path": "no_proto_rs/src/memory.rs",
"chars": 9891,
"preview": "//! Internal buffer memory management\n\nuse crate::{error::NP_Error};\nuse core::cell::UnsafeCell;\nuse alloc::vec::Vec;\nus"
},
{
"path": "no_proto_rs/src/pointer/any.rs",
"chars": 3956,
"preview": "use alloc::{string::String, sync::Arc};\nuse crate::{idl::{JS_AST, JS_Schema}, json_flex::{JSMAP}, schema::{NP_Parsed_Sch"
},
{
"path": "no_proto_rs/src/pointer/bool.rs",
"chars": 11560,
"preview": "//! NoProto supports Rust's native [`bool`](https://doc.rust-lang.org/std/primitive.bool.html) type.\n//! \n//! ```\n//! us"
},
{
"path": "no_proto_rs/src/pointer/bytes.rs",
"chars": 25932,
"preview": "//! Represents arbitrary bytes type\n//! \n//! ```\n//! use no_proto::error::NP_Error;\n//! use no_proto::NP_Factory;\n//! us"
},
{
"path": "no_proto_rs/src/pointer/date.rs",
"chars": 11547,
"preview": "//! Stores the current unix epoch in u64.\n//! \n//! Epoch should be stored in milliseconds.\n//! \n//! ```\n//! use no_proto"
},
{
"path": "no_proto_rs/src/pointer/dec.rs",
"chars": 35176,
"preview": "//! Represents a fixed point decimal number.\n//! \n//! Allows floating point values to be stored without rounding errors,"
},
{
"path": "no_proto_rs/src/pointer/geo.rs",
"chars": 41642,
"preview": "//! Represents a Geographic Coordinate (lat / lon)\n//! \n//! When `geo4`, `geo8`, or `geo16` types are used the data is s"
},
{
"path": "no_proto_rs/src/pointer/mod.rs",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs/src/pointer/numbers.rs",
"chars": 47755,
"preview": "//! NoProto supports a large number of native number types.\n//! \n//! Signed Integers: <br/>\n//! [`i8`](https://doc.rust-"
},
{
"path": "no_proto_rs/src/pointer/option.rs",
"chars": 19889,
"preview": "//! Represents the string value of a choice in a schema\n//! \n//! ```\n//! use no_proto::error::NP_Error;\n//! use no_proto"
},
{
"path": "no_proto_rs/src/pointer/portal.rs",
"chars": 12720,
"preview": "//! Clone type for recursion or duplicating data types.\n//! \n//! Portal types allow you to teleport a type from one part"
},
{
"path": "no_proto_rs/src/pointer/string.rs",
"chars": 28954,
"preview": "//! NoProto supports Rust's native UTF8 [`String`](https://doc.rust-lang.org/std/string/struct.String.html) type.\n//!\n//"
},
{
"path": "no_proto_rs/src/pointer/ulid.rs",
"chars": 13684,
"preview": "//! Represents a ULID type which has a 6 byte timestamp and 10 bytes of randomness\n//! \n//! Useful for storing time stam"
},
{
"path": "no_proto_rs/src/pointer/union.rs",
"chars": 15132,
"preview": "//! Clone type for recursive or duplicating data types.\n//! \n\nuse crate::{idl::{JS_AST, JS_Schema}, schema::{NP_Schema_A"
},
{
"path": "no_proto_rs/src/pointer/uuid.rs",
"chars": 12848,
"preview": "//! Represents a V4 UUID, good for globally unique identifiers\n//! \n//! `uuid` types are always represented with this st"
},
{
"path": "no_proto_rs/src/schema/args.rs",
"chars": 5387,
"preview": "use crate::schema::AST_STR;\nuse alloc::string::String;\nuse alloc::vec::Vec;\nuse crate::map::NP_OrderedMap;\nuse crate::js"
},
{
"path": "no_proto_rs/src/schema/ast.rs",
"chars": 19543,
"preview": "//! AST Parser\n//! \n//! Supports a custom IDL that is very similar to Rust syntax for data types.\n//! \n//! The schema pa"
},
{
"path": "no_proto_rs/src/schema/mod.rs",
"chars": 2908,
"preview": "pub mod ast;\npub mod args;\npub mod parser;\n// mod tests;\n\n\nuse core::ops::DerefMut;\nuse core::ops::Deref;\nuse crate::err"
},
{
"path": "no_proto_rs/src/schema/parser.rs",
"chars": 137796,
"preview": "use crate::error::NP_Error;\nuse crate::map::murmurhash3_x86_32;\nuse crate::map::HASH_SEED;\nuse crate::schema::args::NP_S"
},
{
"path": "no_proto_rs/src/schema/tests.rs",
"chars": 66638,
"preview": "\n\n#[cfg(test)]\nmod schema_tests {\n\n use crate::schema::schema_args::NP_Args;\n use crate::error::NP_Error;\n use "
},
{
"path": "no_proto_rs/src/types.rs",
"chars": 70508,
"preview": "use crate::map::NP_OrderedMap;\nuse core::fmt::Debug;\nuse alloc::vec::Vec;\nuse alloc::boxed::Box;\n\n\n#[allow(dead_code)]\n#"
},
{
"path": "no_proto_rs/src/utils.rs",
"chars": 2738,
"preview": "use core::str;\nuse alloc::string::String;\nuse alloc::borrow::ToOwned;\nuse alloc::vec::Vec;\n\nuse crate::error::NP_Error;\n"
},
{
"path": "no_proto_rs/src/values/mod.rs",
"chars": 550,
"preview": "use crate::error::NP_Error;\nuse crate::memory::NP_Memory;\nuse crate::json_flex::NP_JSON;\n\n\npub trait NP_Value: Sized {\n\n"
},
{
"path": "no_proto_rs_old/.idea/.gitignore",
"chars": 98,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n# Editor-based HTTP Client requests\n/httpRequests/\n"
},
{
"path": "no_proto_rs_old/.idea/modules.xml",
"chars": 274,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "no_proto_rs_old/.idea/no_proto_rs.iml",
"chars": 589,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"WEB_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\">\n"
},
{
"path": "no_proto_rs_old/.idea/vcs.xml",
"chars": 183,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "no_proto_rs_old/CHANGELOG.md",
"chars": 6962,
"preview": "# 0.9.6 March 9th, 2021\n- Removed lifetimes from NP_Factory and NP_Buffer.\n- NP_Buffer is no longer generic over memory "
},
{
"path": "no_proto_rs_old/Cargo.toml",
"chars": 636,
"preview": "[package]\nname = \"no_proto\"\nlicense = \"MIT\"\nversion = \"0.9.60\"\ndescription = \"Flexible, Fast & Compact Serialization wit"
},
{
"path": "no_proto_rs_old/README.md",
"chars": 20414,
"preview": "## NoProto: Flexible, Fast & Compact Serialization with RPC\n\n<img src=\"https://github.com/only-cliches/NoProto/raw/maste"
},
{
"path": "no_proto_rs_old/src/buffer.rs",
"chars": 54576,
"preview": "//! Top level abstraction for buffer objects\n\nuse alloc::prelude::v1::Box;\nuse crate::{json_decode, json_flex::JSMAP, po"
},
{
"path": "no_proto_rs_old/src/collection/list.rs",
"chars": 24519,
"preview": "use alloc::{string::String, sync::Arc};\nuse crate::{idl::{JS_AST, JS_Schema}, schema::{NP_Map_List_Data, NP_Value_Kind},"
},
{
"path": "no_proto_rs_old/src/collection/map.rs",
"chars": 15622,
"preview": "use alloc::{string::String, sync::Arc};\nuse crate::{idl::{JS_AST, JS_Schema}, pointer::NP_Cursor, schema::{NP_Map_List_D"
},
{
"path": "no_proto_rs_old/src/collection/mod.rs",
"chars": 190,
"preview": "//! Collections: NP_Struct, NP_Tuple, NP_List & NP_Map\n\n/// Struct data type\npub mod struc;\n/// Map data type\npub mod ma"
},
{
"path": "no_proto_rs_old/src/collection/struc.rs",
"chars": 26672,
"preview": "use alloc::sync::Arc;\nuse crate::{idl::AST_STR, schema::{NP_Struct_Data, NP_Struct_Field, NP_Value_Kind}};\nuse crate::{b"
},
{
"path": "no_proto_rs_old/src/collection/tuple.rs",
"chars": 22391,
"preview": "use crate::{idl::JS_AST, pointer::NP_Cursor_Parent, schema::{NP_Tuple_Data, NP_Tuple_Field, NP_Value_Kind}};\nuse alloc::"
},
{
"path": "no_proto_rs_old/src/error.rs",
"chars": 1488,
"preview": "//! Primary error type used by the library\n\nuse alloc::string::FromUtf8Error;\nuse alloc::string::String;\nuse alloc::borr"
},
{
"path": "no_proto_rs_old/src/format.rs",
"chars": 31078,
"preview": "//! # NoProto Data Format Documentaion\n//! \n//! NoProto buffers are built out of pointers and data. \n//! \n//! They are "
},
{
"path": "no_proto_rs_old/src/hashmap.rs",
"chars": 4972,
"preview": "use alloc::string::String;\nuse alloc::vec::Vec;\n\nuse crate::error::NP_Error;\n\npub static SEED: u32 = 2181155409;\n\n#[deri"
},
{
"path": "no_proto_rs_old/src/idl.rs",
"chars": 21584,
"preview": "//! ES6 IDL for Schemas\n//! \n//! Supports a *very* limited subset of ES6/Javascript parsing for schemas and rpcs.\n//! \nu"
},
{
"path": "no_proto_rs_old/src/json_flex.rs",
"chars": 69295,
"preview": "//! JSON Parser, serializer and deserializer\n//! \n//! This file is derived from the json_flex crate.\n//! \n//! [github](h"
},
{
"path": "no_proto_rs_old/src/lib.rs",
"chars": 34851,
"preview": "#![warn(missing_docs)]\n#![allow(non_camel_case_types)]\n#![no_std]\n\n//! ## NoProto: Flexible, Fast & Compact Serializatio"
},
{
"path": "no_proto_rs_old/src/memory.rs",
"chars": 9983,
"preview": "//! Internal buffer memory management\n\nuse crate::{schema::NP_Parsed_Schema};\nuse crate::{error::NP_Error};\nuse core::ce"
},
{
"path": "no_proto_rs_old/src/new_idl.rs",
"chars": 14111,
"preview": "//! ES6 IDL for Schemas\n//! \n//! Supports a *very* limited subset of ES6/Javascript parsing for schemas and rpcs.\n//! \nu"
},
{
"path": "no_proto_rs_old/src/pointer/any.rs",
"chars": 3956,
"preview": "use alloc::{string::String, sync::Arc};\nuse crate::{idl::{JS_AST, JS_Schema}, json_flex::{JSMAP}, schema::{NP_Parsed_Sch"
},
{
"path": "no_proto_rs_old/src/pointer/bool.rs",
"chars": 11560,
"preview": "//! NoProto supports Rust's native [`bool`](https://doc.rust-lang.org/std/primitive.bool.html) type.\n//! \n//! ```\n//! us"
},
{
"path": "no_proto_rs_old/src/pointer/bytes.rs",
"chars": 25932,
"preview": "//! Represents arbitrary bytes type\n//! \n//! ```\n//! use no_proto::error::NP_Error;\n//! use no_proto::NP_Factory;\n//! us"
},
{
"path": "no_proto_rs_old/src/pointer/date.rs",
"chars": 11547,
"preview": "//! Stores the current unix epoch in u64.\n//! \n//! Epoch should be stored in milliseconds.\n//! \n//! ```\n//! use no_proto"
},
{
"path": "no_proto_rs_old/src/pointer/dec.rs",
"chars": 35176,
"preview": "//! Represents a fixed point decimal number.\n//! \n//! Allows floating point values to be stored without rounding errors,"
},
{
"path": "no_proto_rs_old/src/pointer/geo.rs",
"chars": 41642,
"preview": "//! Represents a Geographic Coordinate (lat / lon)\n//! \n//! When `geo4`, `geo8`, or `geo16` types are used the data is s"
},
{
"path": "no_proto_rs_old/src/pointer/mod.rs",
"chars": 44512,
"preview": "//! All values in buffers are accessed and modified through pointers\n//! \n//! NP_Ptr are the primary abstraction to read"
},
{
"path": "no_proto_rs_old/src/pointer/numbers.rs",
"chars": 47755,
"preview": "//! NoProto supports a large number of native number types.\n//! \n//! Signed Integers: <br/>\n//! [`i8`](https://doc.rust-"
},
{
"path": "no_proto_rs_old/src/pointer/option.rs",
"chars": 19889,
"preview": "//! Represents the string value of a choice in a schema\n//! \n//! ```\n//! use no_proto::error::NP_Error;\n//! use no_proto"
},
{
"path": "no_proto_rs_old/src/pointer/portal.rs",
"chars": 12720,
"preview": "//! Clone type for recursion or duplicating data types.\n//! \n//! Portal types allow you to teleport a type from one part"
},
{
"path": "no_proto_rs_old/src/pointer/string.rs",
"chars": 28954,
"preview": "//! NoProto supports Rust's native UTF8 [`String`](https://doc.rust-lang.org/std/string/struct.String.html) type.\n//!\n//"
},
{
"path": "no_proto_rs_old/src/pointer/ulid.rs",
"chars": 13684,
"preview": "//! Represents a ULID type which has a 6 byte timestamp and 10 bytes of randomness\n//! \n//! Useful for storing time stam"
},
{
"path": "no_proto_rs_old/src/pointer/union.rs",
"chars": 15132,
"preview": "//! Clone type for recursive or duplicating data types.\n//! \n\nuse crate::{idl::{JS_AST, JS_Schema}, schema::{NP_Schema_A"
},
{
"path": "no_proto_rs_old/src/pointer/uuid.rs",
"chars": 12848,
"preview": "//! Represents a V4 UUID, good for globally unique identifiers\n//! \n//! `uuid` types are always represented with this st"
},
{
"path": "no_proto_rs_old/src/rpc.rs",
"chars": 56783,
"preview": "//! Remote Procedure Call APIs\n//! \n//! You can optionally omit all the RPC related code with `features = []` in your ca"
},
{
"path": "no_proto_rs_old/src/schema.rs",
"chars": 69636,
"preview": "//! Schemas are used to describe the shape and types of buffer objects\n//! \n//! NoProto schemas describe how the data in"
},
{
"path": "no_proto_rs_old/src/utils.rs",
"chars": 2738,
"preview": "use core::str;\nuse alloc::string::String;\nuse alloc::borrow::ToOwned;\nuse alloc::vec::Vec;\n\nuse crate::error::NP_Error;\n"
},
{
"path": "no_proto_rs_old/target/.rustc_info.json",
"chars": 2163,
"preview": "{\"rustc_fingerprint\":7691500340550822756,\"outputs\":{\"10024360064684898078\":{\"success\":true,\"status\":\"\",\"code\":0,\"stdout\""
},
{
"path": "no_proto_rs_old/target/CACHEDIR.TAG",
"chars": 177,
"preview": "Signature: 8a477f597d28d172789f06886806bc55\n# This file is a cache directory tag created by cargo.\n# For information abo"
},
{
"path": "no_proto_rs_old/target/debug/.cargo-lock",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-087b92dbcadb4e9e/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-087b92dbcadb4e9e/lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-087b92dbcadb4e9e/lib-no_proto.json",
"chars": 341,
"preview": "{\"rustc\":10260120187782136928,\"features\":\"[]\",\"target\":16526436305971540328,\"profile\":17483045194147818835,\"path\":175239"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-1f12470dc8aab137/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-1f12470dc8aab137/lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-1f12470dc8aab137/lib-no_proto.json",
"chars": 340,
"preview": "{\"rustc\":8916573652328001303,\"features\":\"[]\",\"target\":16526436305971540328,\"profile\":17483045194147818835,\"path\":1752390"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-2620c8dfffee77c5/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-2620c8dfffee77c5/output-lib-no_proto",
"chars": 1372814,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-2b9c306cf5e321b2/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-3cb4c0b2e234d1a3/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-42633ea97bf6e77b/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-42633ea97bf6e77b/output-test-lib-no_proto",
"chars": 1682082,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-42633ea97bf6e77b/test-lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-42633ea97bf6e77b/test-lib-no_proto.json",
"chars": 325,
"preview": "{\"rustc\":9747084787458929736,\"features\":\"[]\",\"target\":5679422633093381181,\"profile\":6415348288391478785,\"path\":108727096"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-441091bf4a4eb675/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-441091bf4a4eb675/test-lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-441091bf4a4eb675/test-lib-no_proto.json",
"chars": 346,
"preview": "{\"rustc\":10260120187782136928,\"features\":\"[]\",\"target\":16526436305971540328,\"profile\":11506243869495082934,\"path\":175239"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-45445c9cceb28ae6/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-45445c9cceb28ae6/output-test-lib-no_proto",
"chars": 2114823,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-45445c9cceb28ae6/test-lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-45445c9cceb28ae6/test-lib-no_proto.json",
"chars": 327,
"preview": "{\"rustc\":10368881109578526382,\"features\":\"[]\",\"target\":5679422633093381181,\"profile\":15791677790105649212,\"path\":1087270"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-56746ab113abb4bf/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-56746ab113abb4bf/test-lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-56746ab113abb4bf/test-lib-no_proto.json",
"chars": 345,
"preview": "{\"rustc\":8916573652328001303,\"features\":\"[]\",\"target\":16526436305971540328,\"profile\":11506243869495082934,\"path\":1752390"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-7ecb4680266c38b6/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-7ecb4680266c38b6/lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-7ecb4680266c38b6/lib-no_proto.json",
"chars": 321,
"preview": "{\"rustc\":10368881109578526382,\"features\":\"[]\",\"target\":5679422633093381181,\"profile\":7235557421335335211,\"path\":10872709"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-7ecb4680266c38b6/output-lib-no_proto",
"chars": 1805555,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-8d483704a5a1fdf6/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-8d483704a5a1fdf6/lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-8d483704a5a1fdf6/lib-no_proto.json",
"chars": 320,
"preview": "{\"rustc\":9747084787458929736,\"features\":\"[]\",\"target\":5679422633093381181,\"profile\":1144844575097113612,\"path\":108727096"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-8d483704a5a1fdf6/output-lib-no_proto",
"chars": 1372814,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-aa3c6589db10b605/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-aa3c6589db10b605/test-lib-no_proto",
"chars": 16,
"preview": "d3ce4d3532abe057"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-aa3c6589db10b605/test-lib-no_proto.json",
"chars": 348,
"preview": "{\"rustc\":9747084787458929736,\"features\":\"[\\\"default\\\", \\\"np_rpc\\\"]\",\"target\":5679422633093381181,\"profile\":6415348288391"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-ae791f23982352cd/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-ae791f23982352cd/output-test-lib-no_proto",
"chars": 1688264,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-ba940134b4c1a3ac/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-ba940134b4c1a3ac/output-test-lib-no_proto",
"chars": 2115632,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-ba940134b4c1a3ac/test-lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-ba940134b4c1a3ac/test-lib-no_proto.json",
"chars": 346,
"preview": "{\"rustc\":13465050684677553393,\"features\":\"[]\",\"target\":16526436305971540328,\"profile\":11506243869495082934,\"path\":108727"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-c73899fa9d5a4e2e/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-c73899fa9d5a4e2e/output-test-lib-no_proto",
"chars": 1683221,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-d8cf3dffddd77550/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-d8cf3dffddd77550/lib-no_proto",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-d8cf3dffddd77550/lib-no_proto.json",
"chars": 341,
"preview": "{\"rustc\":13465050684677553393,\"features\":\"[]\",\"target\":16526436305971540328,\"profile\":17483045194147818835,\"path\":108727"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-d8cf3dffddd77550/output-lib-no_proto",
"chars": 1806465,
"preview": "{\"message\":\"unresolved import `crate::JS_Schema`\",\"code\":{\"code\":\"E0432\",\"explanation\":\"An import was unresolved.\\n\\nErr"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-efe2ce7d02f8f240/invoked.timestamp",
"chars": 48,
"preview": "This file has an mtime of when this was started."
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-efe2ce7d02f8f240/lib-no_proto",
"chars": 16,
"preview": "1b6209503b1402c1"
},
{
"path": "no_proto_rs_old/target/debug/.fingerprint/no_proto-efe2ce7d02f8f240/lib-no_proto.json",
"chars": 343,
"preview": "{\"rustc\":9747084787458929736,\"features\":\"[\\\"default\\\", \\\"np_rpc\\\"]\",\"target\":5679422633093381181,\"profile\":1144844575097"
},
{
"path": "no_proto_rs_old/target/debug/deps/libno_proto-2b9c306cf5e321b2.rmeta",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/deps/libno_proto-aa3c6589db10b605.rmeta",
"chars": 0,
"preview": ""
},
{
"path": "no_proto_rs_old/target/debug/deps/no_proto-087b92dbcadb4e9e.d",
"chars": 1837,
"preview": "/Users/scottlott/iMac_Developer/NoProto/no_proto_rs_old/target/debug/deps/no_proto-087b92dbcadb4e9e.rmeta: src/lib.rs sr"
},
{
"path": "no_proto_rs_old/target/debug/deps/no_proto-1f12470dc8aab137.d",
"chars": 1837,
"preview": "/Users/scottlott/iMac_Developer/NoProto/no_proto_rs_old/target/debug/deps/no_proto-1f12470dc8aab137.rmeta: src/lib.rs sr"
},
{
"path": "no_proto_rs_old/target/debug/deps/no_proto-2620c8dfffee77c5.d",
"chars": 2470,
"preview": "/Volumes/NextNode/iMac_Developer/NoProto/no_proto_rs/target/debug/deps/no_proto-2620c8dfffee77c5.rmeta: src/lib.rs src/i"
},
{
"path": "no_proto_rs_old/target/debug/deps/no_proto-2b9c306cf5e321b2.d",
"chars": 1817,
"preview": "/Volumes/RAID Storage/Developer/NoProto/no_proto_rs/target/debug/deps/no_proto-2b9c306cf5e321b2.rmeta: src/lib.rs src/id"
}
]
// ... and 275 more files (download for full content)
About this extraction
This page contains the full source code of the only-cliches/NoProto GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 475 files (157.8 MB), approximately 9.1M tokens, and a symbol index with 3459 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.