coil-runtime 0.1.1

HTTP runtime and request handling for the Coil framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::errors::RuntimeJobsError;

pub(crate) fn validate_runtime_identifier(
    field: &'static str,
    value: String,
) -> Result<String, RuntimeJobsError> {
    let trimmed = value.trim();
    if trimmed.is_empty() {
        Err(RuntimeJobsError::EmptyValue { field })
    } else {
        Ok(trimmed.to_string())
    }
}