pub enum StyleInput {
Id(String),
Uri(String),
Path(String),
Yaml(String),
}Expand description
A style reference that can be resolved locally or by an external resolver.
This union type allows callers to supply a style by local path, inline YAML,
or as an identifier that requires a remote resolver. Only Path and Yaml
can be resolved locally; Id and Uri require the citum-server resolver chain.
Variants§
Id(String)
A style identifier to be resolved from registries (builtin, store, remote). Requires external resolver chain — local resolution returns UnresolvedInput error.
Uri(String)
A remote URI to be resolved (requires HTTP access). Requires external resolver chain — local resolution returns UnresolvedInput error.
Path(String)
A local filesystem path to a YAML style file.
Yaml(String)
Inline YAML style definition.
Implementations§
Source§impl StyleInput
impl StyleInput
Sourcepub fn resolve_local(&self) -> Result<Style, FormatDocumentError>
pub fn resolve_local(&self) -> Result<Style, FormatDocumentError>
Resolve the style locally from Path or Yaml variants.
This method handles local filesystem paths and inline YAML content.
For Id and Uri variants, which require a resolver chain, this returns
an UnresolvedInput error.
§Errors
Returns FormatDocumentError::UnresolvedInput for Id and Uri variants.
Returns FormatDocumentError::StylePath for filesystem errors.
Returns FormatDocumentError::StyleParse for YAML parsing errors.
Trait Implementations§
Source§impl Clone for StyleInput
impl Clone for StyleInput
Source§fn clone(&self) -> StyleInput
fn clone(&self) -> StyleInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more