Trait rdest::RawFinder [−][src]
Dictionary value (raw format) finder in bencoded string.
Required methods
fn find_first(key: &str, arg: &[u8]) -> Option<Vec<u8>>
[src]
Find first value for defined key in bencoded string with dictionaries. Value is returned in raw format.
Implementors
impl RawFinder for DeepFinder
[src]
impl RawFinder for DeepFinder
[src]fn find_first(key: &str, arg: &[u8]) -> Option<Vec<u8>>
[src]
Find first value by specific dictionary key in bencoded string. Look also in dictionary values which may be dictionaries itself. Value is returned in raw foramt.
Example
use rdest::{DeepFinder, RawFinder}; let value = DeepFinder::find_first("1:k", b"d1:k4:spame").unwrap(); assert_eq!(value, b"4:spam".to_vec());