pub unsafe fn new(base: usize, mapper: M) -> Option<Self> {
        let header: Single<Header, M> = Single::new(base, mapper.clone());
        let size = header.read().size();

        if size > 0 {
            let memory = Array::new(base + 8, (size * 1024).try_into().unwrap(), mapper);

            Some(Self { header, memory })
        } else {
            None
        }
    }
/// Creates an accessor to xHCI Local Memory Capability.
///
/// This function returns `None` if the size of the Local Memory space is 0.
///
/// # Safety
///
/// `base` must be the correct address to xHCI Local Memory Capability.
///
/// The caller must ensure that xHCI Local Memory Capability is accessed only by the created
/// accessor.
///
/// # Panics
///
/// This method panics if `base` is not aligned correctly.
Creates an accessor to xHCI Local Memory Capability.
This function returns `None` if the size of the Local Memory space is 0.
Creates an accessor to xHCI Local Memory Capability . This function returns ` None ` if the size of the Local Memory space is 0 .
pub unsafe fn new(base: usize, mapper: M) -> Option<Self> {
        let header: Single<Header, M> = Single::new(base, mapper.clone());
        let size = header.read().size();
        if size > 0 {
            let memory = Array::new(base + 8, (size * 1024).try_into().unwrap(), mapper);
            Some(Self { header, memory })
        } else {
            None
        }
    }
pub unsafe fn new ( base : usize , mapper : M ) -> Option < Self > { let header : Single < Header , M > = Single :: new ( base , mapper . clone ( ) ) ; let size = header . read ( ) . size ( ) ; if size > 0 { let memory = Array :: new ( base + 8 , ( size * 1024 ) . try_into ( ) . unwrap ( ) , mapper ) ; Some ( Self { header , memory } ) } else { None } }
Creates an accessor to xHCI Local Memory Capability.
Creates an accessor to xHCI Local Memory Capability .
base
usize
mapper
M
base
usize
mapper
M
safety
`base` must be the correct address to xHCI Local Memory Capability.

The caller must ensure that xHCI Local Memory Capability is accessed only by the created
accessor.
` base ` must be the correct address to xHCI Local Memory Capability . The caller must ensure that xHCI Local Memory Capability is accessed only by the created accessor .
panics
This method panics if `base` is not aligned correctly.
This method panics if ` base ` is not aligned correctly .