pub struct InstanceConfig {
pub reserved: Vec<String>,
pub gates: BTreeMap<String, GateFilters>,
pub writing_style: WritingStyle,
pub acquisition: Option<Acquisition>,
pub migration: Option<String>,
}Expand description
The declaration as written.
Fields§
§reserved: Vec<String>Paths no delivered gate judges. Another tool owns these.
The list covers the gates sdd delivers. The Markdown linter reads
its scope from the ignores of its own configuration, so a Markdown
path it must skip goes in the root .markdownlint-cli2.jsonc.
gates: BTreeMap<String, GateFilters>Per-gate filters, keyed by gate id. A gate not named here takes its registry default.
writing_style: WritingStyleWhere the writing style comes from. Absent, the convention’s own chapter.
acquisition: Option<Acquisition>How every host obtains sdd, where no manager file records it.
Absent, the repository has recorded no host decision.
migration: Option<String>The migration the repository holds open, by the id of its workspace under this tool’s state root. Absent, no migration is open.
Implementations§
Source§impl InstanceConfig
impl InstanceConfig
Sourcepub fn parse(text: &str) -> Result<Self, ConfigError>
pub fn parse(text: &str) -> Result<Self, ConfigError>
Parse a declaration.
§Errors
ConfigError::Shape when the text is not a declaration, and
ConfigError::UnknownGate when a gates: key names no delivered
gate. Neither falls back to the default: a filter that quietly stops
applying is worse than one that fails loudly.
Sourcepub fn read(repo_root: &Utf8Path) -> Result<Self, ConfigError>
pub fn read(repo_root: &Utf8Path) -> Result<Self, ConfigError>
Read the declaration an instance carries.
A missing file is the empty declaration and never an error: an instance that declares nothing is a valid instance.
§Errors
See Self::parse. An unreadable file that exists is a shape error
rather than a silent default.
Sourcepub fn for_gate(&self, id: GateId) -> Option<&GateFilters>
pub fn for_gate(&self, id: GateId) -> Option<&GateFilters>
This gate’s declared filters, if the project named it.
Trait Implementations§
Source§impl Clone for InstanceConfig
impl Clone for InstanceConfig
Source§impl Debug for InstanceConfig
impl Debug for InstanceConfig
Source§impl Default for InstanceConfig
impl Default for InstanceConfig
Source§impl<'de> Deserialize<'de> for InstanceConfig
impl<'de> Deserialize<'de> for InstanceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for InstanceConfig
Source§impl PartialEq for InstanceConfig
impl PartialEq for InstanceConfig
impl StructuralPartialEq for InstanceConfig
Auto Trait Implementations§
impl Freeze for InstanceConfig
impl RefUnwindSafe for InstanceConfig
impl Send for InstanceConfig
impl Sync for InstanceConfig
impl Unpin for InstanceConfig
impl UnsafeUnpin for InstanceConfig
impl UnwindSafe for InstanceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.