[][src]Struct cpt::model::Cpt

pub struct Cpt<K = String, V = StringOrVecString, S = RandomState> where
    K: Hash + Eq + DeserializeOwned + Serialize + Debug,
    V: Hash + Eq + DeserializeOwned + Serialize + Debug + Into<StringOrVecString>,
    S: BuildHasher + Default
{ pub from: String, pub to: String, pub data: Option<Box<HashMap<K, V, S>>>, pub dry: bool, pub force: bool, }

Fields

from: Stringto: Stringdata: Option<Box<HashMap<K, V, S>>>dry: boolforce: bool

Methods

impl<K, V, S> Cpt<K, V, S> where
    K: Hash + Eq + DeserializeOwned + Serialize + Debug,
    V: Hash + Eq + DeserializeOwned + Serialize + Debug + Into<StringOrVecString>,
    S: BuildHasher + Default + Debug
[src]

pub fn new(from: String, to: String) -> Self[src]

pub fn dry(self) -> Self[src]

pub fn force(self) -> Self[src]

pub fn set_dry(self, dry: bool) -> Self[src]

pub fn set_force(self, force: bool) -> Self[src]

pub fn set_data(self, data: HashMap<K, V, S>) -> Self[src]

pub fn try_data(self, data: Option<Box<HashMap<K, V, S>>>) -> Self[src]

pub fn execute(self) -> Result<(), Box<dyn Error>>[src]

Trait Implementations

impl<K, V, S> FromArgs for Cpt<K, V, S> where
    K: Hash + Eq + DeserializeOwned + Serialize + Debug,
    V: Hash + Eq + DeserializeOwned + Serialize + Debug + Into<StringOrVecString>,
    S: BuildHasher + Default + Debug
[src]

impl<K, V, S> Default for Cpt<K, V, S> where
    K: Hash + Eq + DeserializeOwned + Serialize + Debug,
    V: Hash + Eq + DeserializeOwned + Serialize + Debug + Into<StringOrVecString>,
    S: BuildHasher + Default
[src]

impl<K: Debug, V: Debug, S: Debug> Debug for Cpt<K, V, S> where
    K: Hash + Eq + DeserializeOwned + Serialize + Debug,
    V: Hash + Eq + DeserializeOwned + Serialize + Debug + Into<StringOrVecString>,
    S: BuildHasher + Default
[src]

Auto Trait Implementations

impl<K, V, S> Send for Cpt<K, V, S> where
    K: Send,
    S: Send,
    V: Send

impl<K, V, S> Sync for Cpt<K, V, S> where
    K: Sync,
    S: Sync,
    V: Sync

impl<K, V, S> Unpin for Cpt<K, V, S>

impl<K, V, S> UnwindSafe for Cpt<K, V, S> where
    K: UnwindSafe,
    S: UnwindSafe,
    V: UnwindSafe

impl<K, V, S> RefUnwindSafe for Cpt<K, V, S> where
    K: RefUnwindSafe,
    S: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]