pub struct JsonCrawlerBorrowed<'a> { /* private fields */ }
Trait Implementations§
Source§impl<'a> JsonCrawler for JsonCrawlerBorrowed<'a>
impl<'a> JsonCrawler for JsonCrawlerBorrowed<'a>
type BorrowTo<'b> = JsonCrawlerBorrowed<'b> where Self: 'b
type IterMut<'b> = JsonCrawlerArrayIterMut<'b> where Self: 'b
type IntoIter = JsonCrawlerArrayIterMut<'a>
fn take_value_pointer<T: DeserializeOwned>( &mut self, path: impl AsRef<str>, ) -> CrawlerResult<T>
fn borrow_pointer( &mut self, path: impl AsRef<str>, ) -> CrawlerResult<Self::BorrowTo<'_>>
fn try_into_iter(self) -> CrawlerResult<Self::IntoIter>
fn try_iter_mut(&mut self) -> CrawlerResult<Self::IterMut<'_>>
fn borrow_index(&mut self, index: usize) -> CrawlerResult<Self::BorrowTo<'_>>
fn borrow_mut(&mut self) -> Self::BorrowTo<'_>
fn get_path(&self) -> String
fn take_value<T: DeserializeOwned>(&mut self) -> CrawlerResult<T>
Source§fn take_value_pointers<T: DeserializeOwned, S: AsRef<str>>(
&mut self,
paths: &[S],
) -> CrawlerResult<T>
fn take_value_pointers<T: DeserializeOwned, S: AsRef<str>>( &mut self, paths: &[S], ) -> CrawlerResult<T>
For use when you want to try and take value that could be at multiple
valid locations. Returns an error message that notes that all valid
locations were attempted. Read more
fn borrow_value<T: for<'de> Deserialize<'de>>(&self) -> CrawlerResult<T>
fn borrow_value_pointer<T: for<'de> Deserialize<'de>>( &self, path: impl AsRef<str>, ) -> CrawlerResult<T>
fn path_exists(&self, path: &str) -> bool
fn get_source(&self) -> Arc<String>
Source§fn try_expect<F, O>(&mut self, msg: impl ToString, f: F) -> CrawlerResult<O>
fn try_expect<F, O>(&mut self, msg: impl ToString, f: F) -> CrawlerResult<O>
For use when you want to apply some operations that return Option, but
still return an error with context if they fail. For convenience,
closure return type is fallible, allowing you to see the cause of the
error at the failure point as well, if you have it. Read more
Source§fn take_and_parse_str<F: FromStr>(&mut self) -> CrawlerResult<F>
fn take_and_parse_str<F: FromStr>(&mut self) -> CrawlerResult<F>
Take the value as a String, and apply FromStr to return the desired
type.
Source§fn try_functions<O>(
&mut self,
functions: Vec<fn(&mut Self) -> CrawlerResult<O>>,
) -> CrawlerResult<O>
fn try_functions<O>( &mut self, functions: Vec<fn(&mut Self) -> CrawlerResult<O>>, ) -> CrawlerResult<O>
Try to apply each function in a list of functions, returning the first
Ok result, or the last Err result if none returned Ok. Read more
Auto Trait Implementations§
impl<'a> Freeze for JsonCrawlerBorrowed<'a>
impl<'a> RefUnwindSafe for JsonCrawlerBorrowed<'a>
impl<'a> Send for JsonCrawlerBorrowed<'a>
impl<'a> Sync for JsonCrawlerBorrowed<'a>
impl<'a> Unpin for JsonCrawlerBorrowed<'a>
impl<'a> !UnwindSafe for JsonCrawlerBorrowed<'a>
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