# Address in riscv::addr - Rust
API documentation for the Rust `Address` trait in crate `riscv`.
Keywords: rust, rustlang, rust-lang, Address

# Trait riscv::addr::Address

source · [−]

    pub trait Address: Debug + Copy + Clone + PartialEq + Eq + PartialOrd + Ord {
        fn new(addr: usize) -> Self;
        fn page_number(&self) -> usize;
        fn page_offset(&self) -> usize;
        fn to_4k_aligned(&self) -> Self;
        fn as_usize(&self) -> usize;
    }

## Required methods

source

#### fn new(addr: usize) -> Self

source

#### fn page_number(&self) -> usize

source

#### fn page_offset(&self) -> usize

source

#### fn to_4k_aligned(&self) -> Self

source

#### fn as_usize(&self) -> usize

## Implementors

source

### impl Address for GPAddrSv32X4

source

### impl Address for GPAddrSv39X4

source

### impl Address for GPAddrSv48X4

source

### impl Address for PhysAddrSv32

source

### impl Address for VirtAddrSv32

source

### impl Address for PhysAddrSv39

source

### impl Address for VirtAddrSv39

source

### impl Address for PhysAddrSv48

source

### impl Address for VirtAddrSv48