Struct pact_consumer::patterns::Like
source · pub struct Like<Nested: Pattern> { /* private fields */ }
Expand description
Match values based on their data types.
Implementations§
Trait Implementations§
source§impl From<Like<JsonPattern>> for JsonPattern
impl From<Like<JsonPattern>> for JsonPattern
source§fn from(pattern: Like<JsonPattern>) -> Self
fn from(pattern: Like<JsonPattern>) -> Self
Converts to this type from the input type.
source§impl From<Like<StringPattern>> for StringPattern
impl From<Like<StringPattern>> for StringPattern
source§fn from(pattern: Like<StringPattern>) -> Self
fn from(pattern: Like<StringPattern>) -> Self
Converts to this type from the input type.
source§impl<Nested: Pattern> Pattern for Like<Nested>
impl<Nested: Pattern> Pattern for Like<Nested>
§type Matches = <Nested as Pattern>::Matches
type Matches = <Nested as Pattern>::Matches
What type of data can this pattern be matched against? What kind of
example data does it generate?
source§fn to_example(&self) -> Self::Matches
fn to_example(&self) -> Self::Matches
Convert this
Matchable
into an example data value, stripping out
any special match rules.source§fn to_example_bytes(&self) -> Vec<u8> ⓘ
fn to_example_bytes(&self) -> Vec<u8> ⓘ
Convert this
Matchable
into an example data value as byte slice.source§fn extract_matching_rules(
&self,
path: DocPath,
rules_out: &mut MatchingRuleCategory,
)
fn extract_matching_rules( &self, path: DocPath, rules_out: &mut MatchingRuleCategory, )
Extract the matching rules from this
Matchable
, and insert them into
rules_out
, using path
as the base path. Read moreAuto Trait Implementations§
impl<Nested> Freeze for Like<Nested>where
Nested: Freeze,
impl<Nested> RefUnwindSafe for Like<Nested>where
Nested: RefUnwindSafe,
impl<Nested> Send for Like<Nested>where
Nested: Send,
impl<Nested> Sync for Like<Nested>where
Nested: Sync,
impl<Nested> Unpin for Like<Nested>where
Nested: Unpin,
impl<Nested> UnwindSafe for Like<Nested>where
Nested: UnwindSafe,
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request