Skip to main content

RibCompilerConfig

Struct RibCompilerConfig 

Source
pub struct RibCompilerConfig {
    pub component: ComponentDependency,
    /* private fields */
}
Expand description

Compiler configuration options for Rib.

§Fields

  • component_metadata: Component metadata that describes the worker functions available.

  • global_input_spec: Defines constraints and types for global input variables. By default, Rib allows any identifier (e.g., foo) to be treated as a global variable. A global variable is a variable that is not defined in the Rib script but is expected to be provided by the environment in which the Rib script is executed (e.g., request, env). Hence it is called global_input. This field can restrict global variables to a predefined set. If the field is empty, any identifier can be used as a global variable.

    You can also associate specific types with known global variables using GlobalVariableTypeSpec. For example, the path request.path.* can be enforced to always be of type string. Note that not all global variables require a type specification.

Fields§

§component: ComponentDependency

Implementations§

Trait Implementations§

Source§

impl Default for RibCompilerConfig

Source§

fn default() -> RibCompilerConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.