pub struct LashlangHostCatalog { /* private fields */ }Implementations§
Source§impl LashlangHostCatalog
impl LashlangHostCatalog
pub fn new() -> LashlangHostCatalog
pub fn tool_default( operations: impl IntoIterator<Item = impl Into<String>>, ) -> LashlangHostCatalog
pub fn add_module_instance( &mut self, module_path: impl IntoIterator<Item = impl Into<String>>, resource_type: impl Into<String>, ) -> Result<(), LashlangHostCatalogError>
pub fn ensure_resource_type(&mut self, resource_type: impl Into<String>)
pub fn add_operation( &mut self, resource_type: impl Into<String>, operation: impl Into<String>, input_ty: TypeExpr, output_ty: TypeExpr, )
pub fn add_module_operation( &mut self, module_path: impl IntoIterator<Item = impl Into<String>>, resource_type: impl Into<String>, operation: impl Into<String>, host_operation: impl Into<String>, input_ty: TypeExpr, output_ty: TypeExpr, )
pub fn add_value_constructor( &mut self, path: impl IntoIterator<Item = impl Into<String>>, input_ty: TypeExpr, output_ty: TypeExpr, )
pub fn add_named_data_type( &mut self, data_type: NamedDataType, ) -> Result<(), LashlangHostCatalogError>
pub fn add_trigger_source_constructor( &mut self, path: impl IntoIterator<Item = impl Into<String>>, input_ty: TypeExpr, event_ty: NamedDataType, ) -> Result<(), LashlangHostCatalogError>
pub fn extend(&mut self, other: LashlangHostCatalog)
pub fn try_extend( &mut self, other: LashlangHostCatalog, ) -> Result<(), LashlangHostCatalogError>
pub fn union(self, other: LashlangHostCatalog) -> LashlangHostCatalog
pub fn satisfies(&self, required: &LashlangHostCatalog) -> bool
pub fn has_resource_type(&self, resource_type: &str) -> bool
pub fn has_named_data_type(&self, name: &str) -> bool
pub fn is_known_opaque_value_type(&self, name: &str) -> bool
pub fn decode_host_descriptor_as<T>(
&self,
source_type: &str,
value: Value,
) -> Result<T, HostDescriptorError>where
T: DeserializeOwned,
pub fn module_instances( &self, ) -> impl Iterator<Item = (&str, &ModuleInstanceCatalog)>
pub fn resource_types( &self, ) -> impl Iterator<Item = (&str, &ResourceTypeCatalog)>
pub fn named_data_types(&self) -> impl Iterator<Item = (&str, &NamedDataType)>
pub fn value_constructors( &self, ) -> impl Iterator<Item = (&str, &ValueConstructorBinding)>
pub fn trigger_sources( &self, ) -> impl Iterator<Item = (&str, &TriggerSourceBinding)>
pub fn resolve_named_data_type(&self, name: &str) -> Option<&NamedDataType>
pub fn resolve_trigger_source( &self, source_ty: &str, ) -> Option<&TriggerSourceBinding>
pub fn resolve_module_path( &self, path: &[impl AsRef<str>], ) -> Option<ResourceRefExpr>
pub fn resolve_alias( &self, resource: &ResourceRefExpr, ) -> Option<&ResourceTypeCatalog>
pub fn resolve_operation( &self, resource_type: &str, operation: &str, ) -> Option<&ResourceOperationBinding>
pub fn has_operations(&self) -> bool
pub fn resolve_module_operation( &self, resource_type: &str, alias: &str, operation: &str, ) -> Option<&ModuleOperationBinding>
pub fn resolve_value_constructor( &self, path: &[impl AsRef<str>], ) -> Option<&ValueConstructorBinding>
pub fn trigger_source_event(&self, source_ty: &TypeExpr) -> Option<TypeExpr>
pub fn operation_suggestions_for_host( &self, host_operation: &str, ) -> Vec<String>
pub fn operation_suggestions_for_prefix( &self, prefix: &[impl AsRef<str>], operation: &str, ) -> Vec<String>
Trait Implementations§
Source§impl Clone for LashlangHostCatalog
impl Clone for LashlangHostCatalog
Source§fn clone(&self) -> LashlangHostCatalog
fn clone(&self) -> LashlangHostCatalog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LashlangHostCatalog
impl Debug for LashlangHostCatalog
Source§impl Default for LashlangHostCatalog
impl Default for LashlangHostCatalog
Source§fn default() -> LashlangHostCatalog
fn default() -> LashlangHostCatalog
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LashlangHostCatalog
impl<'de> Deserialize<'de> for LashlangHostCatalog
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LashlangHostCatalog, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LashlangHostCatalog, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LashlangHostCatalog
Source§impl PartialEq for LashlangHostCatalog
impl PartialEq for LashlangHostCatalog
Source§fn eq(&self, other: &LashlangHostCatalog) -> bool
fn eq(&self, other: &LashlangHostCatalog) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LashlangHostCatalog
impl Serialize for LashlangHostCatalog
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LashlangHostCatalog
Auto Trait Implementations§
impl Freeze for LashlangHostCatalog
impl RefUnwindSafe for LashlangHostCatalog
impl Send for LashlangHostCatalog
impl Sync for LashlangHostCatalog
impl Unpin for LashlangHostCatalog
impl UnsafeUnpin for LashlangHostCatalog
impl UnwindSafe for LashlangHostCatalog
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
Mutably borrows from an owned value. Read more