MMM: Reexport in the SDK
This commit is contained in:
parent
c4a8ebebf3
commit
6ed6066b1f
|
@ -603,6 +603,7 @@ dependencies = [
|
|||
"cfg-if",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
|
@ -1507,6 +1508,20 @@ dependencies = [
|
|||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "magnetar_mmm_parser"
|
||||
version = "0.2.1-alpha"
|
||||
dependencies = [
|
||||
"compact_str",
|
||||
"either",
|
||||
"emojis",
|
||||
"nom",
|
||||
"nom_locate",
|
||||
"serde",
|
||||
"tracing",
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "magnetar_nodeinfo"
|
||||
version = "0.2.1-alpha"
|
||||
|
@ -1521,6 +1536,7 @@ version = "0.2.1-alpha"
|
|||
dependencies = [
|
||||
"chrono",
|
||||
"http",
|
||||
"magnetar_mmm_parser",
|
||||
"magnetar_sdk_macros",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -1640,19 +1656,6 @@ dependencies = [
|
|||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mmm_parser"
|
||||
version = "0.2.1-alpha"
|
||||
dependencies = [
|
||||
"compact_str",
|
||||
"either",
|
||||
"emojis",
|
||||
"nom",
|
||||
"nom_locate",
|
||||
"tracing",
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "mmm_parser"
|
||||
name = "magnetar_mmm_parser"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
@ -9,6 +9,7 @@ either = { workspace = true }
|
|||
emojis = { workspace = true }
|
||||
nom = { workspace = true }
|
||||
nom_locate = { workspace = true }
|
||||
compact_str = { workspace = true }
|
||||
compact_str = { workspace = true, features = ["serde"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
tracing = { workspace = true }
|
||||
unicode-segmentation = { workspace = true }
|
||||
|
|
|
@ -12,13 +12,14 @@ use nom::multi::{many0, many0_count, many1, many1_count, many_till, separated_li
|
|||
use nom::sequence::tuple;
|
||||
use nom::{IResult, Offset, Parser, Slice};
|
||||
use nom_locate::LocatedSpan;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::convert::{identity, Infallible};
|
||||
use std::marker::PhantomData;
|
||||
use tracing::trace;
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
pub enum MentionType {
|
||||
Community,
|
||||
User,
|
||||
|
@ -33,7 +34,7 @@ impl MentionType {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
pub enum Token {
|
||||
PlainText(CompactString),
|
||||
Sequence(Vec<Token>),
|
||||
|
|
|
@ -5,6 +5,7 @@ edition.workspace = true
|
|||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
magnetar_mmm_parser = { path = "../magnetar_mmm_parser" }
|
||||
magnetar_sdk_macros = { path = "./macros" }
|
||||
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
|
@ -15,4 +16,4 @@ serde_json = { workspace = true }
|
|||
|
||||
ts-rs = { workspace = true, features = ["chrono", "chrono-impl"] }
|
||||
|
||||
unicode-segmentation = { workspace = true }
|
||||
unicode-segmentation = { workspace = true }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use ts_rs::TS;
|
||||
|
||||
pub use magnetar_mmm_parser as mmm;
|
||||
pub mod endpoints;
|
||||
pub mod types;
|
||||
pub mod util_types;
|
||||
|
|
Loading…
Reference in New Issue