Struct mostro_core::dispute::Dispute
source · pub struct Dispute {
pub id: Uuid,
pub order_id: Uuid,
pub status: Status,
pub solver_pubkey: Option<String>,
pub created_at: i64,
pub taken_at: i64,
}Expand description
Database representation of a dispute
Fields§
§id: Uuid§order_id: Uuid§status: Status§solver_pubkey: Option<String>§created_at: i64§taken_at: i64Implementations§
Trait Implementations§
source§impl<'e> Crud<'e, &'e Pool<Sqlite>> for Dispute
impl<'e> Crud<'e, &'e Pool<Sqlite>> for Dispute
source§fn insert_binds(
&'e self,
query: QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments>
) -> QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments>
fn insert_binds( &'e self, query: QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments> ) -> QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments>
source§fn update_binds(
&'e self,
query: QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments>
) -> QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments>
fn update_binds( &'e self, query: QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments> ) -> QueryAs<'e, Sqlite, Self, <Sqlite as HasArguments<'e>>::Arguments>
source§fn create(
&'e self,
pool: E
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'e>>
fn create( &'e self, pool: E ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'e>>
Returns a future that resolves to an insert or
sqlx::Error of the
current instance. Read moresource§fn all(
pool: E
) -> TryCollect<Pin<Box<dyn Stream<Item = Result<Self, Error>> + Send + 'e>>, Vec<Self>>
fn all( pool: E ) -> TryCollect<Pin<Box<dyn Stream<Item = Result<Self, Error>> + Send + 'e>>, Vec<Self>>
Queries all records from the table and returns a future that returns
to a try_collect stream, which resolves to a
Vec<Self> or a
sqlx::Error on error. Read moresource§fn by_id(
pool: E,
id: Self::Id
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + 'e>>
fn by_id( pool: E, id: Self::Id ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + 'e>>
Looks up a row by ID and returns a future that resolves an
Option<Self>. Returns None if and a record with the corresponding ID
cannot be found and Some if it exists. Read moresource§impl<'de> Deserialize<'de> for Dispute
impl<'de> Deserialize<'de> for Dispute
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 PartialEq for Dispute
impl PartialEq for Dispute
source§impl Schema for Dispute
impl Schema for Dispute
source§fn table_name() -> &'static str
fn table_name() -> &'static str
Database name of the table. Used by the query generation code and
available for introspection. This is generated by taking the plural
snake_case of the struct’s name. See: Inflector to_table_case. Read more
source§fn select_sql() -> &'static str
fn select_sql() -> &'static str
Returns the SQL string for a SELECT query against the table. Read more
source§fn select_by_id_sql() -> &'static str
fn select_by_id_sql() -> &'static str
Returns the SQL string for a SELECT query against the table with a
WHERE clause for the primary key. Read more
source§fn insert_sql() -> &'static str
fn insert_sql() -> &'static str
Returns the SQL for inserting a new record in to the database. The
#[external_id] attribute may be used to specify IDs are assigned
outside of the database. Read moresource§fn update_by_id_sql() -> &'static str
fn update_by_id_sql() -> &'static str
Returns the SQL for updating an existing record in the database. Read more
source§fn delete_by_id_sql() -> &'static str
fn delete_by_id_sql() -> &'static str
Returns the SQL for deleting an existing record by ID from the database. Read more
impl Eq for Dispute
impl StructuralEq for Dispute
impl StructuralPartialEq for Dispute
Auto Trait Implementations§
impl RefUnwindSafe for Dispute
impl Send for Dispute
impl Sync for Dispute
impl Unpin for Dispute
impl UnwindSafe for Dispute
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.