:param packet.Packet|None pkt: the packet instance containing this field instance. # noqa: E501 :param str|HPackStringsInterface x: the value to convert :return: HPackStringsInterface: the Scapy internal value for this field :raises: AssertionError, InvalidEncodingE
(self, pkt, x)
| 1267 | return self._parse(t == 1, x[:tmp_len]) |
| 1268 | |
| 1269 | def any2i(self, pkt, x): |
| 1270 | # type: (Optional[packet.Packet], Union[str, HPackStringsInterface]) -> HPackStringsInterface # noqa: E501 |
| 1271 | """ |
| 1272 | :param packet.Packet|None pkt: the packet instance containing this field instance. # noqa: E501 |
| 1273 | :param str|HPackStringsInterface x: the value to convert |
| 1274 | :return: HPackStringsInterface: the Scapy internal value for this field |
| 1275 | :raises: AssertionError, InvalidEncodingException |
| 1276 | """ |
| 1277 | if isinstance(x, bytes): |
| 1278 | assert isinstance(pkt, packet.Packet) |
| 1279 | return self.m2i(pkt, x) |
| 1280 | assert isinstance(x, HPackStringsInterface) |
| 1281 | return x |
| 1282 | |
| 1283 | def i2m(self, pkt, x): |
| 1284 | # type: (Optional[packet.Packet], HPackStringsInterface) -> str |