pub struct DeepFinder {}
Expand description
Deep finder class looking for dictionary key in bencoded string.
Perform deep search, by looking for keys in dictionary values (that can be dictionaries itself).
Trait Implementations§
Source§impl RawFinder for DeepFinder
impl RawFinder for DeepFinder
Source§fn find_first(key: &str, arg: &[u8]) -> Option<Vec<u8>>
fn find_first(key: &str, arg: &[u8]) -> Option<Vec<u8>>
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());
Auto Trait Implementations§
impl Freeze for DeepFinder
impl RefUnwindSafe for DeepFinder
impl Send for DeepFinder
impl Sync for DeepFinder
impl Unpin for DeepFinder
impl UnwindSafe for DeepFinder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more