pub struct Json { /* private fields */ }Expand description
Json Response
Implementations§
Source§impl Json
impl Json
Sourcepub fn select<T: DeserializeOwned>(&self, path: &str) -> Result<Vec<T>>
pub fn select<T: DeserializeOwned>(&self, path: &str) -> Result<Vec<T>>
Use jsonpath to select json fragments and convert them into structures
Sourcepub fn select_one<T: DeserializeOwned>(&self, path: &str) -> Result<T>
pub fn select_one<T: DeserializeOwned>(&self, path: &str) -> Result<T>
Use jsonpath to select json string fields
Sourcepub fn select_as_str(&self, path: &str) -> Result<String>
pub fn select_as_str(&self, path: &str) -> Result<String>
Use jsonpath to select json fields as string
Sourcepub fn select_one_as_str(&self, path: &str) -> Result<String>
pub fn select_one_as_str(&self, path: &str) -> Result<String>
Use jsonpath to select one json fields as string
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Json
impl RefUnwindSafe for Json
impl Send for Json
impl Sync for Json
impl Unpin for Json
impl UnwindSafe for Json
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more