class Net::IMAP::ESearchResult

def modseq; data.assoc("MODSEQ")&.last end

and +ESEARCH+ {[RFC4731]}[https://www.rfc-editor.org/rfc/rfc4731.html#section-3.2].
Requires +CONDSTORE+ {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html]

+MODSEQ+ search criteria will implicitly enable +CONDSTORE+.
returned whenever the +CONDSTORE+ extension has been enabled. Using the
Note that there is no search +return+ option for +MODSEQ+. It will be

the +MODSEQ+ search criterion wasn't specified.
Returns +nil+ when the associated search command has no results, or when

The highest +mod-sequence+ of all messages being returned.

:call-seq: modseq -> integer or nil
def modseq;     data.assoc("MODSEQ")&.last     end