Struct peace_item_tar_x::TarXItem
source · pub struct TarXItem<Id> { /* private fields */ }
Expand description
Item for extracting a tar file.
The Id
type parameter is needed for each tar extraction params to be a
distinct type.
The following use cases are intended to be supported:
- A pristine directory with only the tar’s contents and nothing else (in progress).
- Extraction of a tar over an existing directory (not yet implemented).
§Type Parameters
Id
: A zero-sized type used to distinguish different tar extraction parameters from each other.
Implementations§
Trait Implementations§
source§impl<Id> Item for TarXItem<Id>
impl<Id> Item for TarXItem<Id>
§type Params<'exec> = TarXParams<Id>
type Params<'exec> = TarXParams<Id>
Parameters to use this item. Read more
§type State = FileMetadatas
type State = FileMetadatas
Summary of the managed item’s state. Read more
§type StateDiff = TarXStateDiff
type StateDiff = TarXStateDiff
source§fn setup<'life0, 'life1, 'async_trait>(
&'life0 self,
_resources: &'life1 mut Resources<Empty>
) -> Pin<Box<dyn Future<Output = Result<(), TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn setup<'life0, 'life1, 'async_trait>(
&'life0 self,
_resources: &'life1 mut Resources<Empty>
) -> Pin<Box<dyn Future<Output = Result<(), TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts an instance of each data type in [
Resources
]. Read moresource§fn try_state_current<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params_partial: &'life1 <Self::Params<'life2> as Params>::Partial,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Option<Self::State>, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn try_state_current<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params_partial: &'life1 <Self::Params<'life2> as Params>::Partial,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Option<Self::State>, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns the current state of the managed item, if possible. Read more
source§fn state_current<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Self::State, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn state_current<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Self::State, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns the current state of the managed item. Read more
source§fn try_state_goal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params_partial: &'life1 <Self::Params<'life2> as Params>::Partial,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Option<Self::State>, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn try_state_goal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params_partial: &'life1 <Self::Params<'life2> as Params>::Partial,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Option<Self::State>, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns the goal state of the managed item, if possible. Read more
source§fn state_goal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Self::State, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn state_goal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: TarXData<'life3, Id>
) -> Pin<Box<dyn Future<Output = Result<Self::State, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns the goal state of the managed item. Read more
source§fn state_diff<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
_params_partial: &'life0 <Self::Params<'life1> as Params>::Partial,
_data: Self::Data<'life2>,
state_current: &'life3 Self::State,
state_goal: &'life4 Self::State
) -> Pin<Box<dyn Future<Output = Result<Self::StateDiff, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn state_diff<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
_params_partial: &'life0 <Self::Params<'life1> as Params>::Partial,
_data: Self::Data<'life2>,
state_current: &'life3 Self::State,
state_goal: &'life4 Self::State
) -> Pin<Box<dyn Future<Output = Result<Self::StateDiff, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Returns the difference between two states. Read more
source§fn state_clean<'life0, 'life1, 'life2, 'async_trait>(
_params_partial: &'life0 <Self::Params<'life1> as Params>::Partial,
_data: Self::Data<'life2>
) -> Pin<Box<dyn Future<Output = Result<Self::State, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn state_clean<'life0, 'life1, 'life2, 'async_trait>(
_params_partial: &'life0 <Self::Params<'life1> as Params>::Partial,
_data: Self::Data<'life2>
) -> Pin<Box<dyn Future<Output = Result<Self::State, TarXError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns the representation of a clean
State
. Read moresource§fn apply_check<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
params: &'life0 Self::Params<'life1>,
data: Self::Data<'life2>,
state_current: &'life3 Self::State,
state_target: &'life4 Self::State,
diff: &'life5 Self::StateDiff
) -> Pin<Box<dyn Future<Output = Result<ApplyCheck, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn apply_check<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
params: &'life0 Self::Params<'life1>,
data: Self::Data<'life2>,
state_current: &'life3 Self::State,
state_target: &'life4 Self::State,
diff: &'life5 Self::StateDiff
) -> Pin<Box<dyn Future<Output = Result<ApplyCheck, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Returns whether
apply
needs to be executed. Read moresource§fn apply_dry<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: Self::Data<'life3>,
state_current: &'life4 Self::State,
state_target: &'life5 Self::State,
diff: &'life6 Self::StateDiff
) -> Pin<Box<dyn Future<Output = Result<Self::State, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn apply_dry<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: Self::Data<'life3>,
state_current: &'life4 Self::State,
state_target: &'life5 Self::State,
diff: &'life6 Self::StateDiff
) -> Pin<Box<dyn Future<Output = Result<Self::State, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Dry-run transform of the current state to the target state. Read more
source§fn apply<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: Self::Data<'life3>,
state_current: &'life4 Self::State,
state_target: &'life5 Self::State,
diff: &'life6 Self::StateDiff
) -> Pin<Box<dyn Future<Output = Result<Self::State, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn apply<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
fn_ctx: FnCtx<'life0>,
params: &'life1 Self::Params<'life2>,
data: Self::Data<'life3>,
state_current: &'life4 Self::State,
state_target: &'life5 Self::State,
diff: &'life6 Self::StateDiff
) -> Pin<Box<dyn Future<Output = Result<Self::State, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Transforms the current state to the target state. Read more
Auto Trait Implementations§
impl<Id> RefUnwindSafe for TarXItem<Id>where
Id: RefUnwindSafe,
impl<Id> Send for TarXItem<Id>where
Id: Send,
impl<Id> Sync for TarXItem<Id>where
Id: Sync,
impl<Id> Unpin for TarXItem<Id>where
Id: Unpin,
impl<Id> UnwindSafe for TarXItem<Id>where
Id: 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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.