pub struct RegularPolygon(pub Arc<RegularPolygon>);Expand description
Elicitation-enabled wrapper around bevy::math::primitives::RegularPolygon.
This newtype uses Arc internally to ensure Clone is always available,
providing transparent access via Deref and DerefMut.
Tuple Fields§
§0: Arc<RegularPolygon>Implementations§
Source§impl RegularPolygon
impl RegularPolygon
Sourcepub fn circumradius(&self) -> f32
pub fn circumradius(&self) -> f32
Circumradius (radius of circumscribed circle).
Sourcepub fn regular_polygon_new(
&self,
sides: u32,
circumradius: f32,
) -> RegularPolygon
pub fn regular_polygon_new( &self, sides: u32, circumradius: f32, ) -> RegularPolygon
Constructs from sides and circumradius (ignores self).
Source§impl RegularPolygon
impl RegularPolygon
Sourcepub fn sides_tool_tool_attr() -> Tool
pub fn sides_tool_tool_attr() -> Tool
Generated tool metadata function for sides_tool
Sourcepub fn circumradius_tool_tool_attr() -> Tool
pub fn circumradius_tool_tool_attr() -> Tool
Generated tool metadata function for circumradius_tool
Sourcepub fn circumradius_tool(&self) -> Result<Json<f32>, ErrorData>
pub fn circumradius_tool(&self) -> Result<Json<f32>, ErrorData>
circumradius MCP tool wrapper method.
Sourcepub fn regular_polygon_new_tool_tool_attr() -> Tool
pub fn regular_polygon_new_tool_tool_attr() -> Tool
Generated tool metadata function for regular_polygon_new_tool
Sourcepub fn regular_polygon_new_tool(
&self,
params: Parameters<RegularPolygonNewParams>,
) -> Result<Json<RegularPolygon>, ErrorData>
pub fn regular_polygon_new_tool( &self, params: Parameters<RegularPolygonNewParams>, ) -> Result<Json<RegularPolygon>, ErrorData>
regular_polygon_new MCP tool wrapper method.
Methods from Deref<Target = RegularPolygon>§
Sourcepub fn circumradius(&self) -> f32
pub fn circumradius(&self) -> f32
Get the radius of the circumcircle on which all vertices of the regular polygon lie
Sourcepub fn inradius(&self) -> f32
pub fn inradius(&self) -> f32
Get the inradius or apothem of the regular polygon. This is the radius of the largest circle that can be drawn within the polygon
Sourcepub fn side_length(&self) -> f32
pub fn side_length(&self) -> f32
Get the length of one side of the regular polygon
Sourcepub fn internal_angle_degrees(&self) -> f32
pub fn internal_angle_degrees(&self) -> f32
Get the internal angle of the regular polygon in degrees.
This is the angle formed by two adjacent sides with points within the angle being in the interior of the polygon
Sourcepub fn internal_angle_radians(&self) -> f32
pub fn internal_angle_radians(&self) -> f32
Get the internal angle of the regular polygon in radians.
This is the angle formed by two adjacent sides with points within the angle being in the interior of the polygon
Sourcepub fn external_angle_degrees(&self) -> f32
pub fn external_angle_degrees(&self) -> f32
Get the external angle of the regular polygon in degrees.
This is the angle formed by two adjacent sides with points within the angle being in the exterior of the polygon
Sourcepub fn external_angle_radians(&self) -> f32
pub fn external_angle_radians(&self) -> f32
Get the external angle of the regular polygon in radians.
This is the angle formed by two adjacent sides with points within the angle being in the exterior of the polygon
Trait Implementations§
Source§impl AsRef<RegularPolygon> for RegularPolygon
impl AsRef<RegularPolygon> for RegularPolygon
Source§fn as_ref(&self) -> &RegularPolygon
fn as_ref(&self) -> &RegularPolygon
Source§impl Clone for RegularPolygon
impl Clone for RegularPolygon
Source§fn clone(&self) -> RegularPolygon
fn clone(&self) -> RegularPolygon
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegularPolygon
impl Debug for RegularPolygon
Source§impl Deref for RegularPolygon
impl Deref for RegularPolygon
Source§impl DerefMut for RegularPolygon
impl DerefMut for RegularPolygon
Source§impl<'de> Deserialize<'de> for RegularPolygon
impl<'de> Deserialize<'de> for RegularPolygon
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl ElicitComplete for RegularPolygon
impl ElicitComplete for RegularPolygon
Source§fn validate_proofs_non_empty() -> bool
fn validate_proofs_non_empty() -> bool
Source§fn kani_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
fn kani_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
Inner’s Kani proof? Read moreSource§fn verus_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
fn verus_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
Inner’s Verus proof?Source§fn creusot_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
fn creusot_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
Inner’s Creusot proof?Source§impl ElicitIntrospect for RegularPolygon
impl ElicitIntrospect for RegularPolygon
Source§fn pattern() -> ElicitationPattern
fn pattern() -> ElicitationPattern
Source§fn metadata() -> TypeMetadata
fn metadata() -> TypeMetadata
Source§impl ElicitPromptTree for RegularPolygon
impl ElicitPromptTree for RegularPolygon
Source§fn prompt_tree() -> PromptTree
fn prompt_tree() -> PromptTree
Source§fn assembled_prompts() -> Vec<AssembledPrompt>
fn assembled_prompts() -> Vec<AssembledPrompt>
Source§impl ElicitSpec for RegularPolygon
impl ElicitSpec for RegularPolygon
Source§impl Elicitation for RegularPolygon
impl Elicitation for RegularPolygon
Source§async fn elicit<C: ElicitCommunicator>(_communicator: &C) -> ElicitResult<Self>
async fn elicit<C: ElicitCommunicator>(_communicator: &C) -> ElicitResult<Self>
Source§fn kani_proof() -> TokenStream
fn kani_proof() -> TokenStream
Source§fn verus_proof() -> TokenStream
fn verus_proof() -> TokenStream
proc_macro2::TokenStream containing a Verus-verified function
with requires/ensures specifications for this type’s invariants. Read moreSource§fn creusot_proof() -> TokenStream
fn creusot_proof() -> TokenStream
proc_macro2::TokenStream containing Creusot contract functions
with #[requires]/#[ensures]/#[trusted] attributes for this type’s invariants. Read moreSource§fn elicit_checked(
peer: Peer<RoleServer>,
) -> impl Future<Output = Result<Self, ElicitError>> + Send
fn elicit_checked( peer: Peer<RoleServer>, ) -> impl Future<Output = Result<Self, ElicitError>> + Send
Source§fn with_style(style: Self::Style) -> ElicitBuilder<Self>
fn with_style(style: Self::Style) -> ElicitBuilder<Self>
Source§fn elicit_proven<C>(
communicator: &C,
) -> impl Future<Output = Result<(Self, Established<Is<Self>>), ElicitError>> + Sendwhere
C: ElicitCommunicator,
fn elicit_proven<C>(
communicator: &C,
) -> impl Future<Output = Result<(Self, Established<Is<Self>>), ElicitError>> + Sendwhere
C: ElicitCommunicator,
Source§fn prusti_proof() -> TokenStream
fn prusti_proof() -> TokenStream
proc_macro2::TokenStream containing Prusti contract functions
with #[requires]/#[ensures] attributes for this type’s invariants. Read moreimpl Eq for RegularPolygon
Source§impl From<Arc<RegularPolygon>> for RegularPolygon
impl From<Arc<RegularPolygon>> for RegularPolygon
Source§fn from(arc: Arc<RegularPolygon>) -> Self
fn from(arc: Arc<RegularPolygon>) -> Self
Source§impl From<RegularPolygon> for Arc<RegularPolygon>
impl From<RegularPolygon> for Arc<RegularPolygon>
Source§fn from(wrapper: RegularPolygon) -> Self
fn from(wrapper: RegularPolygon) -> Self
Source§impl From<RegularPolygon> for RegularPolygon
impl From<RegularPolygon> for RegularPolygon
Source§fn from(inner: RegularPolygon) -> Self
fn from(inner: RegularPolygon) -> Self
Source§impl From<RegularPolygon> for RegularPolygon
impl From<RegularPolygon> for RegularPolygon
Source§fn from(v: RegularPolygon) -> Self
fn from(v: RegularPolygon) -> Self
Source§impl JsonSchema for RegularPolygon
impl JsonSchema for RegularPolygon
Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for RegularPolygon
impl PartialEq for RegularPolygon
Source§impl Prompt for RegularPolygon
impl Prompt for RegularPolygon
Source§impl Serialize for RegularPolygon
impl Serialize for RegularPolygon
Source§impl ToCodeLiteral for RegularPolygon
impl ToCodeLiteral for RegularPolygon
Source§fn to_code_literal(&self) -> TokenStream
fn to_code_literal(&self) -> TokenStream
TokenStream containing a single Rust expression whose
evaluation produces a value equal to self.Source§fn type_tokens() -> TokenStreamwhere
Self: Sized,
fn type_tokens() -> TokenStreamwhere
Self: Sized,
None::<T>). Read moreAuto Trait Implementations§
impl Freeze for RegularPolygon
impl RefUnwindSafe for RegularPolygon
impl Send for RegularPolygon
impl Sync for RegularPolygon
impl Unpin for RegularPolygon
impl UnsafeUnpin for RegularPolygon
impl UnwindSafe for RegularPolygon
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<T> ElicitJson for T
impl<T> ElicitJson for T
Source§async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>where
C: ElicitCommunicator,
async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>where
C: ElicitCommunicator,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more