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 {
1507
1507
1508
1508
1509
1509
pub struct Links {
1510
- links : StdVec < StdRc < StdBox < str > > > ,
1510
+ links : EntitiesOwned < Link > ,
1511
1511
}
1512
1512
1513
1513
1514
1514
impl Links {
1515
1515
1516
1516
#[ 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 ( ) ;
1521
1519
}
1522
1520
1523
1521
#[ 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 ;
1526
1545
}
1527
1546
}
1528
1547
You can’t perform that action at this time.
0 commit comments