#[non_exhaustive]pub struct NewResource<'a> {
pub run: &'a RunName,
pub key: &'a str,
pub kind: ResourceKind,
pub copy_name: Option<CopyName>,
pub lifetime: Option<Lifetime>,
pub by: OperationId,
pub detail: Option<Value>,
}Expand description
A resource about to be made: written, as creating, before the call that makes it.
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.run: &'a RunNameIts run.
key: &'a strIts key.
kind: ResourceKindWhat it is.
copy_name: Option<CopyName>Its name on the host (provider resources).
lifetime: Option<Lifetime>Its lifetime, for a provider kind (a local kind’s is its own: ResourceKind::lifetime).
by: OperationIdThe operation making it.
detail: Option<Value>What removing it will need besides its id.
Implementations§
Source§impl<'a> NewResource<'a>
impl<'a> NewResource<'a>
Sourcepub fn new(
run: &'a RunName,
key: &'a str,
kind: ResourceKind,
by: OperationId,
) -> NewResource<'a>
pub fn new( run: &'a RunName, key: &'a str, kind: ResourceKind, by: OperationId, ) -> NewResource<'a>
A resource of kind, keyed key, of run, made by by.
Sourcepub fn named(self, name: CopyName) -> NewResource<'a>
pub fn named(self, name: CopyName) -> NewResource<'a>
Named name on the host.
Sourcepub fn living(self, lifetime: Lifetime) -> NewResource<'a>
pub fn living(self, lifetime: Lifetime) -> NewResource<'a>
With lifetime lifetime (a provider kind’s, from its manifest).
Sourcepub fn with_detail(self, detail: Value) -> NewResource<'a>
pub fn with_detail(self, detail: Value) -> NewResource<'a>
With detail.
Trait Implementations§
Source§impl<'a> Clone for NewResource<'a>
impl<'a> Clone for NewResource<'a>
Auto Trait Implementations§
impl<'a> Forget for NewResource<'a>
impl<'a> Freeze for NewResource<'a>
impl<'a> Move for NewResource<'a>
impl<'a> RefUnwindSafe for NewResource<'a>
impl<'a> Send for NewResource<'a>
impl<'a> Sync for NewResource<'a>
impl<'a> Unpin for NewResource<'a>
impl<'a> UnsafeUnpin for NewResource<'a>
impl<'a> UnwindSafe for NewResource<'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