/// face used is always default, regardless of nfaces.
fn svg(&self, f: &mut Html, id: VisiblePieceId, face: FaceId,
xdata: &PieceXDataState /* use with care! */) -> Result<(),IE>;
- fn describe_html(&self) -> Result<Html,IE>;
+ fn describe_html(&self, face: FaceId) -> Result<Html,IE>;
}
#[derive(Debug)]
gpc: &GPiece, ipc: &IPiece) -> Html {
match self.instead(ioccults, ipc)? {
Left(y) => ipc.show(y).describe_html(gpc, goccults)?,
- Right(i) => i.describe_html()?,
+ Right(i) => i.describe_html(default())?,
}
}
}
}
#[throws(IE)]
- fn describe_html(&self) -> Html {
+ fn describe_html(&self, _: FaceId) -> Html {
hformat!("a {}", self.desc)
}
}
self.xform.write_svgd(f, &self.svgd)?;
}
#[throws(IE)]
- fn describe_html(&self) -> Html { self.desc.clone() }
+ fn describe_html(&self, _: FaceId) -> Html { self.desc.clone() }
}
#[derive(Debug,Clone,Serialize,Deserialize,Eq,PartialEq,Ord,PartialOrd)]
if let Some(face) = self.faces.get(face) {
face.desc
} else if let Some(back) = &self.back {
- return back.describe_html()?;
+ return back.describe_html(default())?;
} else {
self.faces[0].desc
}
self.svg_face(f, face, id, xdata)?;
}
#[throws(IE)]
- fn describe_html(&self) -> Html {
+ fn describe_html(&self, _: FaceId) -> Html {
self.describe_face(default())?
}
}
let desc = (||{
Ok::<_,IE>(match ipc.show_or_instead(ioccults, y)? {
Left(y) => ipc.show(y).describe_html(gpc, goccults)?,
- Right(instead) => instead.describe_html()?,
+ Right(instead) => instead.describe_html(default())?,
})
})().unwrap_or_else(|e|{
error!("failed to format during logging: {:?}", e);