Enum soroban_env_guest::xdr::PeerAddressIp
pub enum PeerAddressIp {
IPv4([u8; 4]),
IPv6([u8; 16]),
}
Expand description
PeerAddressIp is an XDR NestedUnion defines as:
union switch (IPAddrType type)
{
case IPv4:
opaque ipv4[4];
case IPv6:
opaque ipv6[16];
}
Variants§
Implementations§
§impl PeerAddressIp
impl PeerAddressIp
pub const VARIANTS: [IpAddrType; 2] = _
pub const VARIANTS_STR: [&'static str; 2] = _
pub const fn name(&self) -> &'static str
pub const fn discriminant(&self) -> IpAddrType
pub const fn variants() -> [IpAddrType; 2]
Trait Implementations§
§impl<'arbitrary> Arbitrary<'arbitrary> for PeerAddressIp
impl<'arbitrary> Arbitrary<'arbitrary> for PeerAddressIp
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<PeerAddressIp, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<PeerAddressIp, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<PeerAddressIp, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary> ) -> Result<PeerAddressIp, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read more§impl Clone for PeerAddressIp
impl Clone for PeerAddressIp
§fn clone(&self) -> PeerAddressIp
fn clone(&self) -> PeerAddressIp
Returns a copy 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 more§impl Debug for PeerAddressIp
impl Debug for PeerAddressIp
§impl Discriminant<IpAddrType> for PeerAddressIp
impl Discriminant<IpAddrType> for PeerAddressIp
fn discriminant(&self) -> IpAddrType
§impl Hash for PeerAddressIp
impl Hash for PeerAddressIp
§impl Ord for PeerAddressIp
impl Ord for PeerAddressIp
§impl PartialEq for PeerAddressIp
impl PartialEq for PeerAddressIp
§fn eq(&self, other: &PeerAddressIp) -> bool
fn eq(&self, other: &PeerAddressIp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for PeerAddressIp
impl PartialOrd for PeerAddressIp
§fn partial_cmp(&self, other: &PeerAddressIp) -> Option<Ordering>
fn partial_cmp(&self, other: &PeerAddressIp) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl ReadXdr for PeerAddressIp
impl ReadXdr for PeerAddressIp
§fn read_xdr<R>(r: &mut Limited<R>) -> Result<PeerAddressIp, Error>where
R: Read,
fn read_xdr<R>(r: &mut Limited<R>) -> Result<PeerAddressIp, Error>where
R: Read,
Read the XDR and construct the type. Read more
§fn read_xdr_to_end<R>(r: &mut Limited<R>) -> Result<Self, Error>where
R: Read,
fn read_xdr_to_end<R>(r: &mut Limited<R>) -> Result<Self, Error>where
R: Read,
Read the XDR and construct the type, and consider it an error if the
read does not completely consume the read implementation. Read more
§fn read_xdr_into<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
fn read_xdr_into<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
Read the XDR and construct the type. Read more
§fn read_xdr_into_to_end<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
fn read_xdr_into_to_end<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
Read the XDR into the existing value, and consider it an error if the
read does not completely consume the read implementation. Read more
§fn read_xdr_iter<R>(r: &mut Limited<R>) -> ReadXdrIter<&mut R, Self> ⓘwhere
R: Read,
fn read_xdr_iter<R>(r: &mut Limited<R>) -> ReadXdrIter<&mut R, Self> ⓘwhere
R: Read,
Create an iterator that reads the read implementation as a stream of
values that are read into the implementing type. Read more
§impl Variants<IpAddrType> for PeerAddressIp
impl Variants<IpAddrType> for PeerAddressIp
fn variants() -> Iter<'static, IpAddrType>
§impl WriteXdr for PeerAddressIp
impl WriteXdr for PeerAddressIp
impl Eq for PeerAddressIp
impl StructuralEq for PeerAddressIp
impl StructuralPartialEq for PeerAddressIp
impl Union<IpAddrType> for PeerAddressIp
Auto Trait Implementations§
impl RefUnwindSafe for PeerAddressIp
impl Send for PeerAddressIp
impl Sync for PeerAddressIp
impl Unpin for PeerAddressIp
impl UnwindSafe for PeerAddressIp
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