pub struct PeerBuilder {
pub public_key: Option<[u8; 32]>,
pub allowed_ips: Option<Vec<AllowedIp>>,
/* private fields */
}
Expand description
Builder for Peer
.
Fields§
§public_key: Option<[u8; 32]>
§allowed_ips: Option<Vec<AllowedIp>>
Implementations§
Source§impl PeerBuilder
impl PeerBuilder
pub fn public_key(&mut self, value: [u8; 32]) -> &mut Self
pub fn endpoint(&mut self, value: Option<SocketAddr>) -> &mut Self
pub fn persistent_keepalive_interval(&mut self, value: u16) -> &mut Self
pub fn last_handshake_time(&mut self, value: Duration) -> &mut Self
pub fn rx_bytes(&mut self, value: u64) -> &mut Self
pub fn tx_bytes(&mut self, value: u64) -> &mut Self
pub fn allowed_ips(&mut self, value: Vec<AllowedIp>) -> &mut Self
pub fn protocol_version(&mut self, value: u32) -> &mut Self
Trait Implementations§
Source§impl Clone for PeerBuilder
impl Clone for PeerBuilder
Source§fn clone(&self) -> PeerBuilder
fn clone(&self) -> PeerBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PeerBuilder
impl RefUnwindSafe for PeerBuilder
impl Send for PeerBuilder
impl Sync for PeerBuilder
impl Unpin for PeerBuilder
impl UnwindSafe for PeerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more