Skip to content

Commit

Permalink
add new() method for Peer trait
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime2 committed Aug 9, 2019
1 parent ba9878e commit 74b78d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ impl<N> PeerId for N where N: Eq + Ord + Clone + Debug + Send + Serialize + Dese
//}

pub trait Peer<Id: PeerId> {
fn new(id: Id, net_addr: String) -> Self;
fn get_id(&self) -> Id;
fn get_net_addr(&self) -> String;
}
Expand Down

0 comments on commit 74b78d2

Please sign in to comment.