pub struct NoteStore(/* private fields */);Implementations§
Source§impl NoteStore
impl NoteStore
Sourcepub fn upsert_file(&self, input: NoteFileInput) -> Result<WriteReceipt<Note>>
pub fn upsert_file(&self, input: NoteFileInput) -> Result<WriteReceipt<Note>>
读文件后同步一篇笔记:正文取文件原文,标题取文件名(去扩展名),路径即身份。 监听与对账在使用方;库只按给定路径处理这一个文件。
Sourcepub fn set_root(&self, namespace: &str, root: &str) -> Result<()>
pub fn set_root(&self, namespace: &str, root: &str) -> Result<()>
登记该知识领域的笔记根目录。登记之后写入的笔记路径必须是它的子路径: 库里存相对路径,相对路径按段拆出的标签挂到这篇的每一条切片上。
pub fn get(&self, id: i64, filter: &ReadFilter) -> Result<Note>
pub fn list(&self, page: &PageRequest) -> Result<Page<Note>>
pub fn get_chunk(&self, id: i64, filter: &ReadFilter) -> Result<Chunk>
pub fn chunks(&self, note_id: i64, filter: &ReadFilter) -> Result<Vec<Chunk>>
pub fn delete(&self, id: i64, filter: &ReadFilter) -> Result<WriteReceipt<bool>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NoteStore
impl !UnwindSafe for NoteStore
impl Freeze for NoteStore
impl Send for NoteStore
impl Sync for NoteStore
impl Unpin for NoteStore
impl UnsafeUnpin for NoteStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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