Struct kaspa_utils::networking::ContextualNetAddress
source · pub struct ContextualNetAddress { /* private fields */ }Expand description
A network address possibly without explicit port.
Use normalize to get a fully determined address.
Implementations§
source§impl ContextualNetAddress
impl ContextualNetAddress
pub fn normalize(&self, default_port: u16) -> NetAddress
pub fn unspecified() -> Self
pub fn loopback() -> Self
Trait Implementations§
source§impl BorshSchema for ContextualNetAddress
impl BorshSchema for ContextualNetAddress
source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
source§fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition> )
Recursively, using DFS, add type definitions required for this type. For primitive types
this is an empty map. Type definition explains how to serialize/deserialize a type.
source§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
source§impl Clone for ContextualNetAddress
impl Clone for ContextualNetAddress
source§fn clone(&self) -> ContextualNetAddress
fn clone(&self) -> ContextualNetAddress
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 moresource§impl Debug for ContextualNetAddress
impl Debug for ContextualNetAddress
source§impl<'de> Deserialize<'de> for ContextualNetAddress
impl<'de> Deserialize<'de> for ContextualNetAddress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ContextualNetAddress
impl Display for ContextualNetAddress
source§impl From<NetAddress> for ContextualNetAddress
impl From<NetAddress> for ContextualNetAddress
source§fn from(value: NetAddress) -> Self
fn from(value: NetAddress) -> Self
Converts to this type from the input type.
source§impl FromStr for ContextualNetAddress
impl FromStr for ContextualNetAddress
source§impl Hash for ContextualNetAddress
impl Hash for ContextualNetAddress
source§impl PartialEq for ContextualNetAddress
impl PartialEq for ContextualNetAddress
source§fn eq(&self, other: &ContextualNetAddress) -> bool
fn eq(&self, other: &ContextualNetAddress) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ContextualNetAddress
impl Serialize for ContextualNetAddress
source§impl TryFrom<&str> for ContextualNetAddress
impl TryFrom<&str> for ContextualNetAddress
source§impl TryFrom<String> for ContextualNetAddress
impl TryFrom<String> for ContextualNetAddress
impl Copy for ContextualNetAddress
impl Eq for ContextualNetAddress
impl StructuralEq for ContextualNetAddress
impl StructuralPartialEq for ContextualNetAddress
Auto Trait Implementations§
impl RefUnwindSafe for ContextualNetAddress
impl Send for ContextualNetAddress
impl Sync for ContextualNetAddress
impl Unpin for ContextualNetAddress
impl UnwindSafe for ContextualNetAddress
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