pub struct ResourceCatalog { /* private fields */ }Implementations§
Source§impl ResourceCatalog
impl ResourceCatalog
pub fn new() -> ResourceCatalog
pub fn tool_default( operations: impl IntoIterator<Item = impl Into<String>>, ) -> ResourceCatalog
pub fn add_module_instance( &mut self, module_path: impl IntoIterator<Item = impl Into<String>>, resource_type: impl Into<String>, ) -> Result<(), ResourceCatalogError>
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<(), ResourceCatalogError>
pub fn add_trigger_source_constructor( &mut self, path: impl IntoIterator<Item = impl Into<String>>, input_ty: TypeExpr, event_ty: NamedDataType, ) -> Result<(), ResourceCatalogError>
pub fn extend(&mut self, other: ResourceCatalog)
pub fn try_extend( &mut self, other: ResourceCatalog, ) -> Result<(), ResourceCatalogError>
pub fn union(self, other: ResourceCatalog) -> ResourceCatalog
pub fn satisfies(&self, required: &ResourceCatalog) -> 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_value_as<T>(
&self,
source_type: &str,
value: Value,
) -> Result<T, HostValueError>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 ResourceCatalog
impl Clone for ResourceCatalog
Source§fn clone(&self) -> ResourceCatalog
fn clone(&self) -> ResourceCatalog
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 ResourceCatalog
impl Debug for ResourceCatalog
Source§impl Default for ResourceCatalog
impl Default for ResourceCatalog
Source§fn default() -> ResourceCatalog
fn default() -> ResourceCatalog
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ResourceCatalog
impl<'de> Deserialize<'de> for ResourceCatalog
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceCatalog, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceCatalog, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ResourceCatalog
Source§impl PartialEq for ResourceCatalog
impl PartialEq for ResourceCatalog
Source§fn eq(&self, other: &ResourceCatalog) -> bool
fn eq(&self, other: &ResourceCatalog) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResourceCatalog
impl Serialize for ResourceCatalog
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 ResourceCatalog
Auto Trait Implementations§
impl Freeze for ResourceCatalog
impl RefUnwindSafe for ResourceCatalog
impl Send for ResourceCatalog
impl Sync for ResourceCatalog
impl Unpin for ResourceCatalog
impl UnsafeUnpin for ResourceCatalog
impl UnwindSafe for ResourceCatalog
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