From 3de38ff7ad0c0a2e885c608879284a5ca3ca2ee4 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sun, 29 Oct 2023 12:56:35 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20fb12d?= =?UTF-8?q?e289d960880fb412f507313979d1b07aa94=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/dev/prelude/struct.Notification.html | 2 +- .../dev/dev/prelude/trait.MCDatabase.html | 2 +- .../dev/dev/struct.Notification.html | 2 +- db_sqlx_maria/dev/dev/trait.MCDatabase.html | 2 +- .../dev/prelude/dev/struct.Notification.html | 2 +- .../dev/prelude/dev/trait.MCDatabase.html | 2 +- .../dev/prelude/struct.Notification.html | 2 +- .../dev/prelude/trait.MCDatabase.html | 2 +- db_sqlx_maria/dev/struct.Notification.html | 2 +- db_sqlx_maria/dev/trait.MCDatabase.html | 2 +- db_sqlx_maria/index.html | 2 +- db_sqlx_maria/struct.Database.html | 4 +- db_sqlx_maria/struct.InnerNotification.html | 6 +- .../dev/dev/prelude/struct.Notification.html | 2 +- .../dev/dev/prelude/trait.MCDatabase.html | 2 +- .../dev/dev/struct.Notification.html | 2 +- .../dev/dev/trait.MCDatabase.html | 2 +- .../dev/prelude/dev/struct.Notification.html | 2 +- .../dev/prelude/dev/trait.MCDatabase.html | 2 +- .../dev/prelude/struct.Notification.html | 2 +- .../dev/prelude/trait.MCDatabase.html | 2 +- db_sqlx_postgres/dev/struct.Notification.html | 2 +- db_sqlx_postgres/dev/trait.MCDatabase.html | 2 +- db_sqlx_postgres/index.html | 2 +- db_sqlx_postgres/struct.Database.html | 4 +- .../struct.InnerNotification.html | 6 +- src/db_sqlx_maria/lib.rs.html | 76 +++++++++++++++++- src/db_sqlx_postgres/lib.rs.html | 78 ++++++++++++++++++- 28 files changed, 180 insertions(+), 38 deletions(-) diff --git a/db_sqlx_maria/dev/dev/prelude/struct.Notification.html b/db_sqlx_maria/dev/dev/prelude/struct.Notification.html index 342219ad..055ae6a6 100644 --- a/db_sqlx_maria/dev/dev/prelude/struct.Notification.html +++ b/db_sqlx_maria/dev/dev/prelude/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_maria/dev/dev/prelude/trait.MCDatabase.html b/db_sqlx_maria/dev/dev/prelude/trait.MCDatabase.html index 95ab3be5..4ca1ae4a 100644 --- a/db_sqlx_maria/dev/dev/prelude/trait.MCDatabase.html +++ b/db_sqlx_maria/dev/dev/prelude/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

source§

impl MCDatabase for Database

\ No newline at end of file diff --git a/db_sqlx_maria/dev/dev/struct.Notification.html b/db_sqlx_maria/dev/dev/struct.Notification.html index 5e040d60..fdeaed93 100644 --- a/db_sqlx_maria/dev/dev/struct.Notification.html +++ b/db_sqlx_maria/dev/dev/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_maria/dev/dev/trait.MCDatabase.html b/db_sqlx_maria/dev/dev/trait.MCDatabase.html index 88147fc9..ef26880a 100644 --- a/db_sqlx_maria/dev/dev/trait.MCDatabase.html +++ b/db_sqlx_maria/dev/dev/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

source§

impl MCDatabase for Database

\ No newline at end of file diff --git a/db_sqlx_maria/dev/prelude/dev/struct.Notification.html b/db_sqlx_maria/dev/prelude/dev/struct.Notification.html index cc529292..37570e2e 100644 --- a/db_sqlx_maria/dev/prelude/dev/struct.Notification.html +++ b/db_sqlx_maria/dev/prelude/dev/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_maria/dev/prelude/dev/trait.MCDatabase.html b/db_sqlx_maria/dev/prelude/dev/trait.MCDatabase.html index 48ec6e1e..943992f1 100644 --- a/db_sqlx_maria/dev/prelude/dev/trait.MCDatabase.html +++ b/db_sqlx_maria/dev/prelude/dev/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

