pub struct Subnet {
pub addr: IpAddress,
pub prefix_len: u8,
}
Expand description
An IP address with its subnet prefix length.
Fields§
§addr: IpAddress
The IPv4 or IPv6 address.
prefix_len: u8
The number of bits set to 1 in the subnet mask.
When [addr
] is [IpAddress.ipv4
], must be in the range [0, 32]
.
When [addr
] is [IpAddress.ipv6
], must be in the range [0, 128]
.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Subnet, D> for Subnet
impl<D: ResourceDialect> Decode<Subnet, D> for Subnet
Source§impl<D: ResourceDialect, T0: Encode<IpAddress, D>, T1: Encode<u8, D>> Encode<Subnet, D> for (T0, T1)
impl<D: ResourceDialect, T0: Encode<IpAddress, D>, T1: Encode<u8, D>> Encode<Subnet, D> for (T0, T1)
Source§impl Ord for Subnet
impl Ord for Subnet
Source§impl PartialOrd for Subnet
impl PartialOrd for Subnet
Source§impl TypeMarker for Subnet
impl TypeMarker for Subnet
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Subnet
impl ValueTypeMarker for Subnet
impl Copy for Subnet
impl Eq for Subnet
impl Persistable for Subnet
impl StructuralPartialEq for Subnet
Auto Trait Implementations§
impl Freeze for Subnet
impl RefUnwindSafe for Subnet
impl Send for Subnet
impl Sync for Subnet
impl Unpin for Subnet
impl UnwindSafe for Subnet
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)