pub enum ActionHandler {
Literal(String),
Binding(DataRef),
}Expand description
Handler reference for an Action.
Accepts a literal string (handler name like "users.store" or absolute
path like "/users") or a {"$data": "/path"} binding resolved against
spec.data at render time. The untagged enum keeps the wire format
backward-compatible — existing literal handlers parse via Literal.
Variants§
Literal(String)
Handler name or literal URL. "users.store" is looked up via the
resolver; "/users" is passed through as the resolved URL.
Binding(DataRef)
{"$data": "/path"} binding. Resolved against spec.data in
resolve_actions. The resolved string is then treated as a literal
handler (resolver lookup or pass-through for /path URLs).
Implementations§
Source§impl ActionHandler
impl ActionHandler
Sourcepub fn as_literal(&self) -> Option<&str>
pub fn as_literal(&self) -> Option<&str>
Return the literal string when this handler is unbound.
Returns None for Binding — callers that need the literal must
either run crate::resolve::resolve_actions first or branch on
the variant explicitly.
Trait Implementations§
Source§impl Clone for ActionHandler
impl Clone for ActionHandler
Source§fn clone(&self) -> ActionHandler
fn clone(&self) -> ActionHandler
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionHandler
impl Debug for ActionHandler
Source§impl Default for ActionHandler
impl Default for ActionHandler
Source§impl<'de> Deserialize<'de> for ActionHandler
impl<'de> Deserialize<'de> for ActionHandler
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>,
Source§impl Display for ActionHandler
impl Display for ActionHandler
Source§impl From<&str> for ActionHandler
impl From<&str> for ActionHandler
Source§impl From<String> for ActionHandler
impl From<String> for ActionHandler
Source§impl JsonSchema for ActionHandler
impl JsonSchema for ActionHandler
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ActionHandler
impl PartialEq for ActionHandler
Source§fn eq(&self, other: &ActionHandler) -> bool
fn eq(&self, other: &ActionHandler) -> bool
self and other values to be equal, and is used by ==.