source§

impl MCDatabase for Database

\ No newline at end of file diff --git a/db_sqlx_maria/dev/prelude/struct.Notification.html b/db_sqlx_maria/dev/prelude/struct.Notification.html index 09f728d7..a28466ff 100644 --- a/db_sqlx_maria/dev/prelude/struct.Notification.html +++ b/db_sqlx_maria/dev/prelude/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_maria/dev/prelude/trait.MCDatabase.html b/db_sqlx_maria/dev/prelude/trait.MCDatabase.html index b83319b4..bdb28015 100644 --- a/db_sqlx_maria/dev/prelude/trait.MCDatabase.html +++ b/db_sqlx_maria/dev/prelude/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

source§

impl MCDatabase for Database

\ No newline at end of file diff --git a/db_sqlx_maria/dev/struct.Notification.html b/db_sqlx_maria/dev/struct.Notification.html index 672b4a8f..e1a5c5a5 100644 --- a/db_sqlx_maria/dev/struct.Notification.html +++ b/db_sqlx_maria/dev/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_maria/dev/trait.MCDatabase.html b/db_sqlx_maria/dev/trait.MCDatabase.html index 31b59730..ee41a5a9 100644 --- a/db_sqlx_maria/dev/trait.MCDatabase.html +++ b/db_sqlx_maria/dev/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

source§

impl MCDatabase for Database

\ No newline at end of file diff --git a/db_sqlx_maria/index.html b/db_sqlx_maria/index.html index 3aac561a..51455416 100644 --- a/db_sqlx_maria/index.html +++ b/db_sqlx_maria/index.html @@ -1 +1 @@ -db_sqlx_maria - Rust

Crate db_sqlx_maria

source ·

Modules

Structs

Enums

\ No newline at end of file +db_sqlx_maria - Rust

Crate db_sqlx_maria

source ·

Modules

Structs

Enums

\ No newline at end of file diff --git a/db_sqlx_maria/struct.Database.html b/db_sqlx_maria/struct.Database.html index a382a17c..e3102d83 100644 --- a/db_sqlx_maria/struct.Database.html +++ b/db_sqlx_maria/struct.Database.html @@ -1,6 +1,6 @@ Database in db_sqlx_maria - Rust

Struct db_sqlx_maria::Database

source ·
pub struct Database {
     pub pool: MySqlPool,
-}

Fields§

§pool: MySqlPool

Trait Implementations§

source§

impl Clone for Database

source§

fn clone(&self) -> Database

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl MCDatabase for Database

source§

fn ping<'life0, 'async_trait>( +}

Fields§

§pool: MySqlPool

Trait Implementations§

source§

impl Clone for Database

source§

fn clone(&self) -> Database

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl MCDatabase for Database

source§

fn ping<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, @@ -345,7 +345,7 @@ Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Track maximum nonce received against captcha levels

-
source§

fn get_max_nonce_for_level<'life0, 'life1, 'async_trait>( +

source§

