pub struct FormatCtx {
pub label: String,
pub params: Vec<(String, String)>,
pub node: WireNode,
pub format_options: Option<Value>,
}Expand description
Request payload for LexHandler::on_format.
The handler receives the originating label and params (lifted
from the AST node that the prior on_resolve pass produced this
typed node from), the typed WireNode to serialize, and an
optional format_options object whose shape is namespace-defined.
Fields§
§label: StringFully-qualified label of the schema that owns this format pass,
e.g. "lex.tabular.table".
params: Vec<(String, String)>Originating parameters, in the (key, value) order the host deserialized them. Quoting and escaping decisions are left to the host on emission.
node: WireNodeThe typed wire subtree to serialize back as Lex source.
format_options: Option<Value>Optional, namespace-defined options object. Hosts pass None
when no options are configured; the wire form is
"format_options": null (omitted from the JSON when absent).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FormatCtx
impl<'de> Deserialize<'de> for FormatCtx
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
impl StructuralPartialEq for FormatCtx
Auto Trait Implementations§
impl Freeze for FormatCtx
impl RefUnwindSafe for FormatCtx
impl Send for FormatCtx
impl Sync for FormatCtx
impl Unpin for FormatCtx
impl UnsafeUnpin for FormatCtx
impl UnwindSafe for FormatCtx
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