Trait libimagentrylink::external::ExternalLinker
source · pub trait ExternalLinker: InternalLinker {
fn get_external_links<'a>(&self, store: &'a Store) -> Result<UrlIter<'a>>;
fn set_external_links(
&mut self,
store: &Store,
links: Vec<Url>
) -> Result<Vec<StoreId>>;
fn add_external_link(
&mut self,
store: &Store,
link: Url
) -> Result<Vec<StoreId>>;
fn remove_external_link(
&mut self,
store: &Store,
link: Url
) -> Result<Vec<StoreId>>;
}
Required Methods§
sourcefn get_external_links<'a>(&self, store: &'a Store) -> Result<UrlIter<'a>>
fn get_external_links<'a>(&self, store: &'a Store) -> Result<UrlIter<'a>>
Get the external links from the implementor object
sourcefn set_external_links(
&mut self,
store: &Store,
links: Vec<Url>
) -> Result<Vec<StoreId>>
fn set_external_links(
&mut self,
store: &Store,
links: Vec<Url>
) -> Result<Vec<StoreId>>
Set the external links for the implementor object
Implementations on Foreign Types§
source§impl ExternalLinker for Entry
impl ExternalLinker for Entry
Implement ExternalLinker
for Entry
, hiding the fact that there is no such thing as an external
link in an entry, but internal links to other entries which serve as external links, as one
entry in the store can only have one external link.
source§fn get_external_links<'a>(&self, store: &'a Store) -> Result<UrlIter<'a>>
fn get_external_links<'a>(&self, store: &'a Store) -> Result<UrlIter<'a>>
Get the external links from the implementor object
source§fn set_external_links(
&mut self,
store: &Store,
links: Vec<Url>
) -> Result<Vec<StoreId>>
fn set_external_links(
&mut self,
store: &Store,
links: Vec<Url>
) -> Result<Vec<StoreId>>
Set the external links for the implementor object
Return Value
Returns the StoreIds which were newly created for the new external links, if there are more external links than before. If there are less external links than before, an empty vec![] is returned.
source§fn add_external_link(&mut self, store: &Store, link: Url) -> Result<Vec<StoreId>>
fn add_external_link(&mut self, store: &Store, link: Url) -> Result<Vec<StoreId>>
Add an external link to the implementor object
Return Value
(See ExternalLinker::set_external_links())
Returns the StoreIds which were newly created for the new external links, if there are more external links than before. If there are less external links than before, an empty vec![] is returned.
source§fn remove_external_link(
&mut self,
store: &Store,
link: Url
) -> Result<Vec<StoreId>>
fn remove_external_link(
&mut self,
store: &Store,
link: Url
) -> Result<Vec<StoreId>>
Remove an external link from the implementor object
Return Value
(See ExternalLinker::set_external_links())
Returns the StoreIds which were newly created for the new external links, if there are more external links than before. If there are less external links than before, an empty vec![] is returned.