Skip to content

Commit

Permalink
Add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
michelemin committed Jan 10, 2025
1 parent fd928cf commit 1b43d0f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/plaid-stl/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ pub enum LogSource {
Logback(String),
}

/// Represents how many logbacks can be triggered by the module that handles a message.
/// This can be a finite value (u32, with 0 a valid value) or it can be unlimited.
/// These are the TOML encodings for the two cases:
/// * "Unlimited"
/// * { Limited = value }
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum LogbacksAllowed {
Unlimited,
Expand Down
15 changes: 15 additions & 0 deletions runtime/plaid/src/loader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ pub struct LimitedAmount {
module_overrides: HashMap<String, u64>,
}

/// Represents the value of a limit imposed on some resource.
/// This can be a finite value (u64, with 0 a valid value) or
/// it can be unlimited. These are the TOML encodings for the
/// two cases:
/// * "Unlimited"
/// * { Limited = value }
///
/// E.g.,
/// ```
/// [loading.storage_size]
/// default = "Unlimited"
/// [loading.storage_size.log_type]
/// [loading.storage_size.module_overrides]
/// "test_db.wasm" = { Limited = 50 }
/// ```
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum LimitValue {
Unlimited,
Expand Down

0 comments on commit 1b43d0f

Please sign in to comment.