pub struct Records {
pub max: u64,
pub removed: u64,
pub next_id: RecordId,
pub records: Vec<Record>,
}Expand description
持久化的记录对象
Fields§
§max: u64最大保存个数
removed: u64删除的个数
next_id: RecordId下一个未使用的 id
records: Vec<Record>当前保存的个数
Trait Implementations§
Source§impl CandidType for Records
impl CandidType for Records
Source§impl<'de> Deserialize<'de> for Records
impl<'de> Deserialize<'de> for Records
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Recordable<Record, u8, RecordSearch> for Records
impl Recordable<Record, u8, RecordSearch> for Records
Source§fn record_update(&mut self, record_id: RecordId, done: String)
fn record_update(&mut self, record_id: RecordId, done: String)
更新记录
Source§fn record_find_all(&self) -> &[Record]
fn record_find_all(&self) -> &[Record]
查询所有
Source§fn record_push(
&mut self,
caller: CallerId,
topic: RecordTopic,
content: String,
) -> RecordId
fn record_push( &mut self, caller: CallerId, topic: RecordTopic, content: String, ) -> RecordId
插入记录
Source§fn record_migrate(&mut self, max: u32) -> MigratedRecords<Record>
fn record_migrate(&mut self, max: u32) -> MigratedRecords<Record>
迁移
Source§fn record_find_by_page(
&self,
page: &QueryPage,
max: u32,
search: &Option<Search>,
) -> Result<PageData<&Record>, QueryPageError>
fn record_find_by_page( &self, page: &QueryPage, max: u32, search: &Option<Search>, ) -> Result<PageData<&Record>, QueryPageError>
分页查询
Auto Trait Implementations§
impl Freeze for Records
impl RefUnwindSafe for Records
impl Send for Records
impl Sync for Records
impl Unpin for Records
impl UnsafeUnpin for Records
impl UnwindSafe for Records
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