Implement internal::set_links()
This commit is contained in:
parent
950dce945f
commit
a53d36c23d
1 changed files with 4 additions and 1 deletions
|
@ -10,8 +10,11 @@ pub fn get_links(header: &EntryHeader) -> Result<Links> {
|
|||
process_rw_result(header.read("imag.links"))
|
||||
}
|
||||
|
||||
/// Set the links in a header and return the old links, if any.
|
||||
pub fn set_links(header: &mut EntryHeader, links: Links) -> Result<Links> {
|
||||
unimplemented!()
|
||||
let links : Vec<Link> = links.into();
|
||||
let links : Vec<Value> = links.into_iter().map(|link| Value::String(link.into())).collect();
|
||||
process_rw_result(header.set("imag.links", Value::Array(links)))
|
||||
}
|
||||
|
||||
pub fn add_link(header: &mut EntryHeader, link: Link) -> Result<()> {
|
||||
|
|
Loading…
Reference in a new issue