Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`mail`.`maildir`.`StringListMailbox``

class documentation

`class StringListMailbox: (source)`

Implements interfaces: `twisted.mail.interfaces.IMailboxPOP3`

View In Hierarchy

An in-memory mailbox.

Method | `__init__` | No summary
Method | `deleteMessage` | Mark a message for deletion.
Method | `getMessage` | Return an in-memory file-like object with the contents of a message.
Method | `getUidl` | Get a unique identifier for a message.
Method | `listMessages` | Retrieve the size of a message, or, if none is specified, the size of each message in the mailbox.
Method | `sync` | Discard the contents of any messages marked for deletion.
Method | `undeleteMessages` | Undelete any messages which have been marked for deletion.
Instance Variable | `msgs` | See `__init__`.
Instance Variable | `_delete` | The indices of messages which have been marked for deletion.

def __init__(self, msgs): (source)

Parameters
msgs:`list` of `bytes` | The contents of each message in the mailbox.

def deleteMessage(self, i): (source)
from `twisted.mail.interfaces.IMailboxPOP3`

Mark a message for deletion.

Parameters
i:`int` | The 0-based index of a message to delete.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def getMessage(self, i): (source)
from `twisted.mail.interfaces.IMailboxPOP3`

Return an in-memory file-like object with the contents of a message.

Parameters
i:`int` | The 0-based index of a message.
Returns
`IO[bytes]` | An in-memory file-like object containing the message.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def getUidl(self, i): (source)
from `twisted.mail.interfaces.IMailboxPOP3`

Get a unique identifier for a message.

Parameters
i:`int` | The 0-based index of a message.
Returns
`bytes` | A hash of the contents of the message at the given index.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def listMessages(self, i=None): (source)
from `twisted.mail.interfaces.IMailboxPOP3`

Retrieve the size of a message, or, if none is specified, the size of each message in the mailbox.

Parameters
i:`int` or `None` | The 0-based index of a message.
Returns
`int` or `list` of `int` | The number of octets in the specified message, or, if an index is not specified, a list of the number of octets in each message in the mailbox. Any value which corresponds to a deleted message is set to 0.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def sync(self): (source)
from `twisted.mail.interfaces.IMailboxPOP3`

Discard the contents of any messages marked for deletion.

def undeleteMessages(self): (source)
from `twisted.mail.interfaces.IMailboxPOP3`

Undelete any messages which have been marked for deletion.

msgs = (source)

See `__init__`.

_delete: `set` of `int` = (source)

The indices of messages which have been marked for deletion.