pub struct TypesConfiguration { /* private fields */ }Expand description
A Wick types configuration.
A types configuration is a collection of shareable types and operation signatures used to generated code for components and other types.
Implementations§
Source§impl TypesConfiguration
impl TypesConfiguration
pub fn name(&self) -> Option<&String>
pub fn set_name<T: Into<Option<String>>>(&mut self, val: T) -> &mut Self
pub fn name_mut(&mut self) -> &mut Option<String>
pub fn metadata(&self) -> Option<&Metadata>
pub fn set_metadata<T: Into<Option<Metadata>>>(&mut self, val: T) -> &mut Self
pub fn metadata_mut(&mut self) -> &mut Option<Metadata>
pub fn types(&self) -> &[TypeDefinition]
pub fn set_types<T: Into<TypeDefinition>>( &mut self, val: impl IntoIterator<Item = T>, ) -> &mut Self
pub fn types_mut(&mut self) -> &mut Vec<TypeDefinition>
pub fn package(&self) -> Option<&PackageConfig>
pub fn set_package<T: Into<Option<PackageConfig>>>( &mut self, val: T, ) -> &mut Self
pub fn package_mut(&mut self) -> &mut Option<PackageConfig>
Source§impl TypesConfiguration
impl TypesConfiguration
Sourcepub fn get_type(&self, name: &str) -> Option<&TypeDefinition>
pub fn get_type(&self, name: &str) -> Option<&TypeDefinition>
Get a type by name
Sourcepub fn package_files(&self) -> Option<Assets<'_, AssetReference>>
pub fn package_files(&self) -> Option<Assets<'_, AssetReference>>
Get the package files
Sourcepub fn set_source(&mut self, source: &Path)
pub fn set_source(&mut self, source: &Path)
Set the source location of the configuration.
Sourcepub const fn env(&self) -> Option<&HashMap<String, String>>
pub const fn env(&self) -> Option<&HashMap<String, String>>
Return the environment variables for this configuration.
Sourcepub fn validate(&self) -> Result<(), ManifestError>
pub fn validate(&self) -> Result<(), ManifestError>
Validate this configuration is good.
Trait Implementations§
Source§impl AssetManager for TypesConfiguration
impl AssetManager for TypesConfiguration
type Asset = AssetReference
fn set_baseurl(&self, baseurl: &Path)
fn assets(&self) -> Assets<'_, AssetReference>
fn get_asset_flags(&self) -> u32
Source§impl Clone for TypesConfiguration
impl Clone for TypesConfiguration
Source§fn clone(&self) -> TypesConfiguration
fn clone(&self) -> TypesConfiguration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComponentConfig for TypesConfiguration
impl ComponentConfig for TypesConfiguration
type Operation = OperationDefinition
Source§fn operations(&self) -> &[Self::Operation]
fn operations(&self) -> &[Self::Operation]
Get the operations defined by this configuration.
Source§fn operations_mut(&mut self) -> &mut Vec<Self::Operation>
fn operations_mut(&mut self) -> &mut Vec<Self::Operation>
Get the operations defined by this configuration.
Source§impl Debug for TypesConfiguration
impl Debug for TypesConfiguration
Source§impl OperationSignatures for TypesConfiguration
impl OperationSignatures for TypesConfiguration
Source§fn operation_signatures(&self) -> Vec<OperationSignature>
fn operation_signatures(&self) -> Vec<OperationSignature>
Get a list of operations hosted by the implementer.
Source§fn get_operation_signature(&self, name: &str) -> Option<OperationSignature>
fn get_operation_signature(&self, name: &str) -> Option<OperationSignature>
Get an operation signature by name.
Source§impl Serialize for TypesConfiguration
impl Serialize for TypesConfiguration
Source§impl TryFrom<TypesConfiguration> for TypesConfiguration
impl TryFrom<TypesConfiguration> for TypesConfiguration
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<TypesConfiguration> for TypesConfiguration
impl TryFrom<TypesConfiguration> for TypesConfiguration
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for TypesConfiguration
impl !RefUnwindSafe for TypesConfiguration
impl Send for TypesConfiguration
impl Sync for TypesConfiguration
impl Unpin for TypesConfiguration
impl !UnwindSafe for TypesConfiguration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>
Converts
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>
Converts
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 more