Struct jtd_infer::HintSet [−][src]
A set of paths to parts of the input that are subject to a hint in
Hints
.
Implementations
impl<'a> HintSet<'a>
[src]
pub fn new(values: Vec<&'a [String]>) -> Self
[src]
Constructs a new HintSet
.
Each element of values
is a separate "path". Each element of a path is
treated as a path "segment". So, for example, this:
use jtd_infer::HintSet; let path1 = vec!["foo".to_string(), "bar".to_string()]; let path2 = vec!["baz".to_string()]; HintSet::new(vec![&path1, &path2]);
Creates a set of paths pointing to /foo/bar
and /baz
in an input.
The -
path segment value is special, and acts as a wildcard, matching
any property name. It also matches array elements, unlike ordinary path
segments.
Auto Trait Implementations
impl<'a> RefUnwindSafe for HintSet<'a>
[src]
impl<'a> Send for HintSet<'a>
[src]
impl<'a> Sync for HintSet<'a>
[src]
impl<'a> Unpin for HintSet<'a>
[src]
impl<'a> UnwindSafe for HintSet<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,