Struct otter_api_tests::GenericSimpleShape [−][src]
pub struct GenericSimpleShape<Desc, Outl> {
pub desc: Desc,
pub edges: IndexVec<FaceId, Html>,
pub edge_width: f64,
pub itemname: String,
pub outline: Outl,
// some fields omitted
}Fields
desc: Descedges: IndexVec<FaceId, Html>edge_width: f64itemname: Stringoutline: OutlImplementations
impl<Desc, Outl> GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait, [src]
impl<Desc, Outl> GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait, [src]pub fn new(
desc: Desc,
outline: Outl,
def_itemname: &str,
common: &SimpleCommon
) -> Result<GenericSimpleShape<Desc, Outl>, SpecError>[src]pub fn svg_piece_raw(
&self,
f: &mut Html,
face: FaceId,
stroke_attrs_hook: &mut dyn FnMut(&mut Html)
) -> Result<(), InternalError>[src]Trait Implementations
impl<Desc, Outl> DerivedDynCast<ConcreteDynCastConfig<dyn OutlineTrait + 'static, dyn OutlineTrait + 'static>, <dyn OutlineTrait + 'static as GetDynCastConfig<dyn OutlineTrait + 'static>>::Config> for GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: OutlineTrait + 'static, [src]
impl<Desc, Outl> DerivedDynCast<ConcreteDynCastConfig<dyn OutlineTrait + 'static, dyn OutlineTrait + 'static>, <dyn OutlineTrait + 'static as GetDynCastConfig<dyn OutlineTrait + 'static>>::Config> for GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: OutlineTrait + 'static, [src]pub fn derived_dyn_cast_ref(
&self
) -> Result<&(dyn OutlineTrait + 'static), &(dyn OutlineTrait + 'static)>[src]
pub fn derived_dyn_cast_ref(
&self
) -> Result<&(dyn OutlineTrait + 'static), &(dyn OutlineTrait + 'static)>[src]Cast a shared reference of this trait object to another trait object.
pub fn derived_dyn_cast_mut(
&mut self
) -> Result<&mut (dyn OutlineTrait + 'static), &mut (dyn OutlineTrait + 'static)>[src]
pub fn derived_dyn_cast_mut(
&mut self
) -> Result<&mut (dyn OutlineTrait + 'static), &mut (dyn OutlineTrait + 'static)>[src]Cast a mutable/unique reference of this trait object to another trait object.
pub fn derived_dyn_cast_boxed(
self: Box<GenericSimpleShape<Desc, Outl>, Global>
) -> Result<Box<dyn OutlineTrait + 'static, Global>, Box<dyn OutlineTrait + 'static, Global>>[src]
pub fn derived_dyn_cast_boxed(
self: Box<GenericSimpleShape<Desc, Outl>, Global>
) -> Result<Box<dyn OutlineTrait + 'static, Global>, Box<dyn OutlineTrait + 'static, Global>>[src]Cast a boxed trait object to another trait object.
pub fn derived_dyn_cast_rc(
self: Rc<GenericSimpleShape<Desc, Outl>>
) -> Result<Rc<dyn OutlineTrait + 'static>, Rc<dyn OutlineTrait + 'static>>[src]
pub fn derived_dyn_cast_rc(
self: Rc<GenericSimpleShape<Desc, Outl>>
) -> Result<Rc<dyn OutlineTrait + 'static>, Rc<dyn OutlineTrait + 'static>>[src]Cast a reference counted trait object to another trait object.
pub fn derived_dyn_cast_arc(
self: Arc<GenericSimpleShape<Desc, Outl>>
) -> Result<Arc<dyn OutlineTrait + 'static>, Arc<dyn OutlineTrait + 'static>>[src]
pub fn derived_dyn_cast_arc(
self: Arc<GenericSimpleShape<Desc, Outl>>
) -> Result<Arc<dyn OutlineTrait + 'static>, Arc<dyn OutlineTrait + 'static>>[src]Cast an atomically reference counted trait object to another trait object.
impl<'de, Desc, Outl> Deserialize<'de> for GenericSimpleShape<Desc, Outl> where
Desc: Deserialize<'de>,
Outl: Deserialize<'de>, [src]
impl<'de, Desc, Outl> Deserialize<'de> for GenericSimpleShape<Desc, Outl> where
Desc: Deserialize<'de>,
Outl: Deserialize<'de>, [src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<GenericSimpleShape<Desc, Outl>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<GenericSimpleShape<Desc, Outl>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl<Desc, Outl> OutlineTrait for GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait, [src]
impl<Desc, Outl> OutlineTrait for GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait, [src]pub fn svg_piece(
&self,
f: &mut Html,
gpc: &GPiece,
_gs: &GameState,
_vpid: VisiblePieceId
) -> Result<(), InternalError>[src]pub fn describe_html(
&self,
gpc: &GPiece,
_goccults: &GameOccults
) -> Result<Html, InternalError>[src]fn add_ui_operations(
&self,
ShowUnocculted,
_upd: &mut Vec<UoDescription, Global>,
_gs: &GameState,
_gpc: &GPiece
) -> Result<(), InternalError>[src]fn ui_operation(
&self,
ShowUnocculted,
_a: ApiPieceOpArgs<'_>,
_opname: &str,
_wrc: WhatResponseToClientOp
) -> Result<(PieceUpdate, Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>), ApiPieceOpError>[src]fn held_change_hook(
&self,
_ig: &InstanceRef,
_gpieces: &mut GPieces,
_piece: PieceId,
_was_held: Option<PlayerId>
) -> Result<Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>, InternalError>[src]
fn held_change_hook(
&self,
_ig: &InstanceRef,
_gpieces: &mut GPieces,
_piece: PieceId,
_was_held: Option<PlayerId>
) -> Result<Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>, InternalError>[src]Piece is responsible for dealing with the possibility that they may be occulted! Read more
fn loaded_hook(
&self,
_piece: PieceId,
_gs: &mut GameState,
_ig: &InstanceRef
) -> Result<(), InternalError>[src]Not called if the whole game is destroyed. You can use Drop of course but it’s not usually much use since you don’t have a reference to the game or anything. Read more
fn occultation_notify_hook(
&self,
_piece: PieceId
) -> Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>[src]impl<Desc, Outl> Serialize for GenericSimpleShape<Desc, Outl> where
Desc: Serialize,
Outl: Serialize, [src]
impl<Desc, Outl> Serialize for GenericSimpleShape<Desc, Outl> where
Desc: Serialize,
Outl: Serialize, [src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl<Desc, Outl> RefUnwindSafe for GenericSimpleShape<Desc, Outl> where
Desc: RefUnwindSafe,
Outl: RefUnwindSafe, impl<Desc, Outl> Send for GenericSimpleShape<Desc, Outl> where
Desc: Send,
Outl: Send, impl<Desc, Outl> Sync for GenericSimpleShape<Desc, Outl> where
Desc: Sync,
Outl: Sync, impl<Desc, Outl> Unpin for GenericSimpleShape<Desc, Outl> where
Desc: Unpin,
Outl: Unpin, impl<Desc, Outl> UnwindSafe for GenericSimpleShape<Desc, Outl> where
Desc: UnwindSafe,
Outl: UnwindSafe, Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
impl<A> DynCastExt for A
impl<A> DynCastExt for Apub fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>,
pub fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>, Use this to cast from one trait object type to another. Read more
pub fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
pub fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>, Use this to upcast a trait to one of its supertraits. Read more
pub fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
T: ?Sized,
A: DynCastExtAdvHelper<F, T>,
F: ?Sized,
pub fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
T: ?Sized,
A: DynCastExtAdvHelper<F, T>,
F: ?Sized, pub fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>,
pub fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>, Use this to cast from one trait object type to another. With this method the type parameter is a config type that uniquely specifies which cast should be preformed. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;[src]pub fn vzip(self) -> V