Moved session tests into general library.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
This commit is contained in:
@@ -102,6 +102,7 @@ impl From<UserAction> for MsgAction {
|
||||
UserAction::Addition(data) => Self::Addition(data),
|
||||
UserAction::CreateDocument(data) => Self::Create(data),
|
||||
UserAction::Query(data) => Self::Query(data),
|
||||
UserAction::Update(data) => Self::Update(data),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::{Addition, DocDef, FieldType, Query};
|
||||
use super::{Addition, DocDef, FieldType, Query, Update};
|
||||
use crate::{message::MessageAction, name::NameType};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@@ -6,6 +6,7 @@ pub enum UserAction {
|
||||
Addition(Addition),
|
||||
CreateDocument(DocDef),
|
||||
Query(Query),
|
||||
Update(Update),
|
||||
}
|
||||
|
||||
impl From<Addition> for UserAction {
|
||||
@@ -26,12 +27,19 @@ impl From<Query> for UserAction {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Update> for UserAction {
|
||||
fn from(value: Update) -> Self {
|
||||
Self::Update(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl MessageAction for UserAction {
|
||||
fn doc_name(&self) -> &NameType {
|
||||
match self {
|
||||
Self::Addition(data) => data.doc_name(),
|
||||
Self::CreateDocument(data) => data.doc_name(),
|
||||
Self::Query(data) => data.doc_name(),
|
||||
Self::Update(data) => data.doc_name(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user