pub enum RefsInput {
Path(String),
Yaml(String),
Json(Value),
}Expand description
A refs input that can be resolved locally or by an external resolver.
This union type allows callers to supply reference data by local YAML file path, inline YAML, or inline JSON (current API). Enables citum-server and bindings to accept references from files (e.g., via pipe transport from LaTeX).
Variants§
Path(String)
Local filesystem path to a YAML refs file.
Yaml(String)
Inline YAML refs string.
Json(Value)
Inline JSON map of reference objects.
Implementations§
Source§impl RefsInput
impl RefsInput
Sourcepub fn resolve_local(&self) -> Result<Bibliography, FormatDocumentError>
pub fn resolve_local(&self) -> Result<Bibliography, FormatDocumentError>
Resolve refs input locally from Path, Yaml, or Json variants.
§Errors
Returns error for refs input filesystem or parse failures.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RefsInput
impl<'de> Deserialize<'de> for RefsInput
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RefsInput
impl RefUnwindSafe for RefsInput
impl Send for RefsInput
impl Sync for RefsInput
impl Unpin for RefsInput
impl UnsafeUnpin for RefsInput
impl UnwindSafe for RefsInput
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
Mutably borrows from an owned value. Read more