pub struct NotePatch {
pub name: Option<Option<String>>,
pub content: Option<String>,
pub salience: Option<Option<f64>>,
pub decay_factor: Option<Option<f64>>,
pub properties: Option<Value>,
pub write_options: NoteWriteOptions,
/* private fields */
}Expand description
Patch for update_note. Only Some(_) fields are applied; None means “leave unchanged”.
For salience/decay_factor:
None(outer) — leave unchangedSome(None)— clear the valueSome(Some(v))— set to v
Fields§
§name: Option<Option<String>>§content: Option<String>§salience: Option<Option<f64>>§decay_factor: Option<Option<f64>>§properties: Option<Value>§write_options: NoteWriteOptionsImplementations§
Source§impl NotePatch
impl NotePatch
Sourcepub fn new(
name: Option<Option<String>>,
content: Option<String>,
salience: Option<Option<f64>>,
decay_factor: Option<Option<f64>>,
properties: Option<Value>,
) -> Self
pub fn new( name: Option<Option<String>>, content: Option<String>, salience: Option<Option<f64>>, decay_factor: Option<Option<f64>>, properties: Option<Value>, ) -> Self
Construct a NotePatch from the public fields only.
Use this from external crates; kind_status is set to None.
pub fn with_write_options(self, options: NoteWriteOptions) -> Self
Sourcepub fn with_update_policy(self, policy: NoteUpdatePolicy) -> Self
pub fn with_update_policy(self, policy: NoteUpdatePolicy) -> Self
Apply the owning kind’s policy returned by validated hook preparation. This is not a caller-facing property-deletion parameter.
Trait Implementations§
Auto Trait Implementations§
impl Forget for NotePatch
impl Freeze for NotePatchwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<NoteFence>: Freeze,
&'static [&'static str]: Freeze,
impl Move for NotePatch
impl RefUnwindSafe for NotePatch
impl Send for NotePatch
impl Sync for NotePatch
impl Unpin for NotePatch
impl UnsafeUnpin for NotePatchwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<NoteFence>: UnsafeUnpin,
&'static [&'static str]: UnsafeUnpin,
impl UnwindSafe for NotePatchwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
&'static [&'static str]: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more