dexd/encoded_array_item.rs
1// Shane Isbell licenses this file to you under the Apache License, Version 2.0
2// (the "License"); you may not use this file except in compliance with the License.
3//
4// You may obtain a copy of the License at
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License. See the NOTICE file distributed with this work for
13// additional information regarding copyright ownership.
14use encoded_value::EncodedValue;
15use std::io::Cursor;
16
17#[derive(Debug, PartialEq, PartialOrd, Clone)]
18pub struct EncodedArrayItem {
19 value: Vec<EncodedArray>,
20}
21
22#[derive(Debug, PartialEq, PartialOrd, Clone)]
23pub struct EncodedArray {
24 pub size: (u64, u16),
25
26 pub values: Vec<EncodedValue>,
27}
28
29impl EncodedArrayItem {
30 pub fn read(data: &mut Cursor<&Vec<u8>>) -> EncodedArrayItem {
31 EncodedArrayItem { value: Vec::new() }
32 }
33}
34
35impl EncodedArray {
36 pub fn read(data: &mut Cursor<&Vec<u8>>) -> EncodedArray {
37 EncodedArray {
38 size: (0, 0),
39 values: Vec::new(),
40 }
41 }
42}