vm_memory/
address.rs

1// Copyright (C) 2019 Alibaba Cloud Computing. All rights reserved.
2//
3// Portions Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4//
5// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
6// Use of this source code is governed by a BSD-style license that can be
7// found in the LICENSE-BSD-3-Clause file.
8//
9// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
10
11//! Traits to represent an address within an address space.
12//!
13//! Two traits are defined to represent an address within an address space:
14//! - [`AddressValue`](trait.AddressValue.html): stores the raw value of an address. Typically
15//!   `u32`,`u64` or `usize` is used to store the raw value. But pointers, such as `*u8`, can't be used
16//!   because they don't implement the [`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html) and
17//!   [`Sub`](https://doc.rust-lang.org/std/ops/trait.Sub.html) traits.
18//! - [Address](trait.Address.html): encapsulates an [`AddressValue`](trait.AddressValue.html)
19//!   object and defines methods to access and manipulate it.
20
21/// Simple helper trait used to store a raw address value.
22pub use vm_memory_new::address::{Address, AddressValue};