Struct moonramp_entity::wallet::ActiveModel
source · [−]pub struct ActiveModel {
pub hash: ActiveValue<Hash>,
pub merchant_hash: ActiveValue<Hash>,
pub pubkey: ActiveValue<String>,
pub ticker: ActiveValue<Ticker>,
pub network: ActiveValue<Network>,
pub wallet_type: ActiveValue<WalletType>,
pub cipher: ActiveValue<Cipher>,
pub encryption_key_hash: ActiveValue<Hash>,
pub blob: ActiveValue<Vec<u8>>,
pub nonce: ActiveValue<Vec<u8>>,
pub created_at: ActiveValue<DateTime<Utc>>,
}Fields
hash: ActiveValue<Hash>merchant_hash: ActiveValue<Hash>pubkey: ActiveValue<String>ticker: ActiveValue<Ticker>network: ActiveValue<Network>wallet_type: ActiveValue<WalletType>cipher: ActiveValue<Cipher>encryption_key_hash: ActiveValue<Hash>blob: ActiveValue<Vec<u8>>nonce: ActiveValue<Vec<u8>>created_at: ActiveValue<DateTime<Utc>>Trait Implementations
sourceimpl ActiveModelBehavior for ActiveModel
impl ActiveModelBehavior for ActiveModel
fn new() -> Self
fn new() -> Self
Create a new ActiveModel with default values. Also used by Default::default().
fn before_save(self, insert: bool) -> Result<Self, DbErr>
fn before_save(self, insert: bool) -> Result<Self, DbErr>
Will be called before saving
fn after_save(
model: <Self::Entity as EntityTrait>::Model,
insert: bool
) -> Result<<Self::Entity as EntityTrait>::Model, DbErr>
fn after_save(
model: <Self::Entity as EntityTrait>::Model,
insert: bool
) -> Result<<Self::Entity as EntityTrait>::Model, DbErr>
Will be called after saving
fn before_delete(self) -> Result<Self, DbErr>
fn before_delete(self) -> Result<Self, DbErr>
Will be called before deleting
fn after_delete(self) -> Result<Self, DbErr>
fn after_delete(self) -> Result<Self, DbErr>
Will be called after deleting
sourceimpl ActiveModelTrait for ActiveModel
impl ActiveModelTrait for ActiveModel
sourcefn take(
&mut self,
c: <Self::Entity as EntityTrait>::Column
) -> ActiveValue<Value>
fn take(
&mut self,
c: <Self::Entity as EntityTrait>::Column
) -> ActiveValue<Value>
Get a mutable [ActiveValue] from an ActiveModel
sourcefn get(&self, c: <Self::Entity as EntityTrait>::Column) -> ActiveValue<Value>
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> ActiveValue<Value>
Get a immutable [ActiveValue] from an ActiveModel
sourcefn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
Set the Value into an ActiveModel
sourcefn not_set(&mut self, c: <Self::Entity as EntityTrait>::Column)
fn not_set(&mut self, c: <Self::Entity as EntityTrait>::Column)
Set the state of an [ActiveValue] to the not set state
sourcefn is_not_set(&self, c: <Self::Entity as EntityTrait>::Column) -> bool
fn is_not_set(&self, c: <Self::Entity as EntityTrait>::Column) -> bool
Check the state of a [ActiveValue]
fn get_primary_key_value(&self) -> Option<ValueTuple>
fn get_primary_key_value(&self) -> Option<ValueTuple>
Get the primary key of the ActiveModel
fn insert<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<<Self::Entity as EntityTrait>::Model, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
fn insert<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<<Self::Entity as EntityTrait>::Model, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
Perform an INSERT operation on the ActiveModel Read more
fn update<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<<Self::Entity as EntityTrait>::Model, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
fn update<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<<Self::Entity as EntityTrait>::Model, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
Perform the UPDATE operation on an ActiveModel Read more
fn save<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<Self, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
fn save<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<Self, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
Insert the model if primary key is NotSet, update otherwise.
Only works if the entity has auto increment primary key. Read more
fn delete<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
fn delete<'a, 'async_trait, C>(
self,
db: &'a C
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
Self: 'a + ActiveModelBehavior + 'async_trait + Send,
C: ConnectionTrait + 'async_trait,
Delete an active model by its primary key Read more
fn set_from_json(&mut self, json: Value) -> Result<(), DbErr> where
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
<Self::Entity as EntityTrait>::Model: for<'de> Deserialize<'de>,
fn set_from_json(&mut self, json: Value) -> Result<(), DbErr> where
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
<Self::Entity as EntityTrait>::Model: for<'de> Deserialize<'de>,
Set the corresponding attributes in the ActiveModel from a JSON value Read more
fn from_json(json: Value) -> Result<Self, DbErr> where
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
<Self::Entity as EntityTrait>::Model: for<'de> Deserialize<'de>,
fn from_json(json: Value) -> Result<Self, DbErr> where
<Self::Entity as EntityTrait>::Model: IntoActiveModel<Self>,
<Self::Entity as EntityTrait>::Model: for<'de> Deserialize<'de>,
Create ActiveModel from a JSON value
fn is_changed(&self) -> bool
fn is_changed(&self) -> bool
Returns true if any columns were changed.
sourceimpl Clone for ActiveModel
impl Clone for ActiveModel
sourcefn clone(&self) -> ActiveModel
fn clone(&self) -> ActiveModel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ActiveModel
impl Debug for ActiveModel
sourceimpl Default for ActiveModel
impl Default for ActiveModel
sourceimpl From<<Entity as EntityTrait>::Model> for ActiveModel
impl From<<Entity as EntityTrait>::Model> for ActiveModel
sourceimpl IntoActiveModel<ActiveModel> for <Entity as EntityTrait>::Model
impl IntoActiveModel<ActiveModel> for <Entity as EntityTrait>::Model
sourcefn into_active_model(self) -> ActiveModel
fn into_active_model(self) -> ActiveModel
Method to call to perform the conversion
sourceimpl PartialEq<ActiveModel> for ActiveModel
impl PartialEq<ActiveModel> for ActiveModel
sourcefn eq(&self, other: &ActiveModel) -> bool
fn eq(&self, other: &ActiveModel) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
impl StructuralPartialEq for ActiveModel
Auto Trait Implementations
impl RefUnwindSafe for ActiveModel
impl Send for ActiveModel
impl Sync for ActiveModel
impl Unpin for ActiveModel
impl UnwindSafe for ActiveModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<A> IntoActiveModel<A> for A where
A: ActiveModelTrait,
impl<A> IntoActiveModel<A> for A where
A: ActiveModelTrait,
fn into_active_model(self) -> A
fn into_active_model(self) -> A
Method to call to perform the conversion
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more