Skip to content

Commit 2c41ceb

Browse files
added decode trait
1 parent c5c5e99 commit 2c41ceb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

amqp-lib/src/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
use bigdecimal::BigDecimal;
2+
3+
use crate::error::AppError;
24
trait Encode {
35
fn constructor(&self) -> Constructor;
46
fn encode(&self) -> Vec<u8>;
57
}
8+
9+
trait Decode<'a>: From<&'a [u8]> + Encode {}
610
pub struct Timestamp(u64);
711
pub struct Binary(Vec<u8>);
812
pub struct Symbol(String);

0 commit comments

Comments
 (0)