pub struct Table<K, T>{
pub data: BTreeMap<K, T>,
}Fields§
§data: BTreeMap<K, T>Implementations§
Source§impl<K, T> Table<K, T>
impl<K, T> Table<K, T>
Sourcepub async fn load_data<F>(
&self,
db_time: &Update,
name: &str,
table: &Table,
conn: &mut MssqlConnection,
f: &F,
) -> Result<(), Error>where
F: Fn(ClosureType),
pub async fn load_data<F>(
&self,
db_time: &Update,
name: &str,
table: &Table,
conn: &mut MssqlConnection,
f: &F,
) -> Result<(), Error>where
F: Fn(ClosureType),
刚启动时,加载所有数据 table: 某个数据库表配置文件 f: 数据处理过程
pub async fn load_next<F>( &self, db_time: &Update, name: &str, table: &Table, conn: &mut MssqlConnection, f: F, ) -> Result<(), Error>
pub fn clear(&mut self)
pub fn add_data(&mut self, data: T)
pub fn add_test<F>(&self, record: T, f: F)
Trait Implementations§
Auto Trait Implementations§
impl<K, T> Freeze for Table<K, T>
impl<K, T> RefUnwindSafe for Table<K, T>where
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<K, T> Send for Table<K, T>where
K: Send,
impl<K, T> Sync for Table<K, T>where
K: Sync,
impl<K, T> Unpin for Table<K, T>
impl<K, T> UnwindSafe for Table<K, T>where
K: RefUnwindSafe,
T: RefUnwindSafe,
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
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