Trait otter_api_tests::InertPieceTrait
source · [−]pub trait InertPieceTrait: PieceBaseTrait + Serialize + Deserialize {
fn svg(
&self,
f: &mut Html,
id: VisiblePieceId,
face: FaceId,
xdata: &Option<Box<dyn PieceXData + 'static, Global>>
) -> Result<(), InternalError>;
fn describe_html(&self, face: FaceId) -> Result<Html, InternalError>;
}
Required Methods
fn svg(
&self,
f: &mut Html,
id: VisiblePieceId,
face: FaceId,
xdata: &Option<Box<dyn PieceXData + 'static, Global>>
) -> Result<(), InternalError>
fn svg(
&self,
f: &mut Html,
id: VisiblePieceId,
face: FaceId,
xdata: &Option<Box<dyn PieceXData + 'static, Global>>
) -> Result<(), InternalError>
When used for occultated version of another object,
face used is always default, regardless of nfaces.
This is always the case for a piece whose PieceSpec::load
returns Some
for occultation, but which does not provide
a nontrivial PieceSpec::load_inert
.
fn describe_html(&self, face: FaceId) -> Result<Html, InternalError>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Box<dyn InertPieceTrait + 'static, Global>
impl<'de> Deserialize<'de> for Box<dyn InertPieceTrait + 'static, Global>
sourcefn deserialize<D>(
deserializer: D
) -> Result<Box<dyn InertPieceTrait + 'static, Global>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Box<dyn InertPieceTrait + 'static, Global>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'typetag> Serialize for dyn InertPieceTrait + Sync + 'typetag
impl<'typetag> Serialize for dyn InertPieceTrait + Sync + 'typetag
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'typetag> Serialize for dyn InertPieceTrait + Send + 'typetag
impl<'typetag> Serialize for dyn InertPieceTrait + Send + 'typetag
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'typetag> Serialize for dyn InertPieceTrait + 'typetag
impl<'typetag> Serialize for dyn InertPieceTrait + 'typetag
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'typetag> Serialize for dyn InertPieceTrait + Send + Sync + 'typetag
impl<'typetag> Serialize for dyn InertPieceTrait + Send + Sync + 'typetag
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more