third_party_rust_cxx/syntax
Adrian Taylor f5dd552036 Adding &[u8] support.
This change adds specifically, support for &[u8] with a corresponding
rust::Slice<uint8_t> type. No other types of slice are permitted. The
rationale is that it may be common to pass binary data back and forth
across the FFI boundary, so it's more urgent to get this in place sooner.
Broader support for other slices can wait for the future.

But, both C++ and Rust-side bindings should allow the existing support
to be broadened to other Slice types in future without code changes.

A few specific notes:

* The name "rust::Slice" might be better as "rust::SliceRef" but I'm
  following the precedent of "rust::Str".
* It would be good to add constructors from std::span but as that's
  a C++20 feature, that may have to wait until C++ feature detection
  is resolved.
* Internally, this follows the pattern of &str, where the parser will
  initially recognize this as Type::Ref (of Type::Slice) but then
  will replace that with Type::SliceRefU8. Type::Slice should not
  persist through later stages. As we later come to support other
  types of slice, we would probably want to remove Type::SliceRefU8.
2020-04-14 14:13:48 -07:00
..
atom.rs Clean up Atom::from match arm order 2020-03-13 13:55:28 -07:00
attrs.rs Safe FFI between Rust and C++ 2020-01-08 08:57:24 -08:00
check.rs Adding &[u8] support. 2020-04-14 14:13:48 -07:00
doc.rs Safe FFI between Rust and C++ 2020-01-08 08:57:24 -08:00
error.rs Safe FFI between Rust and C++ 2020-01-08 08:57:24 -08:00
ident.rs Safe FFI between Rust and C++ 2020-01-08 08:57:24 -08:00
impls.rs Adding &[u8] support. 2020-04-14 14:13:48 -07:00
mod.rs Adding &[u8] support. 2020-04-14 14:13:48 -07:00
parse.rs Adding &[u8] support. 2020-04-14 14:13:48 -07:00
set.rs Safe FFI between Rust and C++ 2020-01-08 08:57:24 -08:00
tokens.rs Adding &[u8] support. 2020-04-14 14:13:48 -07:00
types.rs Adding &[u8] support. 2020-04-14 14:13:48 -07:00