Struct beans::regex::CompiledRegex

source ·
pub struct CompiledRegex { /* private fields */ }
Expand description

Summary

CompiledRegex represents a regex that has already been processed. Since it is not supposed to be built directly, there is no way to do so. Instead, use the RegexBuilder. Keep in mind that the compilation time might be more expensive than matching time, especially if you match short inputs against a lot of regex, so you should always reuse a compiled regex when possible. To match a regex against a given input, do regex.find(input).

Method

find: match against a given input

Implementations§

Match against a given input. Will return only one match, if many were possibles, according to the priority rules.

Trait Implementations§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.