pub struct DirHandle<T> {
pub dir: String,
pub exclude: Vec<String>,
pub f: T,
}Expand description
let k = HandleDir {
dir: String::from("D:/Rust/arcta/data"),
exclude: vec![String::from("Rtick")],
let x_path = x.split_path();
let y_path = y.split_path();
let pcon = rof::<Pcon>(x_path.0, x_path.1);
let price = pcon.price.clone();
(
pcon.ident(),
pcon.price.t,
vec![price.o, price.h, price.l, price.c, price.v],
price.ct,
).sof(y_path.0, y_path.1);
}
};
k.file_move_change("D:/Rust/arcta/data2");
use std::fs;
DirHandle {
dir: "..".into(),
exclude: vec!["notebook".into(), "target".into(), "axum".into()],
f: |x: &str, y: &str| { fs::copy(x, y); },
}
.file_move_change("../axum/crates");
{
let dir_handle = DirHandle {
dir: String::from("/root/arcta/data/Rtick"),
exclude: vec![],
f: |x: &str, y: &str| {
let x_path = x.split_path();
let y_path = y.split_path();
let price_tick = rof::<PriceTick>(x_path.0, x_path.1);
let price_tick2: PriceTickVersion = price_tick.into();
price_tick2.sof(y_path.0, y_path.1);
}
};
dir_handle.file_move_change("/mnt/d/Rtick");
}Fields§
§dir: String§exclude: Vec<String>§f: TImplementations§
Auto Trait Implementations§
impl<T> Freeze for DirHandle<T>where
T: Freeze,
impl<T> RefUnwindSafe for DirHandle<T>where
T: RefUnwindSafe,
impl<T> Send for DirHandle<T>where
T: Send,
impl<T> Sync for DirHandle<T>where
T: Sync,
impl<T> Unpin for DirHandle<T>where
T: Unpin,
impl<T> UnwindSafe for DirHandle<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BoolToOption for T
impl<T> BoolToOption for T
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
Source§impl<T> GenUniqueId for T
impl<T> GenUniqueId for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more