Moved UserAction into Action.
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:
parent
5ffb79b7f2
commit
ff7eaa1a96
@ -1,3 +1,21 @@
|
|||||||
mod query;
|
mod query;
|
||||||
|
|
||||||
|
pub use crate::document::definition::DocDef;
|
||||||
pub use query::Query;
|
pub use query::Query;
|
||||||
|
|
||||||
|
pub enum UserAction {
|
||||||
|
CreateDocument(DocDef),
|
||||||
|
Query(Query),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<DocDef> for UserAction {
|
||||||
|
fn from(value: DocDef) -> Self {
|
||||||
|
Self::CreateDocument(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<Query> for UserAction {
|
||||||
|
fn from(value: Query) -> Self {
|
||||||
|
Self::Query(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
14
src/lib.rs
14
src/lib.rs
@ -5,11 +5,10 @@ mod mtterror;
|
|||||||
mod name;
|
mod name;
|
||||||
mod queue;
|
mod queue;
|
||||||
|
|
||||||
use action::Query;
|
use action::{DocDef, Query, UserAction};
|
||||||
use document::{
|
use document::{
|
||||||
clock::Clock,
|
clock::Clock,
|
||||||
create::CreateDoc,
|
create::CreateDoc,
|
||||||
definition::DocDef,
|
|
||||||
field::{Field, FieldType},
|
field::{Field, FieldType},
|
||||||
session::Session,
|
session::Session,
|
||||||
};
|
};
|
||||||
@ -33,17 +32,6 @@ mod support_tests {
|
|||||||
pub static TIMEOUT: Duration = Duration::from_millis(500);
|
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)]
|
#[derive(Clone)]
|
||||||
pub struct MoreThanText {
|
pub struct MoreThanText {
|
||||||
queue: Queue,
|
queue: Queue,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user