pub trait BookmarkSource: Send + Sync {
// Required methods
fn kind(&self) -> SourceKind;
fn list(&self) -> Result<Vec<Bookmark>, CoreError>;
fn list_paginated(
&self,
cursor: Option<String>,
limit: usize,
) -> Result<Page, CoreError>;
fn by_canonical(
&self,
canonical: &str,
) -> Result<Option<Bookmark>, CoreError>;
}Expand description
Read-side trait. Implemented by every bridge.
Required Methods§
Sourcefn kind(&self) -> SourceKind
fn kind(&self) -> SourceKind
What kind of source this is.
Sourcefn list(&self) -> Result<Vec<Bookmark>, CoreError>
fn list(&self) -> Result<Vec<Bookmark>, CoreError>
List all bookmarks. May be expensive for large stores; prefer
list_paginated for production reads.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".