macro_rules! resolved_options {
($name:ident, $options:ty) => {
#[doc = concat!(
"Immutable options resolved by the facade before provider dispatch.\n\n",
"# Examples\n\n",
"```rust\n",
"use ", stringify!(qubit_fs), "::spi::", stringify!($name), ";\n\n",
"fn inspect(options: &", stringify!($name), ") {\n",
" let _caller_options = options.options();\n",
"}\n",
"```",
)]
#[derive(Clone)]
pub struct $name {
/// Caller options retained after facade validation and
options: $options,
}
impl $name {
#[allow(dead_code)]
#[inline]
pub(crate) const fn new(options: $options) -> Self {
Self { options }
}
#[inline]
#[must_use]
pub const fn options(&self) -> &$options {
&self.options
}
}
};
}
pub(in crate::spi) use resolved_options;