rustydht_lib/common/
transaction_id.rs

1#[derive(PartialEq, Eq, Hash)]
2/// Represents a DHT transaction id, which are basically just small byte strings.
3/// This type is not yet used widely across this codebase.
4pub struct TransactionId {
5    pub bytes: Vec<u8>,
6}
7
8impl From<Vec<u8>> for TransactionId {
9    fn from(tid: Vec<u8>) -> Self {
10        TransactionId { bytes: tid }
11    }
12}