pub struct Table {
pub id: Uuid,
pub status: TableStatus,
}
Fields§
§id: Uuid
§status: TableStatus
Implementations§
Source§impl Table
impl Table
pub async fn list() -> Result<Vec<Self>, Error>
async fn locked_load(id: Uuid) -> Result<Option<Self>, Error>
pub async fn load(id: Uuid) -> Result<Option<Self>, Error>
async fn locked_save(&self) -> Result<(), Error>
pub async fn prepare( id: Uuid, requested: u64, ) -> Result<Option<NonZeroU64>, Error>
pub async fn commit(id: Uuid, data: TableData) -> Result<(), Error>
pub async fn delete_if_prepared(id: Uuid) -> Result<Table, Error>
pub async fn delete(id: Uuid) -> Result<(), Error>
pub async fn save(&self) -> Result<(), Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Table
impl<'de> Deserialize<'de> for Table
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
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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