pub struct FigBackend { /* private fields */ }Expand description
A Backend over a standalone config file, backed by fig::Editor.
Implementations§
Source§impl FigBackend
impl FigBackend
Trait Implementations§
Source§impl Backend for FigBackend
impl Backend for FigBackend
Source§fn apply(&mut self, op: EditOp) -> Result<(), BackendError>
fn apply(&mut self, op: EditOp) -> Result<(), BackendError>
Apply one edit. Atomic: on
Err, the document is unchanged.Source§fn to_value(&self) -> Result<Value, BackendError>
fn to_value(&self) -> Result<Value, BackendError>
The current value tree to render (for an embed backend, the metadata
region — not the whole host file).
Source§fn source(&self) -> Result<String, BackendError>
fn source(&self) -> Result<String, BackendError>
The canonical serialized form the embedder persists on save (for an embed
backend, the full rendered host file).
Source§fn schema(&self) -> Option<Schema>
fn schema(&self) -> Option<Schema>
The schema governing this document, if the backend knows one. The backend
is exactly the component that knows where the document came from, so it is
the right place to know what governs it — a prov backend returns the schema
resolved from the workspace config; a standalone config file has none.
Defaulted to
None so existing backends are unaffected.Auto Trait Implementations§
impl !Send for FigBackend
impl !Sync for FigBackend
impl Freeze for FigBackend
impl RefUnwindSafe for FigBackend
impl Unpin for FigBackend
impl UnsafeUnpin for FigBackend
impl UnwindSafe for FigBackend
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