pub enum ProvisionResult<T> {
Created(T),
Updated(T),
Noop(T),
}Expand description
Result of provisioning a resource.
Indicates whether provisioning created, updated, or skipped writing a resource. All variants hold the resource’s current state.
Variants§
Created(T)
Resource was newly created.
Updated(T)
Resource already existed and now matches the requested config.
Noop(T)
Resource already existed and no write was performed.
Implementations§
Source§impl<T> ProvisionResult<T>
impl<T> ProvisionResult<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwrap the inner value regardless of variant.
Sourcepub fn map<U>(self, f: impl FnOnce(T) -> U) -> ProvisionResult<U>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> ProvisionResult<U>
Map the inner value while preserving the provisioning outcome.
Trait Implementations§
Source§impl<T: Clone> Clone for ProvisionResult<T>
impl<T: Clone> Clone for ProvisionResult<T>
Source§fn clone(&self) -> ProvisionResult<T>
fn clone(&self) -> ProvisionResult<T>
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<T: Debug> Debug for ProvisionResult<T>
impl<T: Debug> Debug for ProvisionResult<T>
Source§impl<T: PartialEq> PartialEq for ProvisionResult<T>
impl<T: PartialEq> PartialEq for ProvisionResult<T>
Source§fn eq(&self, other: &ProvisionResult<T>) -> bool
fn eq(&self, other: &ProvisionResult<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: Eq> Eq for ProvisionResult<T>
impl<T> StructuralPartialEq for ProvisionResult<T>
Auto Trait Implementations§
impl<T> Freeze for ProvisionResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for ProvisionResult<T>where
T: RefUnwindSafe,
impl<T> Send for ProvisionResult<T>where
T: Send,
impl<T> Sync for ProvisionResult<T>where
T: Sync,
impl<T> Unpin for ProvisionResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for ProvisionResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ProvisionResult<T>where
T: UnwindSafe,
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