pub struct TestNetZoneAddr(pub u32);Expand description
An address on the test network
Tuple Fields§
§0: u32Trait Implementations§
Source§impl BorshDeserialize for TestNetZoneAddr
impl BorshDeserialize for TestNetZoneAddr
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for TestNetZoneAddr
impl BorshSerialize for TestNetZoneAddr
Source§impl Clone for TestNetZoneAddr
impl Clone for TestNetZoneAddr
Source§fn clone(&self) -> TestNetZoneAddr
fn clone(&self) -> TestNetZoneAddr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TestNetZoneAddr
Source§impl Debug for TestNetZoneAddr
impl Debug for TestNetZoneAddr
Source§impl Display for TestNetZoneAddr
impl Display for TestNetZoneAddr
impl Eq for TestNetZoneAddr
Source§impl From<TestNetZoneAddr> for NetworkAddress
impl From<TestNetZoneAddr> for NetworkAddress
Source§fn from(value: TestNetZoneAddr) -> Self
fn from(value: TestNetZoneAddr) -> Self
Converts to this type from the input type.
Source§impl Hash for TestNetZoneAddr
impl Hash for TestNetZoneAddr
Source§impl NetZoneAddress for TestNetZoneAddr
impl NetZoneAddress for TestNetZoneAddr
Source§type BanID = TestNetZoneAddr
type BanID = TestNetZoneAddr
Cuprate needs to be able to ban peers by IP addresses and not just by
SocketAddr as
that include the port, to be able to facilitate this network addresses must have a ban ID
which for hidden services could just be the address it self but for clear net addresses will
be the IP address. Read moreSource§fn make_canonical(&mut self)
fn make_canonical(&mut self)
Turns this address into its canonical form.
Source§fn ban_id(&self) -> Self::BanID
fn ban_id(&self) -> Self::BanID
Returns the
Self::BanID for this address.fn should_add_to_peer_list(&self) -> bool
Source§impl PartialEq for TestNetZoneAddr
impl PartialEq for TestNetZoneAddr
impl StructuralPartialEq for TestNetZoneAddr
Auto Trait Implementations§
impl Freeze for TestNetZoneAddr
impl RefUnwindSafe for TestNetZoneAddr
impl Send for TestNetZoneAddr
impl Sync for TestNetZoneAddr
impl Unpin for TestNetZoneAddr
impl UnsafeUnpin for TestNetZoneAddr
impl UnwindSafe for TestNetZoneAddr
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes