pub struct InstanceContext<'a> {
pub name: &'a str,
pub id: &'a str,
pub resource_namespace: &'a str,
pub checkpoints: &'a [Checkpoint],
pub routed_origins: Option<&'a BTreeMap<String, String>>,
}Expand description
Identity and recorded handles for one instance. Names are user-facing; resource namespaces belong to one birth and survive retries.
Fields§
§name: &'a str§id: &'a str§resource_namespace: &'a str§checkpoints: &'a [Checkpoint]§routed_origins: Option<&'a BTreeMap<String, String>>Cross-provider URLs supplied by the routing adapter. Missing outputs stay missing.
Implementations§
Source§impl<'a> InstanceContext<'a>
impl<'a> InstanceContext<'a>
pub fn from_record( record: &'a InstanceRecord, checkpoints: &'a [Checkpoint], ) -> Self
pub fn bind_namespace(&self, namespace: &mut Namespace, def: &StackDef)
Sourcepub fn resource_name(&self, logical_name: &str) -> String
pub fn resource_name(&self, logical_name: &str) -> String
Stripe resource name, bounded to 52 bytes for new identities.
Sourcepub fn provider_resource_name(&self, stack: &str, logical_name: &str) -> String
pub fn provider_resource_name(&self, stack: &str, logical_name: &str) -> String
Preserve legacy provider names until those instances are destroyed.
Trait Implementations§
Source§impl<'a> Clone for InstanceContext<'a>
impl<'a> Clone for InstanceContext<'a>
impl<'a> Copy for InstanceContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for InstanceContext<'a>
impl<'a> RefUnwindSafe for InstanceContext<'a>
impl<'a> Send for InstanceContext<'a>
impl<'a> Sync for InstanceContext<'a>
impl<'a> Unpin for InstanceContext<'a>
impl<'a> UnsafeUnpin for InstanceContext<'a>
impl<'a> UnwindSafe for InstanceContext<'a>
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