Changed UserAction to ClientAction.
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:
@@ -2,38 +2,38 @@ use super::{Addition, Delete, DocDef, FieldType, Query, Update};
|
||||
use crate::{message::MessageAction, name::NameType};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum UserAction {
|
||||
pub enum ClientAction {
|
||||
Addition(Addition),
|
||||
Delete(Delete),
|
||||
Query(Query),
|
||||
Update(Update),
|
||||
}
|
||||
|
||||
impl From<Addition> for UserAction {
|
||||
impl From<Addition> for ClientAction {
|
||||
fn from(value: Addition) -> Self {
|
||||
Self::Addition(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Delete> for UserAction {
|
||||
impl From<Delete> for ClientAction {
|
||||
fn from(value: Delete) -> Self {
|
||||
Self::Delete(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Query> for UserAction {
|
||||
impl From<Query> for ClientAction {
|
||||
fn from(value: Query) -> Self {
|
||||
Self::Query(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Update> for UserAction {
|
||||
impl From<Update> for ClientAction {
|
||||
fn from(value: Update) -> Self {
|
||||
Self::Update(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl MessageAction for UserAction {
|
||||
impl MessageAction for ClientAction {
|
||||
fn doc_name(&self) -> &NameType {
|
||||
match self {
|
||||
Self::Addition(data) => data.doc_name(),
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::{Addition, Delete, DocDef, Query, Records, Reply, Show, Update, UserAction};
|
||||
use super::{Addition, ClientAction, Delete, DocDef, Query, Records, Reply, Show, Update};
|
||||
use crate::{
|
||||
message::MessageAction, mtterror::MTTError, name::NameType, queue::data_director::Register,
|
||||
};
|
||||
@@ -98,13 +98,13 @@ impl From<Update> for MsgAction {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UserAction> for MsgAction {
|
||||
fn from(value: UserAction) -> Self {
|
||||
impl From<ClientAction> for MsgAction {
|
||||
fn from(value: ClientAction) -> Self {
|
||||
match value {
|
||||
UserAction::Addition(data) => Self::Addition(data),
|
||||
UserAction::Delete(data) => Self::Delete(data),
|
||||
UserAction::Query(data) => Self::Query(data),
|
||||
UserAction::Update(data) => Self::Update(data),
|
||||
ClientAction::Addition(data) => Self::Addition(data),
|
||||
ClientAction::Delete(data) => Self::Delete(data),
|
||||
ClientAction::Query(data) => Self::Query(data),
|
||||
ClientAction::Update(data) => Self::Update(data),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user