Home
last modified time | relevance | path

Searched refs:Bstr (Results 1 – 8 of 8) sorted by relevance

/external/rust/crates/gdbstub/src/protocol/common/
Dmod.rs11 pub struct Bstr<'a>(&'a [u8]); struct
13 impl<'a> From<&'a [u8]> for Bstr<'a> { implementation
14 fn from(s: &'a [u8]) -> Bstr<'a> { in from()
15 Bstr(s) in from()
19 impl<'a> From<Bstr<'a>> for &'a [u8] {
20 fn from(s: Bstr<'a>) -> &'a [u8] { in from()
25 impl AsRef<[u8]> for Bstr<'_> { implementation
/external/libcppbor/tests/
Dcppbor_test.cpp117 EXPECT_EQ("\x40", Bstr("").toString()); in TEST()
118 EXPECT_EQ("\x41\x61", Bstr("a").toString()); in TEST()
119 EXPECT_EQ("\x41\x41", Bstr("A").toString()); in TEST()
120 EXPECT_EQ("\x44\x49\x45\x54\x46", Bstr("IETF").toString()); in TEST()
121 EXPECT_EQ("\x42\x22\x5c", Bstr("\"\\").toString()); in TEST()
122 EXPECT_EQ("\x42\xc3\xbc", Bstr("\xc3\xbc").toString()); in TEST()
123 EXPECT_EQ("\x43\xe6\xb0\xb4", Bstr("\xe6\xb0\xb4").toString()); in TEST()
124 EXPECT_EQ("\x44\xf0\x90\x85\x91", Bstr("\xf0\x90\x85\x91").toString()); in TEST()
125 EXPECT_EQ("\x44\x01\x02\x03\x04", Bstr("\x01\x02\x03\x04").toString()); in TEST()
126 EXPECT_EQ("\x44\x40\x40\x40\x40", Bstr("@@@@").toString()); in TEST()
[all …]
/external/libcppbor/include/cppbor/
Dcppbor.h62 class Bstr; variable
127 virtual Bstr* asBstr() { return nullptr; } in asBstr()
128 const Bstr* asBstr() const { return const_cast<Item*>(this)->asBstr(); } in asBstr()
368 class Bstr : public Item {
373 explicit Bstr() {} in Bstr() function
376 explicit Bstr(std::vector<uint8_t> v) : mValue(std::move(v)) {} in Bstr() function
379 explicit Bstr(const std::string& v) in Bstr() function
384 explicit Bstr(const std::pair<const uint8_t*, size_t>& buf) in Bstr() function
391 explicit Bstr(const std::pair<I1, I2>& pair) : mValue(pair.first, pair.second) {} in Bstr() function
397 Bstr(I1 begin, I2 end) : mValue(begin, end) {} in Bstr() function
[all …]
Dcppbor_parse.h118 inline ParseResult parse(const Bstr* bstr) { in parse()
/external/rust/crates/gdbstub/src/protocol/commands/
D_qSupported.rs59 name: Bstr<'a>,
60 val: Option<Bstr<'a>>,
/external/libcppbor/src/
Dcppbor.cpp126 const Bstr* bstr = item->asBstr(); in prettyPrintInternal()
381 uint8_t* Bstr::encode(uint8_t* pos, const uint8_t* end) const { in encode()
387 void Bstr::encodeValue(EncodeCallback encodeCallback) const { in encodeValue()
Dcppbor_parse.cpp250 return handleString<Bstr>(addlData, begin, pos, end, "byte string", parseClient); in parseRecursively()
/external/libcppbor/
DREADME.md32 * `Bstr` corresponds to major type 2, a byte string.
55 iterator>` and `std::pair<uint8_t*, size_t>` convert to `Bstr`.