Skip to main content

BookmarkSink

Trait BookmarkSink 

Source
pub trait BookmarkSink: Send + Sync {
    // Required methods
    fn kind(&self) -> SourceKind;
    fn write(
        &mut self,
        bookmarks: &[Bookmark],
    ) -> Result<WriteReport, CoreError>;
    fn delete(&mut self, external_id: &str) -> Result<(), CoreError>;
}
Expand description

Write-side trait. Implemented by sinks (Netscape HTML, server).

Required Methods§

Source

fn kind(&self) -> SourceKind

What kind of sink this is.

Source

fn write(&mut self, bookmarks: &[Bookmark]) -> Result<WriteReport, CoreError>

Write a batch of bookmarks. Returns a report; non-fatal failures are listed in WriteReport::failed.

Source

fn delete(&mut self, external_id: &str) -> Result<(), CoreError>

Delete a bookmark by external identifier.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§