use core::marker::PhantomData;
#[derive(Clone, Copy)]
pub struct Physical<P> {
num_bytes: usize,
phys_addr_lo: usize,
phys_addr_hi: usize,
_marker: PhantomData<P>,
}
impl<P> Physical<P> {
#[inline]
pub const fn new(num_bytes: usize, phys_addr_lo: usize, phys_addr_hi: usize) -> Self {
Self {
num_bytes,
phys_addr_lo,
phys_addr_hi,
_marker: core::marker::PhantomData,
}
}
#[inline]
pub const fn num_bytes(&self) -> usize {
self.num_bytes
}
#[inline]
pub const fn phys_addr_lo(&self) -> usize {
self.phys_addr_lo
}
#[inline]
pub const fn phys_addr_hi(&self) -> usize {
self.phys_addr_hi
}
}