#[non_exhaustive]pub struct TransformerDescriptor {
pub sdk_version: String,
pub name: String,
pub match_types: Vec<String>,
pub match_tags: Vec<String>,
pub match_actions: Vec<String>,
pub scope: TransformScope,
pub suggested_phase: String,
pub match_artifacts: Vec<ArtifactFormat>,
pub node_shape: NodeShapeFilter,
}Expand description
Static metadata for a transformer plugin.
Dispatch uses AND-of-ORs: all non-empty fields must pass (AND), and within each list field any single value satisfying it is enough (OR). Empty/default fields are unconstrained. A descriptor with every field empty/default matches nothing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sdk_version: String§name: String§match_types: Vec<String>§match_actions: Vec<String>§scope: TransformScope§suggested_phase: String§match_artifacts: Vec<ArtifactFormat>Artifact formats the node must have (any one suffices). Empty means no artifact filter.
node_shape: NodeShapeFilterDispatch filter on node shape. Container matches only nodes
with children; Leaf matches only childless nodes; Any (the
default) is unconstrained.
Implementations§
Source§impl TransformerDescriptor
impl TransformerDescriptor
pub fn new(name: impl Into<String>) -> Self
pub fn with_match_types(self, types: Vec<String>) -> Self
pub fn with_match_actions(self, actions: Vec<String>) -> Self
pub fn with_scope(self, scope: TransformScope) -> Self
pub fn with_match_artifacts(self, formats: Vec<ArtifactFormat>) -> Self
pub fn with_node_shape(self, shape: NodeShapeFilter) -> Self
Trait Implementations§
Source§impl Clone for TransformerDescriptor
impl Clone for TransformerDescriptor
Source§fn clone(&self) -> TransformerDescriptor
fn clone(&self) -> TransformerDescriptor
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 TransformerDescriptor
impl Debug for TransformerDescriptor
Source§impl<'de> Deserialize<'de> for TransformerDescriptor
impl<'de> Deserialize<'de> for TransformerDescriptor
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
Auto Trait Implementations§
impl Freeze for TransformerDescriptor
impl RefUnwindSafe for TransformerDescriptor
impl Send for TransformerDescriptor
impl Sync for TransformerDescriptor
impl Unpin for TransformerDescriptor
impl UnsafeUnpin for TransformerDescriptor
impl UnwindSafe for TransformerDescriptor
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