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`.`python`.`roots`.`Constrained``

class documentation

`class Constrained(Collection): (source)`

Known subclasses: `twisted.python.roots.Homogenous`, `twisted.python.roots.Locked`

Constructor: `Constrained(entities)`

View In Hierarchy

A collection that has constraints on its names and/or entities.

Method | `entityConstraint` | A method that determines whether an entity may be added to me.
Method | `nameConstraint` | A method that determines whether an entity may be added to me with a given name.
Method | `putEntity` | Store an entity if it meets both constraints.
Method | `reallyPutEntity` | Undocumented

Inherited from `Collection`:

Method | `__init__` | Initialize me.
Method | `delEntity` | Remove a static reference for 'name'.
Method | `getDynamicEntity` | Subclass this to generate an entity on demand.
Method | `getEntity` | Retrieve an entity from me.
Method | `getStaticEntity` | Get an entity that was added to me using putEntity.
Method | `listDynamicEntities` | A list of all name, entity that I can generate on demand.
Method | `listDynamicNames` | Retrieve a list of the names of entities that I store references to.
Method | `listEntities` | Retrieve a list of all name, entity pairs I contain.
Method | `listNames` | Retrieve a list of all names for entities that I contain.
Method | `listStaticEntities` | Retrieve a list of all name, entity pairs that I store references to.
Method | `listStaticNames` | Retrieve a list of the names of entities that I store references to.
Method | `removeEntity` | Remove an entity for 'name', based on the content of 'request'.
Method | `storeEntity` | Store an entity for 'name', based on the content of 'request'.
Instance Variable | `entities` | Undocumented

def entityConstraint(self, entity): (source)
overridden in `twisted.python.roots.Homogenous`, `twisted.python.roots.Locked`

A method that determines whether an entity may be added to me.

If the constraint is satisfied, return 1; if the constraint is not satisfied, either return 0 or raise a descriptive ConstraintViolation.

def nameConstraint(self, name): (source)

A method that determines whether an entity may be added to me with a given name.

If the constraint is satisfied, return 1; if the constraint is not satisfied, either return 0 or raise a descriptive ConstraintViolation.

def putEntity(self, name, entity): (source)
overrides `twisted.python.roots.Collection.putEntity`

Store an entity if it meets both constraints.

Otherwise raise a ConstraintViolation.

def reallyPutEntity(self, name, entity): (source)
overridden in `twisted.web.vhost.VirtualHostCollection`

Undocumented