pub struct RegexSplit { /* private fields */ }Expand description
The pieces of one split. Preparing the cursor finds every match; the cursor owns the input’s code points and the match spans, so a caller can draw each piece under its own control.
Implementations§
Source§impl RegexSplit
impl RegexSplit
Sourcepub fn new(
function: &'static str,
arguments: &[Value],
collation: u32,
control: &ProductionControl<'_>,
) -> Result<Option<Self>>
pub fn new( function: &'static str, arguments: &[Value], collation: u32, control: &ProductionControl<'_>, ) -> Result<Option<Self>>
Prepare function(string, pattern [, flags]) for regexp_split_to_table or regexp_split_to_array under the call’s input collation (PostgreSQL’s inputcollid, zero when indeterminate). A NULL argument yields no cursor, as both functions are strict.
§Errors
Reports PostgreSQL’s diagnostics for an invalid flag, the g flag, an invalid collation or pattern and a failed search, an exhausted allowance and cancellation.
Sourcepub fn next_piece(
&mut self,
control: &ProductionControl<'_>,
) -> Result<Option<Produced<Value>>>
pub fn next_piece( &mut self, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Value>>>
The next piece, or None after the last one, build_regexp_split_result.
§Errors
Reports an exhausted allowance or cancellation. The cursor stays before the failed piece, and pieces already returned remain valid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegexSplit
impl RefUnwindSafe for RegexSplit
impl Send for RegexSplit
impl Sync for RegexSplit
impl Unpin for RegexSplit
impl UnsafeUnpin for RegexSplit
impl UnwindSafe for RegexSplit
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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