Skip to main content

Arguments

Trait Arguments 

Source
pub trait Arguments: Sized + Sealed {
    const LEN: usize;
}
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.

Required Associated Constants§

Source

const LEN: usize

The number of arguments in the argument tuple.

This constant provides compile-time information about the arity (number of parameters) of a function signature.

§Examples
  • () has LEN = 0
  • (String) has LEN = 1
  • (i64, i64) has LEN = 2

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Arguments for ()

Source§

const LEN: usize = 0

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)

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> 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> 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> 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> Arguments for (A1, A2, A3, A4, A5)

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> Arguments for (A1, A2, A3)

Source§

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

Source§

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

Implementors§