Skip to main content

DbAddress

Trait DbAddress 

Source
pub(crate) trait DbAddress: FromStr {
    type Int;

    // Required method
    fn to_int(&self) -> Self::Int;
}
Expand description

A type that can be an address entry in one of our databases.

Required Associated Types§

Source

type Int

The integer that we use to represent this kind of address.

Required Methods§

Source

fn to_int(&self) -> Self::Int

Convert this address to an integer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl DbAddress for u32

Source§

type Int = u32

Source§

fn to_int(&self) -> Self::Int

Source§

impl DbAddress for Ipv6Addr

Source§

type Int = u128

Source§

fn to_int(&self) -> Self::Int

Implementors§