Moved shared data types to 'types' subcrate
This commit is contained in:
@@ -4,21 +4,19 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use crate::Session;
|
||||
use common::{config::jmap::settings::SpecialUse, listener::SessionStream};
|
||||
use email::{
|
||||
cache::{MessageCacheFetch, mailbox::MailboxCacheAccess},
|
||||
mailbox::INBOX_ID,
|
||||
};
|
||||
use jmap_proto::types::{collection::Collection, property::Property};
|
||||
use std::collections::BTreeMap;
|
||||
use store::{
|
||||
IndexKey, IterateParams, SerializeInfallible, U32_LEN, ahash::AHashMap,
|
||||
write::key::DeserializeBigEndian,
|
||||
};
|
||||
use trc::AddContext;
|
||||
|
||||
use crate::Session;
|
||||
use types::{collection::Collection, field::EmailField};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Mailbox {
|
||||
@@ -66,14 +64,14 @@ impl<T: SessionStream> Session<T> {
|
||||
account_id,
|
||||
collection: Collection::Email.into(),
|
||||
document_id: 0,
|
||||
field: Property::Size.into(),
|
||||
field: EmailField::Size.into(),
|
||||
key: 0u32.serialize(),
|
||||
},
|
||||
IndexKey {
|
||||
account_id,
|
||||
collection: Collection::Email.into(),
|
||||
document_id: u32::MAX,
|
||||
field: Property::Size.into(),
|
||||
field: EmailField::Size.into(),
|
||||
key: u32::MAX.serialize(),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
use std::time::Instant;
|
||||
|
||||
use crate::{Session, protocol::response::Response};
|
||||
use common::listener::SessionStream;
|
||||
use directory::Permission;
|
||||
use email::message::metadata::MessageMetadata;
|
||||
use jmap_proto::types::{collection::Collection, property::Property};
|
||||
use std::time::Instant;
|
||||
use trc::AddContext;
|
||||
|
||||
use crate::{Session, protocol::response::Response};
|
||||
use types::{collection::Collection, field::EmailField};
|
||||
|
||||
impl<T: SessionStream> Session<T> {
|
||||
pub async fn handle_fetch(&mut self, msg: u32, lines: Option<u32>) -> trc::Result<()> {
|
||||
@@ -30,7 +28,7 @@ impl<T: SessionStream> Session<T> {
|
||||
mailbox.account_id,
|
||||
Collection::Email,
|
||||
message.id,
|
||||
Property::BodyStructure,
|
||||
EmailField::Metadata.into(),
|
||||
)
|
||||
.await
|
||||
.caused_by(trc::location!())?
|
||||
|
||||
Reference in New Issue
Block a user