:param packet.Packet pkt: the packet instance containing this field instance. # noqa: E501 :param str s: the string to parse this field from. :return: (str, HPackStringsInterface): the remaining string after this field was carved out & the extracted # noqa: E501
(self, pkt, s)
| 1223 | return HPackLiteralString(s) |
| 1224 | |
| 1225 | def getfield(self, pkt, s): |
| 1226 | # type: (packet.Packet, str) -> Tuple[str, HPackStringsInterface] |
| 1227 | """ |
| 1228 | :param packet.Packet pkt: the packet instance containing this field instance. # noqa: E501 |
| 1229 | :param str s: the string to parse this field from. |
| 1230 | :return: (str, HPackStringsInterface): the remaining string after this field was carved out & the extracted # noqa: E501 |
| 1231 | value. |
| 1232 | :raises: KeyError if "type_from" is not a field of pkt or its payloads. |
| 1233 | :raises: InvalidEncodingException |
| 1234 | """ |
| 1235 | tmp_len = self._length_from(pkt) |
| 1236 | t = pkt.getfieldval(self._type_from) == 1 |
| 1237 | return s[tmp_len:], self._parse(t, s[:tmp_len]) |
| 1238 | |
| 1239 | def i2h(self, pkt, x): |
| 1240 | # type: (Optional[packet.Packet], HPackStringsInterface) -> str |
no test coverage detected