parse_exit_list_bytes

Function parse_exit_list_bytes 

Source
pub fn parse_exit_list_bytes(content: &[u8]) -> Result<Vec<TorDNSEL>, Error>
Expand description

Parses a complete TorDNSEL exit list file from raw bytes.

This is the byte-oriented version of parse_exit_list(), useful when reading directly from files or network streams.

§Arguments

  • content - The complete exit list file content as bytes (UTF-8 encoded)

§Returns

A vector of parsed TorDNSEL entries on success.

§Errors

Returns Error::Parse if any entry in the file is malformed. Parsing stops at the first error.

§Note

Invalid UTF-8 sequences are replaced with the Unicode replacement character (U+FFFD) rather than causing an error.