pub struct RibCompilerConfig { /* 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 calledglobal_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 pathrequest.path.*can be enforced to always be of typestring. Note that not all global variables require a type specification.
Implementations§
Source§impl RibCompilerConfig
impl RibCompilerConfig
pub fn new( component_dependencies: Vec<ComponentDependency>, input_spec: Vec<GlobalVariableTypeSpec>, custom_instance_spec: Vec<CustomInstanceSpec>, ) -> RibCompilerConfig
Trait Implementations§
Source§impl Default for RibCompilerConfig
impl Default for RibCompilerConfig
Source§fn default() -> RibCompilerConfig
fn default() -> RibCompilerConfig
Auto Trait Implementations§
impl Freeze for RibCompilerConfig
impl RefUnwindSafe for RibCompilerConfig
impl Send for RibCompilerConfig
impl Sync for RibCompilerConfig
impl Unpin for RibCompilerConfig
impl UnwindSafe for RibCompilerConfig
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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request