Skip to content

Commit 6bc8371

Browse files
committed
Add missing docs
1 parent 40e1490 commit 6bc8371

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

source/scoped-mutex-traits/src/lib.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1+
//! Scoped Mutex Traits
2+
//!
3+
//! This crate provides traits that are aimed at compatibility for scoped mutexes.
4+
//!
5+
//! Compared to the more general traits provided by the [`lock_api`] crate, these traits
6+
//! are aimed at being more compatible with implementations based on critical sections,
7+
//! are easier to work with in a nested or strictly LIFO pattern.
8+
//!
9+
//! [`lock_api`]: https://docs.rs/lock_api/
10+
#![deny(missing_docs)]
111
#![cfg_attr(not(feature = "std"), no_std)]
212

13+
/// Const Init Trait
14+
///
15+
/// This trait is intended for use when implementers of [`ScopedRawMutex`] that can
16+
/// be constructed in const context, e.g. for placing in a `static`
317
pub trait ConstInit {
418
/// Create a new instance.
519
///

source/scoped-mutex/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Scoped Mutex Crate
2-
2+
#![deny(missing_docs)]
33
#![cfg_attr(not(feature = "std"), no_std)]
44

55
pub mod raw_impls;

source/scoped-mutex/src/raw_impls.rs

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use scoped_mutex_traits::{ConstInit, ScopedRawMutex};
1313

1414
#[cfg(feature = "impl-critical-section")]
1515
pub mod cs {
16+
//! Critical Section based implementation
1617
1718
use super::*;
1819

@@ -74,6 +75,7 @@ pub mod cs {
7475
// ================
7576

7677
pub mod local {
78+
//! Locally usable based implementation
7779
use super::*;
7880

7981
/// A mutex that allows borrowing data in local context.
@@ -135,6 +137,8 @@ pub mod local {
135137

136138
#[cfg(all(feature = "impl-unsafe-cortex-m-single-core", cortex_m))]
137139
pub mod single_core_thread_mode {
140+
//! A single-core safe implementation that does not require a critical section
141+
138142
use super::*;
139143

140144
/// A "mutex" that only allows borrowing from thread mode.

0 commit comments

Comments
 (0)