mirror of
https://github.com/mjl-/mox.git
synced 2025-01-01 03:13:48 +03:00
40163bd145
the mailbox select/examine responses now return all flags used in a mailbox in the FLAGS response. and indicate in the PERMANENTFLAGS response that clients can set new keywords. we store these values on the new Message.Keywords field. system/well-known flags are still in Message.Flags, so we're recognizing those and handling them separately. the imap store command handles the new flags. as does the append command, and the search command. we store keywords in a mailbox when a message in that mailbox gets the keyword. we don't automatically remove the keywords from a mailbox. there is currently no way at all to remove a keyword from a mailbox. the import commands now handle non-system/well-known keywords too, when importing from mbox/maildir. jmap requires keyword support, so best to get it out of the way now.
50 lines
1.7 KiB
Go
50 lines
1.7 KiB
Go
// Copyright 2021 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package constraints defines a set of useful constraints to be used
|
|
// with type parameters.
|
|
package constraints
|
|
|
|
// Signed is a constraint that permits any signed integer type.
|
|
// If future releases of Go add new predeclared signed integer types,
|
|
// this constraint will be modified to include them.
|
|
type Signed interface {
|
|
~int | ~int8 | ~int16 | ~int32 | ~int64
|
|
}
|
|
|
|
// Unsigned is a constraint that permits any unsigned integer type.
|
|
// If future releases of Go add new predeclared unsigned integer types,
|
|
// this constraint will be modified to include them.
|
|
type Unsigned interface {
|
|
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
|
|
}
|
|
|
|
// Integer is a constraint that permits any integer type.
|
|
// If future releases of Go add new predeclared integer types,
|
|
// this constraint will be modified to include them.
|
|
type Integer interface {
|
|
Signed | Unsigned
|
|
}
|
|
|
|
// Float is a constraint that permits any floating-point type.
|
|
// If future releases of Go add new predeclared floating-point types,
|
|
// this constraint will be modified to include them.
|
|
type Float interface {
|
|
~float32 | ~float64
|
|
}
|
|
|
|
// Complex is a constraint that permits any complex numeric type.
|
|
// If future releases of Go add new predeclared complex numeric types,
|
|
// this constraint will be modified to include them.
|
|
type Complex interface {
|
|
~complex64 | ~complex128
|
|
}
|
|
|
|
// Ordered is a constraint that permits any ordered type: any type
|
|
// that supports the operators < <= >= >.
|
|
// If future releases of Go add new ordered types,
|
|
// this constraint will be modified to include them.
|
|
type Ordered interface {
|
|
Integer | Float | ~string
|
|
}
|