mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-05 20:40:02 -08:00
docs(secret-memory): fix warnings when generating the documentation
This commit is contained in:
@@ -19,11 +19,11 @@ pub struct MallocAllocator {
|
||||
_dummy_private_data: MallocAllocatorContents,
|
||||
}
|
||||
|
||||
/// A [allocator_api2::boxed::Box](allocator_api2::boxed::Box) backed by the memsec allocator
|
||||
/// A [allocator_api2::boxed::Box] backed by the memsec allocator
|
||||
/// from the [memsec] crate.
|
||||
pub type MallocBox<T> = allocator_api2::boxed::Box<T, MallocAllocator>;
|
||||
|
||||
/// A [allocator_api2::vec::Vec](allocator_api2::vec::Vec) backed by the memsec allocator
|
||||
/// A [allocator_api2::vec::Vec] backed by the memsec allocator
|
||||
/// from the [memsec] crate.
|
||||
pub type MallocVec<T> = allocator_api2::vec::Vec<T, MallocAllocator>;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! This module provides a wrapper [MallocAllocator] around the memfdsec allocator in
|
||||
//! This module provides a wrapper [MemfdSecAllocator] around the memfdsec allocator in
|
||||
//! [memsec]. The wrapper implements the [Allocator] trait and thus makes the memfdsec allocator
|
||||
//! usable as a drop-in replacement wherever the [Allocator] trait is required.
|
||||
//!
|
||||
@@ -20,11 +20,11 @@ pub struct MemfdSecAllocator {
|
||||
_dummy_private_data: MemfdSecAllocatorContents,
|
||||
}
|
||||
|
||||
/// A [allocator_api2::boxed::Box](allocator_api2::boxed::Box) backed by the memfdsec allocator
|
||||
/// A [allocator_api2::boxed::Box] backed by the memfdsec allocator
|
||||
/// from the [memsec] crate.
|
||||
pub type MemfdSecBox<T> = allocator_api2::boxed::Box<T, MemfdSecAllocator>;
|
||||
|
||||
/// A [allocator_api2::vec::Vec](allocator_api2::vec::Vec) backed by the memfdsec allocator
|
||||
/// A [allocator_api2::vec::Vec] backed by the memfdsec allocator
|
||||
/// from the [memsec] crate.
|
||||
pub type MemfdSecVec<T> = allocator_api2::vec::Vec<T, MemfdSecAllocator>;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ pub fn set_secret_alloc_type(alloc_type: SecretAllocType) {
|
||||
ALLOC_TYPE.set(alloc_type).unwrap();
|
||||
}
|
||||
|
||||
/// Initializes [ALLOC_TYPE] with `alloc_type` if it is not initialized yet. Returns
|
||||
/// Initializes type of allocator to be sued with `alloc_type` if it is not initialized yet. Returns
|
||||
/// the current [SecretAllocType] afterward.
|
||||
///
|
||||
/// # Example
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
//! that of [Secret].
|
||||
//! 2. The [debug] module provides functionality to easily create debug output for objects that are
|
||||
//! backed by byte arrays or slices, like for example [Secret].
|
||||
//! 3. The [file] module provides functionality to store [Secrets](crate::Secret) und [Public]
|
||||
//! in files such that the file's [Visibility](rosenpass_util::file::Visibility)
|
||||
//! 3. The [mod@file] module provides functionality to store [Secrets](crate::Secret)
|
||||
//! and [Public] in files such that the file's [Visibility](rosenpass_util::file::Visibility)
|
||||
//! corresponds to the confidentiality of the data.
|
||||
//! 4. The [rand] module provides a simple way of generating randomness.
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ impl<T: Zeroize> ZeroizingSecretBox<T> {
|
||||
}
|
||||
|
||||
impl<T: Zeroize + ?Sized> ZeroizingSecretBox<T> {
|
||||
/// Creates a new [ZeroizingSecretBox] from a [SecretBox<T>] for the type `T`,
|
||||
/// Creates a new [ZeroizingSecretBox] from a [SecretBox] for the type `T`,
|
||||
/// which must implement [Zeroize] but does not have to be [Sized].
|
||||
fn from_secret_box(inner: SecretBox<T>) -> Self {
|
||||
Self(Some(inner))
|
||||
|
||||
Reference in New Issue
Block a user