Skip to content

Commit

Permalink
Define the encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
oovm committed May 19, 2023
1 parent f39c6f3 commit 9fb5306
Show file tree
Hide file tree
Showing 8 changed files with 1,172 additions and 5 deletions.
4 changes: 3 additions & 1 deletion projects/vos-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ edition = "2021"
#peginator = "0.3.0"

[features]
default = []
default = ["alloc"]
alloc = []
std = []
8 changes: 7 additions & 1 deletion projects/vos-types/src/decode/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@

/// Trait governing how types are decoded.
pub trait Decode<'de>: Sized {
/// Decode the given input.
fn decode<D>(decoder: D) -> Result<Self, D::Error>
where
D: Decoder<'de>;
}
Empty file.
2 changes: 0 additions & 2 deletions projects/vos-types/src/encode/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::encoder::Encoder;

pub trait EncodeError {}

/// Trait governing how types are encoded.
pub trait Encode {
/// Encode the given output.
Expand Down
Loading

0 comments on commit 9fb5306

Please sign in to comment.