File tree Expand file tree Collapse file tree 1 file changed +26
-7
lines changed
Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -1507,22 +1507,41 @@ impl Description {
15071507
15081508
15091509pub struct Links {
1510- links : StdVec < StdRc < StdBox < str > > > ,
1510+ links : EntitiesOwned < Link > ,
15111511}
15121512
15131513
15141514impl Links {
15151515
15161516 #[ cfg_attr ( feature = "vonuvoli_inline" , inline ) ]
1517- pub fn new ( links : StdVec < StdRc < StdBox < str > > > ) -> ( Links ) {
1518- return Links {
1519- links : links,
1520- } ;
1517+ pub fn links ( & self ) -> ( impl iter:: Iterator < Item = & Link > ) {
1518+ return self . links . entities ( ) ;
15211519 }
15221520
15231521 #[ cfg_attr ( feature = "vonuvoli_inline" , inline ) ]
1524- pub fn links ( & self ) -> ( impl iter:: Iterator < Item = & str > ) {
1525- return self . links . iter ( ) . map ( StdRc :: deref) . map ( StdBox :: deref) ;
1522+ pub fn link_resolve ( & self , identifier : & str ) -> ( Option < & Link > ) {
1523+ return self . links . entity_resolve ( identifier) ;
1524+ }
1525+
1526+ #[ cfg_attr ( feature = "vonuvoli_inline" , inline ) ]
1527+ pub fn has_links ( & self ) -> ( bool ) {
1528+ return self . links . has_entities ( ) ;
1529+ }
1530+ }
1531+
1532+
1533+
1534+
1535+ pub struct Link {
1536+ identifier : StdRc < StdBox < str > > ,
1537+ // FIXME: ...
1538+ }
1539+
1540+ impl Entity for Link {
1541+
1542+ #[ cfg_attr ( feature = "vonuvoli_inline" , inline ) ]
1543+ fn identifier_rc_ref ( & self ) -> ( & StdRc < StdBox < str > > ) {
1544+ return & self . identifier ;
15261545 }
15271546}
15281547
You can’t perform that action at this time.
0 commit comments