pub struct FootprintSpec {
pub selectors: Vec<ResourceSelector>,
}Expand description
The declared footprint of one tool.
Fields§
§selectors: Vec<ResourceSelector>Implementations§
Source§impl FootprintSpec
impl FootprintSpec
Sourcepub fn new(selectors: Vec<ResourceSelector>) -> Self
pub fn new(selectors: Vec<ResourceSelector>) -> Self
A spec containing exactly the given selectors.
Sourcepub fn validate(&self, schema: &Value, mutates: bool) -> Result<()>
pub fn validate(&self, schema: &Value, mutates: bool) -> Result<()>
Validate the spec against the tool’s argument schema (catalog-assembly time, Gate P).
Every field-referencing selector must name a property the schema declares, and a mutating tool must declare at least one selector.
Sourcepub fn resolve(&self, arguments: &Value, provider: &str) -> Footprint
pub fn resolve(&self, arguments: &Value, provider: &str) -> Footprint
Resolve into a concrete Footprint from schema-validated,
canonicalized arguments.
writes(e) ⊆ reads(e) holds by construction: every written resource
is also read. A field-referencing selector whose argument is absent
resolves to nothing (the argument was optional and unused); an
argument that is present but not a string fails closed to opaque.
Trait Implementations§
Source§impl Clone for FootprintSpec
impl Clone for FootprintSpec
Source§fn clone(&self) -> FootprintSpec
fn clone(&self) -> FootprintSpec
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 FootprintSpec
impl Debug for FootprintSpec
Source§impl Default for FootprintSpec
impl Default for FootprintSpec
Source§fn default() -> FootprintSpec
fn default() -> FootprintSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FootprintSpec
impl<'de> Deserialize<'de> for FootprintSpec
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 PartialEq for FootprintSpec
impl PartialEq for FootprintSpec
Source§fn eq(&self, other: &FootprintSpec) -> bool
fn eq(&self, other: &FootprintSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FootprintSpec
impl Serialize for FootprintSpec
impl Eq for FootprintSpec
impl StructuralPartialEq for FootprintSpec
Auto Trait Implementations§
impl Freeze for FootprintSpec
impl RefUnwindSafe for FootprintSpec
impl Send for FootprintSpec
impl Sync for FootprintSpec
impl Unpin for FootprintSpec
impl UnsafeUnpin for FootprintSpec
impl UnwindSafe for FootprintSpec
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.