Skip to content

Commit

Permalink
Add note
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Sep 19, 2023
1 parent 55fbb1a commit 67ae7e6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# serde-firestore-value

## NOTE

```rust
use ::prost::alloc::string::String;
use ::prost::alloc::vec::Vec;
use ::std::collections::HashMap;
use ::core::option::Option;
use ::prost_types::Timestamp;
use /* ... */::LatLng;

struct Value {
value_type: Option<ValueType>,
}

enum ValueType {
NullValue(i32),
BooleanValue(bool),
IntegerValue(i64),
DoubleValue(f64),
TimestampValue(Timestamp),
StringValue(String),
BytesValue(Vec<u8>),
ReferenceValue(String),
GeoPointValue(LatLng),
ArrayValue(ArrayValue),
MapValue(MapValue),
}

struct ArrayValue {
values: Vec<Value>,
}

struct MapValue {
fields: HashMap<String, Value>,
}

struct LatLng {
latitude: f64,
longitude: f64,
}
```

0 comments on commit 67ae7e6

Please sign in to comment.