MoonBit IMAP structured UID core with bounded, read-only Maildir archival host
///|
test "sequence sets reject invalid separators and zero" {
for s in ["1", "1:3", "3:1", "*", "1:*,7"] {
assert_true(@imap.valid_sequence_set(s))
}
for s in ["0", "01", "1:", ":2", "1,,2", "1:2:3", "4294967296"] {
assert_true(!@imap.valid_sequence_set(s))
}
}pub struct CompletedResponse {
// private fields
}fn CompletedResponse::selection(self : CompletedResponse, read_only? : Bool) -> SelectionInfo raise ImapErrorpub struct SelectionInfo {
uid_validity : Int64
uid_next : Int64?
exists : Int64?
flags : Array[String]
permanent_flags : Array[String]
access : MailboxAccess
} derive(Eq, Debug)fn SelectionInfo::identity(self : SelectionInfo, mailbox : String, uid : Int64) -> UidIdentity raise ImapErrorfn completed_response(tag : String, responses : Array[Response]) -> CompletedResponse raise ImapErrorfn valid_sequence_set(s : String) -> BoolInstall
Download zipMoonBit IMAP structured UID core with bounded, read-only Maildir archival host