aboutsummaryrefslogblamecommitdiff
path: root/src/.server.rs.swo
blob: 9e99bb30e0b4806b1be7dff92f18bd095690cc80 (plain) (tree)
1
2
3
4



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
b0VIM 8.2剗b���quentinlheureduthe~quentin/Documents/dev/deuxfleurs/mailrage/src/server.rsutf-8
3210#"! UtpFadZ�F������]@?����p@>=�
�
�
�
=
6
4
3
%
���od:��{q�
Q

�	�	�	�	�	`	_			�q"�����ih��������}}}}}}}}}}}}}}}}}}}}}}}}}}}}}    }        Ok(())        mailbox.test().await?;*/        let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;        /*let creds = self.login_provider.login("quentin", "poupou").await?;        let _ = server.await?;        let server = ImapServer::new(incoming).serve(make_service);        });            futures::future::ok::<_, std::convert::Infallible>(service)            let service = tower::ServiceBuilder::new().service_fn(handle_req);            tracing::debug!(remote_addr = %addr.remote_addr, local_addr = %addr.local_addr, "accept");        let make_service = tower::service_fn(|addr: &AddrStream| {        let incoming = AddrIncoming::new("127.0.0.1:4567").await?;        tracing_subscriber::fmt::init();    pub async fn run(self: &Arc<Self>) -> Result<()> {    }        Ok(Arc::new(Self { login_provider }))        };            (None, None) => bail!("No login provider is set up in config file"),            (Some(_), Some(_)) => bail!("A single login provider must be set up in config file"),            (None, Some(ld)) => Box::new(LdapLoginProvider::new(ld, k2v_region, s3_region)?),            (Some(st), None) => Box::new(StaticLoginProvider::new(st, k2v_region, s3_region)?),        {        let login_provider: Box<dyn LoginProvider> = match (config.login_static, config.login_ldap)        };            endpoint: config.k2v_endpoint,            name: config.aws_region,        let k2v_region = Region::Custom {        };            endpoint: config.s3_endpoint,            name: config.aws_region.clone(),        let s3_region = Region::Custom {    pub fn new(config: Config) -> Result<Arc<Self>> {impl Server {}    ))        Status::ok(Some(req.tag), None, "Ok").map_err(|e| eyre::eyre!(e))?,    Ok(Response::Status(    tracing::debug!("Got request: {:#?}", req);    use imap_codec::types::response::Status;async fn handle_req(req: Request) -> eyre::Result<Response> {}    pub login_provider: Box<dyn LoginProvider>,pub struct Server {use tracing_subscriber;use boitalettres::server::Server as ImapServer;use boitalettres::server::accept::addr::{AddrIncoming, AddrStream};use boitalettres::proto::{Request, Response};use crate::mailbox::Mailbox;use crate::login::{ldap_provider::*, static_provider::*, *};use crate::config::*;use rusoto_signature::Region;use std::sync::Arc;use anyhow::{bail, Result};