pub struct PackageDefinition {
pub meta: Header,
pub api_version: String,
pub imports: Vec<PackageImport>,
pub types: Vec<MetadataType>,
pub states: Vec<StateTyped>,
pub functions: Vec<(StepInvocation, OperatorType)>,
pub dev: Option<DevConfig>,
}Fields§
§meta: Header§api_version: String§imports: Vec<PackageImport>§types: Vec<MetadataType>§states: Vec<StateTyped>§functions: Vec<(StepInvocation, OperatorType)>§dev: Option<DevConfig>Implementations§
Source§impl PackageDefinition
impl PackageDefinition
pub fn name(&self) -> &str
pub fn api_version(&self) -> Result<ApiVersion>
pub fn has_custom_types(&self) -> bool
pub fn namespace(&self) -> &str
pub fn resolve_imports( &mut self, packages: Vec<PackageDefinition>, debug: bool, ) -> Result<()>
pub fn merge_dependencies( &mut self, package_configs: &[PackageDefinition], ) -> Result<()>
pub fn resolve_function_states(&mut self) -> Result<()>
pub fn get_function( &self, name: &str, ) -> Option<&(StepInvocation, OperatorType)>
pub fn types_map(&self) -> SdfTypesMap
pub fn validate(&self) -> Result<(), PackageDefinitionValidationFailure>
pub fn types_wit_package(&self) -> Result<Package>
Trait Implementations§
Source§impl Clone for PackageDefinition
impl Clone for PackageDefinition
Source§fn clone(&self) -> PackageDefinition
fn clone(&self) -> PackageDefinition
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 Debug for PackageDefinition
impl Debug for PackageDefinition
Source§impl<'de> Deserialize<'de> for PackageDefinition
impl<'de> Deserialize<'de> for PackageDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for PackageDefinition
impl Hash for PackageDefinition
Source§impl PartialEq for PackageDefinition
impl PartialEq for PackageDefinition
Source§impl Serialize for PackageDefinition
impl Serialize for PackageDefinition
impl ComponentType for PackageDefinition
impl Eq for PackageDefinition
impl Lift for PackageDefinition
impl Lower for PackageDefinition
impl StructuralPartialEq for PackageDefinition
Auto Trait Implementations§
impl Freeze for PackageDefinition
impl RefUnwindSafe for PackageDefinition
impl Send for PackageDefinition
impl Sync for PackageDefinition
impl Unpin for PackageDefinition
impl UnwindSafe for PackageDefinition
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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