pub struct FindReplaceParams {
pub notes: Vec<i64>,
pub action: Option<String>,
pub model_name: String,
pub field_name: String,
pub find_text: String,
pub replace_text: String,
pub regex: Option<bool>,
pub match_case: Option<bool>,
}Expand description
Parameters for find and replace in models.
Fields§
§notes: Vec<i64>Notes to search in (empty for all notes).
action: Option<String>Action (usually “findAndReplaceInModels”).
model_name: StringModel name.
field_name: StringField name.
find_text: StringSearch pattern.
replace_text: StringReplacement text.
regex: Option<bool>Use regex.
match_case: Option<bool>Match case.
Implementations§
Source§impl FindReplaceParams
impl FindReplaceParams
Sourcepub fn new(
model_name: impl Into<String>,
field_name: impl Into<String>,
find: impl Into<String>,
replace: impl Into<String>,
) -> FindReplaceParams
pub fn new( model_name: impl Into<String>, field_name: impl Into<String>, find: impl Into<String>, replace: impl Into<String>, ) -> FindReplaceParams
Create new find and replace parameters.
Sourcepub fn notes(self, notes: Vec<i64>) -> FindReplaceParams
pub fn notes(self, notes: Vec<i64>) -> FindReplaceParams
Limit to specific notes.
Sourcepub fn regex(self, enabled: bool) -> FindReplaceParams
pub fn regex(self, enabled: bool) -> FindReplaceParams
Enable regex matching.
Sourcepub fn match_case(self, enabled: bool) -> FindReplaceParams
pub fn match_case(self, enabled: bool) -> FindReplaceParams
Enable case-sensitive matching.
Trait Implementations§
Source§impl Clone for FindReplaceParams
impl Clone for FindReplaceParams
Source§fn clone(&self) -> FindReplaceParams
fn clone(&self) -> FindReplaceParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FindReplaceParams
impl Debug for FindReplaceParams
Source§impl Serialize for FindReplaceParams
impl Serialize for FindReplaceParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for FindReplaceParams
impl RefUnwindSafe for FindReplaceParams
impl Send for FindReplaceParams
impl Sync for FindReplaceParams
impl Unpin for FindReplaceParams
impl UnwindSafe for FindReplaceParams
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