aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dav/mod.rs12
-rw-r--r--src/dav/xml.rs8
-rw-r--r--src/lib.rs19
-rw-r--r--src/main.rs26
4 files changed, 32 insertions, 33 deletions
diff --git a/src/dav/mod.rs b/src/dav/mod.rs
index bff95e7..906cfdd 100644
--- a/src/dav/mod.rs
+++ b/src/dav/mod.rs
@@ -1,11 +1,11 @@
// utils
-mod error;
-mod xml;
+pub mod error;
+pub mod xml;
// webdav
-mod types;
-mod encoder;
-mod decoder;
+pub mod types;
+pub mod encoder;
+pub mod decoder;
// calendar
mod caltypes;
@@ -17,7 +17,7 @@ mod acltypes;
mod versioningtypes;
// final type
-mod realization;
+pub mod realization;
use std::net::SocketAddr;
diff --git a/src/dav/xml.rs b/src/dav/xml.rs
index d34322a..02263fd 100644
--- a/src/dav/xml.rs
+++ b/src/dav/xml.rs
@@ -12,7 +12,7 @@ pub const CARD_URN: &[u8] = b"urn:ietf:params:xml:ns:carddav";
// Async traits
pub trait IWrite = AsyncWrite + Unpin;
-pub trait IRead = AsyncBufRead + Unpin + 'static;
+pub trait IRead = AsyncBufRead + Unpin;
// Serialization/Deserialization traits
pub trait QWrite {
@@ -78,7 +78,7 @@ impl<T: IRead> Reader<T> {
/// skip a node at current level
/// I would like to make this one private but not ready
pub async fn skip(&mut self) -> Result<Event<'static>, ParsingError> {
- println!("skipping inside node {:?}", self.parents.last());
+ //println!("skipping inside node {:?}", self.parents.last());
match &self.cur {
Event::Start(b) => {
let _span = self.rdr.read_to_end_into_async(b.to_end().name(), &mut self.buf).await?;
@@ -235,7 +235,7 @@ impl<T: IRead> Reader<T> {
_ => return Err(ParsingError::Recoverable),
};
- println!("open tag {:?}", evt);
+ //println!("open tag {:?}", evt);
self.parents.push(evt.clone());
Ok(evt)
}
@@ -250,7 +250,7 @@ impl<T: IRead> Reader<T> {
// find stop tag
pub async fn close(&mut self) -> Result<Event<'static>, ParsingError> {
- println!("close tag {:?}", self.parents.last());
+ //println!("close tag {:?}", self.parents.last());
// Handle the empty case
if !self.parent_has_child() {
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..f065478
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,19 @@
+#![feature(type_alias_impl_trait)]
+#![feature(async_fn_in_trait)]
+#![feature(async_closure)]
+#![feature(trait_alias)]
+
+pub mod auth;
+pub mod bayou;
+pub mod config;
+pub mod cryptoblob;
+pub mod dav;
+pub mod imap;
+pub mod k2v_util;
+pub mod lmtp;
+pub mod login;
+pub mod mail;
+pub mod server;
+pub mod storage;
+pub mod timestamp;
+pub mod user;
diff --git a/src/main.rs b/src/main.rs
index e098d44..43b4dca 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,23 +1,3 @@
-#![feature(type_alias_impl_trait)]
-#![feature(async_fn_in_trait)]
-#![feature(async_closure)]
-#![feature(trait_alias)]
-
-mod auth;
-mod bayou;
-mod config;
-mod cryptoblob;
-mod dav;
-mod imap;
-mod k2v_util;
-mod lmtp;
-mod login;
-mod mail;
-mod server;
-mod storage;
-mod timestamp;
-mod user;
-
use std::io::Read;
use std::path::PathBuf;
@@ -25,9 +5,9 @@ use anyhow::{bail, Context, Result};
use clap::{Parser, Subcommand};
use nix::{sys::signal, unistd::Pid};
-use config::*;
-use login::{static_provider::*, *};
-use server::Server;
+use aerogramme::config::*;
+use aerogramme::login::{static_provider::*, *};
+use aerogramme::server::Server;
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]