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:
@@ -1,6 +1,7 @@
|
||||
mod action_type;
|
||||
mod addition;
|
||||
mod calculation;
|
||||
mod client;
|
||||
mod delete;
|
||||
mod message;
|
||||
mod query;
|
||||
@@ -8,12 +9,12 @@ mod reply;
|
||||
mod request_data;
|
||||
mod show;
|
||||
mod update;
|
||||
mod user;
|
||||
|
||||
pub use crate::document::{DocDef, DocFuncType, Field, FieldType, IndexType, Record, Records};
|
||||
pub use action_type::Action;
|
||||
pub use addition::Addition;
|
||||
pub use calculation::{CalcValue, Calculation, Operand};
|
||||
pub use client::ClientAction;
|
||||
pub use delete::Delete;
|
||||
pub use message::MsgAction;
|
||||
pub use query::Query;
|
||||
@@ -21,4 +22,3 @@ pub use reply::Reply;
|
||||
use request_data::RequestData;
|
||||
pub use show::Show;
|
||||
pub use update::Update;
|
||||
pub use user::UserAction;
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,13 +55,13 @@ impl MoreThanText {
|
||||
output
|
||||
}
|
||||
|
||||
fn new_session() -> UserAction {
|
||||
fn new_session() -> ClientAction {
|
||||
Addition::new(Session::doc_names()[0].clone()).into()
|
||||
}
|
||||
|
||||
fn recursive_message_request<UA>(&mut self, action: UA) -> Uuid
|
||||
where
|
||||
UA: Into<UserAction>,
|
||||
UA: Into<ClientAction>,
|
||||
{
|
||||
match self.records(action) {
|
||||
Ok(data) => {
|
||||
@@ -100,7 +100,7 @@ impl MoreThanText {
|
||||
|
||||
pub fn records<UA>(&mut self, request: UA) -> Result<Records, MTTError>
|
||||
where
|
||||
UA: Into<UserAction>,
|
||||
UA: Into<ClientAction>,
|
||||
{
|
||||
let req = request.into();
|
||||
let (tx, rx) = channel();
|
||||
|
||||
Reference in New Issue
Block a user