fn get_max_nonce_for_level<'life0, 'life1, 'async_trait>( &'life0 self, captcha_key: &'life1 str, difficulty_factor: u32 diff --git a/db_sqlx_maria/struct.InnerNotification.html b/db_sqlx_maria/struct.InnerNotification.html index f3ef34e1..9d5938f4 100644 --- a/db_sqlx_maria/struct.InnerNotification.html +++ b/db_sqlx_maria/struct.InnerNotification.html @@ -1,4 +1,4 @@ -InnerNotification in db_sqlx_maria - Rust
pub struct InnerNotification {
+InnerNotification in db_sqlx_maria - Rust
pub struct InnerNotification {
     pub name: String,
     pub heading: String,
     pub message: String,
@@ -10,9 +10,9 @@
 
§message: String

message of the notification

§received: OffsetDateTime

when notification was received

§id: i32

db assigned ID of the notification

-

Trait Implementations§

source§

impl Clone for InnerNotification

source§

fn clone(&self) -> InnerNotification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InnerNotification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<InnerNotification> for InnerNotification

source§

fn eq(&self, other: &InnerNotification) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for InnerNotification

source§

fn clone(&self) -> InnerNotification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InnerNotification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<InnerNotification> for InnerNotification

source§

fn eq(&self, other: &InnerNotification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for InnerNotification

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl StructuralPartialEq for InnerNotification

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/db_sqlx_postgres/dev/dev/prelude/struct.Notification.html b/db_sqlx_postgres/dev/dev/prelude/struct.Notification.html index fbc2c0fd..48b06abb 100644 --- a/db_sqlx_postgres/dev/dev/prelude/struct.Notification.html +++ b/db_sqlx_postgres/dev/dev/prelude/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_postgres/dev/dev/prelude/trait.MCDatabase.html b/db_sqlx_postgres/dev/dev/prelude/trait.MCDatabase.html index 901d8031..b102decf 100644 --- a/db_sqlx_postgres/dev/dev/prelude/trait.MCDatabase.html +++ b/db_sqlx_postgres/dev/dev/prelude/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/db_sqlx_postgres/dev/dev/struct.Notification.html b/db_sqlx_postgres/dev/dev/struct.Notification.html index 95fb80cc..dc4dabff 100644 --- a/db_sqlx_postgres/dev/dev/struct.Notification.html +++ b/db_sqlx_postgres/dev/dev/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_postgres/dev/dev/trait.MCDatabase.html b/db_sqlx_postgres/dev/dev/trait.MCDatabase.html index 793ad348..d639ad2d 100644 --- a/db_sqlx_postgres/dev/dev/trait.MCDatabase.html +++ b/db_sqlx_postgres/dev/dev/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/db_sqlx_postgres/dev/prelude/dev/struct.Notification.html b/db_sqlx_postgres/dev/prelude/dev/struct.Notification.html index b9954e69..bfe4dc4a 100644 --- a/db_sqlx_postgres/dev/prelude/dev/struct.Notification.html +++ b/db_sqlx_postgres/dev/prelude/dev/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_postgres/dev/prelude/dev/trait.MCDatabase.html b/db_sqlx_postgres/dev/prelude/dev/trait.MCDatabase.html index 50c0b211..9fb2863e 100644 --- a/db_sqlx_postgres/dev/prelude/dev/trait.MCDatabase.html +++ b/db_sqlx_postgres/dev/prelude/dev/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/db_sqlx_postgres/dev/prelude/struct.Notification.html b/db_sqlx_postgres/dev/prelude/struct.Notification.html index 853434b7..3fefada0 100644 --- a/db_sqlx_postgres/dev/prelude/struct.Notification.html +++ b/db_sqlx_postgres/dev/prelude/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_postgres/dev/prelude/trait.MCDatabase.html b/db_sqlx_postgres/dev/prelude/trait.MCDatabase.html index c6364f01..ae4aa219 100644 --- a/db_sqlx_postgres/dev/prelude/trait.MCDatabase.html +++ b/db_sqlx_postgres/dev/prelude/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/db_sqlx_postgres/dev/struct.Notification.html b/db_sqlx_postgres/dev/struct.Notification.html index e0040b40..d531beaf 100644 --- a/db_sqlx_postgres/dev/struct.Notification.html +++ b/db_sqlx_postgres/dev/struct.Notification.html @@ -13,7 +13,7 @@

Trait Implementations§

source§

impl Clone for Notification

source§

fn clone(&self) -> Notification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Notification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Notification

source§

fn default() -> Notification

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Notification

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Notification, <__D as Deserializer<'de>>::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used + __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Notification> for Notification

source§

fn eq(&self, other: &Notification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Notification

source§

fn serialize<__S>( &self, diff --git a/db_sqlx_postgres/dev/trait.MCDatabase.html b/db_sqlx_postgres/dev/trait.MCDatabase.html index 4a4ff949..251719a5 100644 --- a/db_sqlx_postgres/dev/trait.MCDatabase.html +++ b/db_sqlx_postgres/dev/trait.MCDatabase.html @@ -738,4 +738,4 @@ trait.

'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get publishing status of pow analytics for captcha ID/ campaign ID

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/db_sqlx_postgres/index.html b/db_sqlx_postgres/index.html index f4f6dd5d..e9c06283 100644 --- a/db_sqlx_postgres/index.html +++ b/db_sqlx_postgres/index.html @@ -1 +1 @@ -db_sqlx_postgres - Rust

Crate db_sqlx_postgres

source ·

Modules

Structs

Enums

\ No newline at end of file +db_sqlx_postgres - Rust

Crate db_sqlx_postgres

source ·

Modules

Structs

Enums

\ No newline at end of file diff --git a/db_sqlx_postgres/struct.Database.html b/db_sqlx_postgres/struct.Database.html index 63b151a3..3a9d6b5f 100644 --- a/db_sqlx_postgres/struct.Database.html +++ b/db_sqlx_postgres/struct.Database.html @@ -1,6 +1,6 @@ Database in db_sqlx_postgres - Rust
pub struct Database {
     pub pool: PgPool,
-}

Fields§

§pool: PgPool

Trait Implementations§

source§

impl Clone for Database

source§

fn clone(&self) -> Database

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl MCDatabase for Database

source§

fn ping<'life0, 'async_trait>( +}

Fields§

§pool: PgPool

Trait Implementations§

source§

impl Clone for Database

source§

fn clone(&self) -> Database

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl MCDatabase for Database

source§

fn ping<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, @@ -345,7 +345,7 @@ Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Track maximum nonce received against captcha levels

-
source§

fn get_max_nonce_for_level<'life0, 'life1, 'async_trait>( +

source§

fn get_max_nonce_for_level<'life0, 'life1, 'async_trait>( &'life0 self, captcha_key: &'life1 str, difficulty_factor: u32 diff --git a/db_sqlx_postgres/struct.InnerNotification.html b/db_sqlx_postgres/struct.InnerNotification.html index 5550998d..96354e82 100644 --- a/db_sqlx_postgres/struct.InnerNotification.html +++ b/db_sqlx_postgres/struct.InnerNotification.html @@ -1,4 +1,4 @@ -InnerNotification in db_sqlx_postgres - Rust
pub struct InnerNotification {
+InnerNotification in db_sqlx_postgres - Rust
pub struct InnerNotification {
     pub name: Option<String>,
     pub heading: Option<String>,
     pub message: Option<String>,
@@ -10,9 +10,9 @@
 
§message: Option<String>

message of the notification

§received: Option<OffsetDateTime>

when notification was received

§id: Option<i32>

db assigned ID of the notification

-

Trait Implementations§

source§

impl Clone for InnerNotification

source§

fn clone(&self) -> InnerNotification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InnerNotification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for InnerNotification

source§

fn default() -> InnerNotification

Returns the “default value” for a type. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<InnerNotification> for InnerNotification

source§

fn eq(&self, other: &InnerNotification) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for InnerNotification

source§

fn clone(&self) -> InnerNotification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InnerNotification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for InnerNotification

source§

fn default() -> InnerNotification

Returns the “default value” for a type. Read more
source§

impl From<InnerNotification> for Notification

source§

fn from(n: InnerNotification) -> Self

Converts to this type from the input type.
source§

impl PartialEq<InnerNotification> for InnerNotification

source§

fn eq(&self, other: &InnerNotification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for InnerNotification

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl StructuralPartialEq for InnerNotification

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/src/db_sqlx_maria/lib.rs.html b/src/db_sqlx_maria/lib.rs.html index 954f8934..53abdf23 100644 --- a/src/db_sqlx_maria/lib.rs.html +++ b/src/db_sqlx_maria/lib.rs.html @@ -1253,6 +1253,41 @@ 1253 1254 1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290
// Copyright (C) 2022  Aravinth Manivannan <realaravinth@batsense.net>
 // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
 //
@@ -2418,7 +2453,12 @@
             nonce: i32,
         }
 
-        let res = sqlx::query_as!(
+        async fn inner_get_max_nonce(
+            pool: &MySqlPool,
+            captcha_key: &str,
+            difficulty_factor: u32,
+        ) -> DBResult<X> {
+            sqlx::query_as!(
                 X,
                 "SELECT nonce FROM mcaptcha_track_nonce
                 WHERE level_id =  (
@@ -2434,10 +2474,40 @@
                 &captcha_key,
                 difficulty_factor as i32,
             )
-                .fetch_one(&self.pool).await
+                .fetch_one(pool).await
+                .map_err(|e| map_row_not_found_err(e, DBError::CaptchaNotFound))
+        }
+
+        let res = inner_get_max_nonce(&self.pool, captcha_key, difficulty_factor).await;
+        if let Err(DBError::CaptchaNotFound) = res {
+            sqlx::query!(
+                "INSERT INTO
+                    mcaptcha_track_nonce (level_id, nonce)
+                VALUES  ((
+                    SELECT
+                        level_id
+                    FROM
+                        mcaptcha_levels
+                    WHERE
+                        config_id = (SELECT config_id FROM mcaptcha_config WHERE captcha_key =?)
+                    AND
+                        difficulty_factor = ?
+                    ), ?);",
+                &captcha_key,
+                difficulty_factor as i32,
+                0,
+            )
+            .execute(&self.pool)
+            .await
                 .map_err(|e| map_row_not_found_err(e, DBError::CaptchaNotFound))?;
 
-        Ok(res.nonce as u32)
+            let res =
+                inner_get_max_nonce(&self.pool, captcha_key, difficulty_factor).await?;
+            Ok(res.nonce as u32)
+        } else {
+            let res = res?;
+            Ok(res.nonce as u32)
+        }
     }
 }
 
diff --git a/src/db_sqlx_postgres/lib.rs.html b/src/db_sqlx_postgres/lib.rs.html
index b5313151..f815dc81 100644
--- a/src/db_sqlx_postgres/lib.rs.html
+++ b/src/db_sqlx_postgres/lib.rs.html
@@ -1260,6 +1260,42 @@
 1260
 1261
 1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
 

// Copyright (C) 2022  Aravinth Manivannan <realaravinth@batsense.net>
 // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
 //
@@ -2432,7 +2468,12 @@
             nonce: i32,
         }
 
-        let res = sqlx::query_as!(
+        async fn inner_get_max_nonce(
+            pool: &PgPool,
+            captcha_key: &str,
+            difficulty_factor: u32,
+        ) -> DBResult<X> {
+            sqlx::query_as!(
                 X,
                 "SELECT nonce FROM mcaptcha_track_nonce
                 WHERE level_id =  (
@@ -2448,10 +2489,41 @@
                 &captcha_key,
                 difficulty_factor as i32,
             )
-                .fetch_one(&self.pool).await
+        .fetch_one(pool)
+                .await
+                .map_err(|e| map_row_not_found_err(e, DBError::CaptchaNotFound))
+        }
+
+        let res = inner_get_max_nonce(&self.pool, captcha_key, difficulty_factor).await;
+        if let Err(DBError::CaptchaNotFound) = res {
+            sqlx::query!(
+                "INSERT INTO
+                    mcaptcha_track_nonce (level_id, nonce)
+                VALUES  ((
+                    SELECT
+                        level_id
+                    FROM
+                        mcaptcha_levels
+                    WHERE
+                        config_id = (SELECT config_id FROM mcaptcha_config WHERE key = ($1))
+                    AND
+                        difficulty_factor = $2
+                    ), $3);",
+                &captcha_key,
+                difficulty_factor as i32,
+                0,
+            )
+            .execute(&self.pool)
+            .await
                 .map_err(|e| map_row_not_found_err(e, DBError::CaptchaNotFound))?;
 
-        Ok(res.nonce as u32)
+            let res =
+                inner_get_max_nonce(&self.pool, captcha_key, difficulty_factor).await?;
+            Ok(res.nonce as u32)
+        } else {
+            let res = res?;
+            Ok(res.nonce as u32)
+        }
     }
 }