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§

source§

impl<Id> TarXItem<Id>

source

pub fn new(item_id: ItemId) -> Self

Returns a new TarXItem.

Trait Implementations§

source§

impl<Id> Clone for TarXItem<Id>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Id: Debug> Debug for TarXItem<Id>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Id> Item for TarXItem<Id>
where Id: Send + Sync + 'static,

§

type Data<'exec> = TarXData<'exec, Id>

Data that the item accesses at runtime. Read more
§

type Error = TarXError

Consumer provided error type.
§

type Params<'exec> = TarXParams<Id>

Parameters to use this item. Read more
§

type State = FileMetadatas

Summary of the managed item’s state. Read more
§

type StateDiff = TarXStateDiff

Diff between the current and target States. Read more
source§

fn id(&self) -> &ItemId

Returns the ID of this full spec. Read more
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,

Inserts an instance of each data type in [Resources]. Read more
source§

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,

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,

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,

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,

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,

Returns the representation of a clean State. Read more
source§

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 more
source§

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,

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: 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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Resource for T
where T: Any + Debug + Send + Sync,

§

fn type_id(&self) -> TypeId

§

fn type_name(&self) -> TypeNameLit

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.