|
4 | 4 | //! |
5 | 5 | //! This module defines the basic data types that are used throughout uefi-rs |
6 | 6 |
|
| 7 | +pub mod chars; |
| 8 | + |
| 9 | +mod guid; |
| 10 | +#[macro_use] |
| 11 | +mod opaque; |
| 12 | +#[cfg(feature = "alloc")] |
| 13 | +mod owned_strs; |
| 14 | +mod strs; |
| 15 | +mod unaligned_slice; |
| 16 | + |
| 17 | +pub use chars::{Char8, Char16}; |
| 18 | +pub use guid::{Guid, Identify}; |
| 19 | +#[cfg(feature = "alloc")] |
| 20 | +pub use owned_strs::{CString16, FromStrError}; |
| 21 | +pub use strs::{ |
| 22 | + CStr8, CStr16, EqStrUntilNul, FromSliceWithNulError, FromStrWithBufError, PoolString, |
| 23 | + UnalignedCStr16Error, |
| 24 | +}; |
| 25 | +/// These functions are used in the implementation of the [`cstr8!`] macro. |
| 26 | +/// |
| 27 | +/// [`cstr8!`]: crate::cstr8 |
| 28 | +#[doc(hidden)] |
| 29 | +pub use strs::{str_num_latin1_chars, str_to_latin1}; |
| 30 | +pub use uefi_raw::{PhysicalAddress, VirtualAddress}; |
| 31 | +pub use unaligned_slice::UnalignedSlice; |
| 32 | + |
7 | 33 | use core::ffi::c_void; |
8 | 34 | use core::ptr::{self, NonNull}; |
9 | 35 |
|
@@ -154,37 +180,6 @@ impl Align for [u8] { |
154 | 180 | } |
155 | 181 | } |
156 | 182 |
|
157 | | -mod guid; |
158 | | -pub use guid::{Guid, Identify}; |
159 | | - |
160 | | -pub mod chars; |
161 | | -pub use chars::{Char8, Char16}; |
162 | | - |
163 | | -#[macro_use] |
164 | | -mod opaque; |
165 | | - |
166 | | -mod strs; |
167 | | -pub use strs::{ |
168 | | - CStr8, CStr16, EqStrUntilNul, FromSliceWithNulError, FromStrWithBufError, PoolString, |
169 | | - UnalignedCStr16Error, |
170 | | -}; |
171 | | - |
172 | | -/// These functions are used in the implementation of the [`cstr8!`] macro. |
173 | | -/// |
174 | | -/// [`cstr8!`]: crate::cstr8 |
175 | | -#[doc(hidden)] |
176 | | -pub use strs::{str_num_latin1_chars, str_to_latin1}; |
177 | | - |
178 | | -#[cfg(feature = "alloc")] |
179 | | -mod owned_strs; |
180 | | -#[cfg(feature = "alloc")] |
181 | | -pub use owned_strs::{CString16, FromStrError}; |
182 | | - |
183 | | -mod unaligned_slice; |
184 | | -pub use unaligned_slice::UnalignedSlice; |
185 | | - |
186 | | -pub use uefi_raw::{PhysicalAddress, VirtualAddress}; |
187 | | - |
188 | 183 | #[cfg(test)] |
189 | 184 | mod tests { |
190 | 185 | use super::*; |
|
0 commit comments