Moved Query into separate actions.
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:
30
src/lib.rs
30
src/lib.rs
@@ -1,21 +1,24 @@
|
||||
mod document;
|
||||
pub mod action;
|
||||
pub mod document;
|
||||
mod message;
|
||||
mod mtterror;
|
||||
mod name;
|
||||
mod queue;
|
||||
|
||||
use action::Query;
|
||||
use document::{
|
||||
clock::Clock,
|
||||
create::CreateDoc,
|
||||
definition::DocDef,
|
||||
field::{Field, FieldType},
|
||||
session::Session,
|
||||
};
|
||||
use message::{
|
||||
action::{Action, MsgAction},
|
||||
wrapper::{Addition, CalcValue, Calculation, Message, Operand, Query},
|
||||
wrapper::{Addition, CalcValue, Calculation, Message, Operand},
|
||||
};
|
||||
pub use mtterror::MTTError;
|
||||
use name::{Name, NameType};
|
||||
pub use name::{Name, NameType};
|
||||
use queue::{
|
||||
data_director::{Include, Path, RegMsg, Register},
|
||||
router::Queue,
|
||||
@@ -30,6 +33,17 @@ mod support_tests {
|
||||
pub static TIMEOUT: Duration = Duration::from_millis(500);
|
||||
}
|
||||
|
||||
enum UserAction {
|
||||
CreateDocument(DocDef),
|
||||
Query(Query),
|
||||
}
|
||||
|
||||
impl From<DocDef> for UserAction {
|
||||
fn from(value: DocDef) -> Self {
|
||||
Self::CreateDocument(value)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct MoreThanText {
|
||||
queue: Queue,
|
||||
@@ -105,6 +119,16 @@ impl MoreThanText {
|
||||
output
|
||||
}
|
||||
|
||||
pub fn request<UA>(&mut self, req: UA)
|
||||
where
|
||||
UA: Into<UserAction>,
|
||||
{
|
||||
}
|
||||
|
||||
pub fn create_document(&mut self, docdef: DocDef) -> Result<(), MTTError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_document(&self, name: &str, id: &str) -> Result<String, MTTError> {
|
||||
if name == "page" {
|
||||
Ok("something".to_string())
|
||||
|
||||
Reference in New Issue
Block a user