pub struct Rectangle(pub Arc<Rectangle>);Expand description
Elicitation-enabled wrapper around bevy::math::primitives::Rectangle.
This newtype uses Arc internally to ensure Clone is always available,
providing transparent access via Deref and DerefMut.
Tuple Fields§
§0: Arc<Rectangle>Implementations§
Source§impl Rectangle
impl Rectangle
Sourcepub fn rectangle_half_size_x(&self) -> f32
pub fn rectangle_half_size_x(&self) -> f32
Half-width.
Sourcepub fn rectangle_half_size_y(&self) -> f32
pub fn rectangle_half_size_y(&self) -> f32
Half-height.
Sourcepub fn rectangle_new(&self, half_width: f32, half_height: f32) -> Rectangle
pub fn rectangle_new(&self, half_width: f32, half_height: f32) -> Rectangle
Constructs with half-width and half-height (ignores self).
Source§impl Rectangle
impl Rectangle
Sourcepub fn rectangle_half_size_x_tool_tool_attr() -> Tool
pub fn rectangle_half_size_x_tool_tool_attr() -> Tool
Generated tool metadata function for rectangle_half_size_x_tool
Sourcepub fn rectangle_half_size_x_tool(&self) -> Result<Json<f32>, ErrorData>
pub fn rectangle_half_size_x_tool(&self) -> Result<Json<f32>, ErrorData>
rectangle_half_size_x MCP tool wrapper method.
Sourcepub fn rectangle_half_size_y_tool_tool_attr() -> Tool
pub fn rectangle_half_size_y_tool_tool_attr() -> Tool
Generated tool metadata function for rectangle_half_size_y_tool
Sourcepub fn rectangle_half_size_y_tool(&self) -> Result<Json<f32>, ErrorData>
pub fn rectangle_half_size_y_tool(&self) -> Result<Json<f32>, ErrorData>
rectangle_half_size_y MCP tool wrapper method.
Sourcepub fn rectangle_new_tool_tool_attr() -> Tool
pub fn rectangle_new_tool_tool_attr() -> Tool
Generated tool metadata function for rectangle_new_tool
Sourcepub fn rectangle_new_tool(
&self,
params: Parameters<RectangleNewParams>,
) -> Result<Json<Rectangle>, ErrorData>
pub fn rectangle_new_tool( &self, params: Parameters<RectangleNewParams>, ) -> Result<Json<Rectangle>, ErrorData>
rectangle_new MCP tool wrapper method.
Methods from Deref<Target = Rectangle>§
Sourcepub fn closest_point(&self, point: Vec2) -> Vec2
pub fn closest_point(&self, point: Vec2) -> Vec2
Finds the point on the rectangle that is closest to the given point.
If the point is outside the rectangle, the returned point will be on the perimeter of the rectangle. Otherwise, it will be inside the rectangle and returned as is.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rectangle
impl<'de> Deserialize<'de> for Rectangle
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 Rectangle
impl ElicitComplete for Rectangle
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 Rectangle
impl ElicitIntrospect for Rectangle
Source§fn pattern() -> ElicitationPattern
fn pattern() -> ElicitationPattern
Source§fn metadata() -> TypeMetadata
fn metadata() -> TypeMetadata
Source§impl ElicitPromptTree for Rectangle
impl ElicitPromptTree for Rectangle
Source§fn prompt_tree() -> PromptTree
fn prompt_tree() -> PromptTree
Source§fn assembled_prompts() -> Vec<AssembledPrompt>
fn assembled_prompts() -> Vec<AssembledPrompt>
Source§impl ElicitSpec for Rectangle
impl ElicitSpec for Rectangle
Source§impl Elicitation for Rectangle
impl Elicitation for Rectangle
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 Rectangle
Source§impl JsonSchema for Rectangle
impl JsonSchema for Rectangle
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 ToCodeLiteral for Rectangle
impl ToCodeLiteral for Rectangle
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 Rectangle
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnsafeUnpin for Rectangle
impl UnwindSafe for Rectangle
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