Struct otter_api_tests::shapelib::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: Desc
edges: IndexVec<FaceId, Html>
edge_width: f64
itemname: String
outline: Outl
Implementations
impl<Desc, Outl> GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait,
[src]
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait,
pub fn count_faces(&self) -> usize
[src]
pub fn itemname(&self) -> &str
[src]
pub fn new(
desc: Desc,
outline: Outl,
def_itemname: &str,
common: &SimpleCommon
) -> Result<GenericSimpleShape<Desc, Outl>, SpecError>
[src]
desc: Desc,
outline: Outl,
def_itemname: &str,
common: &SimpleCommon
) -> Result<GenericSimpleShape<Desc, Outl>, SpecError>
pub fn svg_piece_raw(
&self,
f: &mut Html,
face: FaceId,
stroke_attrs_hook: &mut dyn FnMut(&mut Html)
) -> Result<(), InternalError>
[src]
&self,
f: &mut Html,
face: FaceId,
stroke_attrs_hook: &mut dyn FnMut(&mut Html)
) -> Result<(), InternalError>
Trait Implementations
impl<Desc, Outl> Debug for GenericSimpleShape<Desc, Outl> where
Desc: Debug,
Outl: Debug,
[src]
Desc: Debug,
Outl: Debug,
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]
Desc: Debug + Send + Sync + 'static,
Outl: OutlineTrait + 'static,
pub fn derived_dyn_cast_ref(
&self
) -> Result<&(dyn OutlineTrait + 'static), &(dyn OutlineTrait + 'static)>
[src]
&self
) -> Result<&(dyn OutlineTrait + 'static), &(dyn OutlineTrait + 'static)>
pub fn derived_dyn_cast_mut(
&mut self
) -> Result<&mut (dyn OutlineTrait + 'static), &mut (dyn OutlineTrait + 'static)>
[src]
&mut self
) -> Result<&mut (dyn OutlineTrait + 'static), &mut (dyn OutlineTrait + 'static)>
pub fn derived_dyn_cast_boxed(
self: Box<GenericSimpleShape<Desc, Outl>, Global>
) -> Result<Box<dyn OutlineTrait + 'static, Global>, Box<dyn OutlineTrait + 'static, Global>>
[src]
self: Box<GenericSimpleShape<Desc, Outl>, Global>
) -> Result<Box<dyn OutlineTrait + 'static, Global>, Box<dyn OutlineTrait + 'static, Global>>
pub fn derived_dyn_cast_rc(
self: Rc<GenericSimpleShape<Desc, Outl>>
) -> Result<Rc<dyn OutlineTrait + 'static>, Rc<dyn OutlineTrait + 'static>>
[src]
self: Rc<GenericSimpleShape<Desc, Outl>>
) -> Result<Rc<dyn OutlineTrait + 'static>, Rc<dyn OutlineTrait + 'static>>
pub fn derived_dyn_cast_arc(
self: Arc<GenericSimpleShape<Desc, Outl>>
) -> Result<Arc<dyn OutlineTrait + 'static>, Arc<dyn OutlineTrait + 'static>>
[src]
self: Arc<GenericSimpleShape<Desc, Outl>>
) -> Result<Arc<dyn OutlineTrait + 'static>, Arc<dyn OutlineTrait + 'static>>
impl<'de, Desc, Outl> Deserialize<'de> for GenericSimpleShape<Desc, Outl> where
Desc: Deserialize<'de>,
Outl: Deserialize<'de>,
[src]
Desc: Deserialize<'de>,
Outl: Deserialize<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<GenericSimpleShape<Desc, Outl>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<GenericSimpleShape<Desc, Outl>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<Desc, Outl> OutlineTrait for GenericSimpleShape<Desc, Outl> where
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait,
[src]
Desc: Debug + Send + Sync + 'static,
Outl: 'static + OutlineTrait,
pub fn outline_path(&self, scale: f64) -> Result<Html, InternalError>
[src]
pub fn thresh_dragraise(&self) -> Result<Option<i32>, InternalError>
[src]
pub fn bbox_approx(&self) -> Result<RectC<i32>, InternalError>
[src]
pub fn surround_path(&self) -> Result<Html, InternalError>
[src]
impl PieceTrait for GenericSimpleShape<Html, Outline>
[src]
pub fn svg_piece(
&self,
f: &mut Html,
gpc: &GPiece,
_gs: &GameState,
_vpid: VisiblePieceId
) -> Result<(), InternalError>
[src]
&self,
f: &mut Html,
gpc: &GPiece,
_gs: &GameState,
_vpid: VisiblePieceId
) -> Result<(), InternalError>
pub fn describe_html(
&self,
gpc: &GPiece,
_goccults: &GameOccults
) -> Result<Html, InternalError>
[src]
&self,
gpc: &GPiece,
_goccults: &GameOccults
) -> Result<Html, InternalError>
pub fn nfaces(&self) -> u8
[src]
pub fn itemname(&self) -> &str
[src]
pub fn add_ui_operations(
&self,
ShowUnocculted,
_upd: &mut Vec<UoDescription, Global>,
_gs: &GameState,
_gpc: &GPiece
) -> Result<(), InternalError>
[src]
&self,
ShowUnocculted,
_upd: &mut Vec<UoDescription, Global>,
_gs: &GameState,
_gpc: &GPiece
) -> Result<(), InternalError>
pub fn ui_operation(
&self,
ShowUnocculted,
_a: ApiPieceOpArgs<'_>,
_opname: &str,
_wrc: WhatResponseToClientOp
) -> Result<(PieceUpdate, Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>), ApiPieceOpError>
[src]
&self,
ShowUnocculted,
_a: ApiPieceOpArgs<'_>,
_opname: &str,
_wrc: WhatResponseToClientOp
) -> Result<(PieceUpdate, Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>), ApiPieceOpError>
pub 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]
&self,
_ig: &InstanceRef,
_gpieces: &mut GPieces,
_piece: PieceId,
_was_held: Option<PlayerId>
) -> Result<Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>, InternalError>
pub fn loaded_hook(
&self,
_piece: PieceId,
_gs: &mut GameState,
_ig: &InstanceRef
) -> Result<(), InternalError>
[src]
&self,
_piece: PieceId,
_gs: &mut GameState,
_ig: &InstanceRef
) -> Result<(), InternalError>
pub fn delete_hook(
&self,
_p: &GPiece,
_gs: &mut GameState
) -> ExecuteGameChangeUpdates
[src]
&self,
_p: &GPiece,
_gs: &mut GameState
) -> ExecuteGameChangeUpdates
pub fn sortkey(&self) -> Option<&str>
[src]
pub fn occultation_notify_hook(
&self,
_piece: PieceId
) -> Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>
[src]
&self,
_piece: PieceId
) -> Option<Box<dyn FnOnce(&'r mut PrepareUpdatesBuffer<'_>) + 'static, Global>>
pub fn abs_bbox(&self, p: &GPiece) -> Result<RectC<i32>, InternalError>
[src]
impl<Desc, Outl> Serialize for GenericSimpleShape<Desc, Outl> where
Desc: Serialize,
Outl: Serialize,
[src]
Desc: Serialize,
Outl: Serialize,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Auto Trait Implementations
impl<Desc, Outl> RefUnwindSafe for GenericSimpleShape<Desc, Outl> where
Desc: RefUnwindSafe,
Outl: RefUnwindSafe,
Desc: RefUnwindSafe,
Outl: RefUnwindSafe,
impl<Desc, Outl> Send for GenericSimpleShape<Desc, Outl> where
Desc: Send,
Outl: Send,
Desc: Send,
Outl: Send,
impl<Desc, Outl> Sync for GenericSimpleShape<Desc, Outl> where
Desc: Sync,
Outl: Sync,
Desc: Sync,
Outl: Sync,
impl<Desc, Outl> Unpin for GenericSimpleShape<Desc, Outl> where
Desc: Unpin,
Outl: Unpin,
Desc: Unpin,
Outl: Unpin,
impl<Desc, Outl> UnwindSafe for GenericSimpleShape<Desc, Outl> where
Desc: UnwindSafe,
Outl: UnwindSafe,
Desc: UnwindSafe,
Outl: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
T: Any,
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<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
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<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<A> DynCastExt for A
pub fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>,
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>,
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>,
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
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,
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>,
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>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,