Trait Arguments

Source
pub trait Arguments: Sized + Sealed { }
Expand description

Marker trait for function argument tuples.

This trait is automatically implemented for tuples of types that implement FromValue and TypedValue. It serves as a constraint to ensure type safety in function registration.

The trait supports function signatures with 0 to 10 parameters. Each parameter type must be convertible from CEL values and have a known CEL type.

§Implementation Details

This trait is sealed and cannot be implemented outside this crate. It is automatically implemented for valid argument tuple types through procedural macros.

§Supported Argument Types

Any type that implements both FromValue and TypedValue can be used as a function argument. This includes:

  • Primitive types: bool, i64, u64, f64, String, Vec<u8>
  • Reference types: &str, &[u8] (with proper lifetime handling)
  • Collection types: Vec<T>, HashMap<K, V> where T, K, V are valid CEL types
  • Custom types: Types that implement the required traits

§Note

This trait is sealed and cannot be implemented outside this crate. It supports function signatures with 0 to 10 parameters.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Arguments for ()

Source§

impl<A1: FromValue + TypedValue> Arguments for (A1,)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue> Arguments for (A1, A2)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue> Arguments for (A1, A2, A3)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue> Arguments for (A1, A2, A3, A4)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue, A5: FromValue + TypedValue> Arguments for (A1, A2, A3, A4, A5)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue, A5: FromValue + TypedValue, A6: FromValue + TypedValue> Arguments for (A1, A2, A3, A4, A5, A6)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue, A5: FromValue + TypedValue, A6: FromValue + TypedValue, A7: FromValue + TypedValue> Arguments for (A1, A2, A3, A4, A5, A6, A7)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue, A5: FromValue + TypedValue, A6: FromValue + TypedValue, A7: FromValue + TypedValue, A8: FromValue + TypedValue> Arguments for (A1, A2, A3, A4, A5, A6, A7, A8)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue, A5: FromValue + TypedValue, A6: FromValue + TypedValue, A7: FromValue + TypedValue, A8: FromValue + TypedValue, A9: FromValue + TypedValue> Arguments for (A1, A2, A3, A4, A5, A6, A7, A8, A9)

Source§

impl<A1: FromValue + TypedValue, A2: FromValue + TypedValue, A3: FromValue + TypedValue, A4: FromValue + TypedValue, A5: FromValue + TypedValue, A6: FromValue + TypedValue, A7: FromValue + TypedValue, A8: FromValue + TypedValue, A9: FromValue + TypedValue, A10: FromValue + TypedValue> Arguments for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)

Implementors§