### Example Searches in Bevy Extended UI Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/html/struct.HtmlStyle_search= Provides examples of common search queries or patterns used within the Bevy Extended UI library. These examples illustrate how to search for specific types, type conversions, and functional transformations. ```text std::vec u32 -> bool Option, (T -> U) -> Option ``` -------------------------------- ### Create Bevy App with Extended UI Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/example_utils/fn.make_app_search=u32+-%3E+bool Creates a Bevy `App` instance pre-configured for use with the extended UI examples. This function simplifies the setup process for UI development within Bevy. ```rust pub fn make_app(title: impl Into) -> App ``` -------------------------------- ### make_app Function Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/example_utils/fn.make_app_search= Creates a Bevy App configured for the extended UI examples. This function is part of the example utilities. ```APIDOC ## make_app ### Description Creates a Bevy `App` configured for the extended UI examples. ### Function Signature ```rust pub fn make_app(title: impl Into) -> App ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```rust // This function is a utility and not directly called via an HTTP request. // Example usage within a Rust program: // let mut app = bevy_extended_ui::example_utils::make_app("My App Title"); ``` ### Response #### Success Response - **App** (bevy::prelude::App) - A configured Bevy application instance. #### Response Example ```rust // The return type is a Bevy App object, not a JSON response. ``` ``` -------------------------------- ### Module example_utils Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/example_utils/index_search=u32+-%3E+bool Provides utility functions for setting up Bevy applications with extended UI examples. ```APIDOC ## Function: make_app ### Description Creates a Bevy `App` configured for the extended UI examples. ### Method (Implicitly a function call, not a standard HTTP method) ### Endpoint N/A (Local function) ### Parameters None ### Request Example ```rust let mut app = make_app(); ``` ### Response #### Success Response - **App** (bevy::app::App) - A configured Bevy application instance. #### Response Example (No direct JSON response, returns a Bevy App object) ``` -------------------------------- ### make_app Function Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/example_utils/fn.make_app_search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a Bevy App configured for the extended UI examples. ```APIDOC ## make_app ### Description Creates a Bevy `App` configured for the extended UI examples. ### Function Signature ```rust pub fn make_app(title: impl Into) -> App ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response - **App** (bevy::app::App) - A configured Bevy App instance. #### Response Example None ``` -------------------------------- ### GetField Trait Implementations Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.AnimationKeyframe_search=std%3A%3Avec Provides methods to get or mutably get struct fields by name. ```APIDOC ## GetField Trait Implementations ### Description Provides methods to get or mutably get struct fields by name. ### Methods #### `get_field(&self, name: &str) -> Option<&T>` Returns a reference to the field named `name`, downcast to `T`. #### `get_field_mut(&mut self, name: &str) -> Option<&mut T>` Returns a mutable reference to the field named `name`, downcast to `T`. ``` -------------------------------- ### Cloning and Initialization Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/html/struct.HtmlID_search=std%3A%3Avec Documentation for cloning and uninitialized memory operations. ```APIDOC ## impl CloneToUninit for T ### Description Provides methods for cloning data into uninitialized memory. This is a nightly-only experimental API. ### Methods #### unsafe fn clone_to_uninit(&self, dest: *mut u8) Performs copy-assignment from `self` to `dest`. ``` -------------------------------- ### GetField Trait Implementations Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.Background_search= Provides methods to get or mutably get struct fields by name, with downcasting to a specific `Reflect` type. ```APIDOC ## GetField Trait Implementations ### Description Provides methods to get or mutably get struct fields by name, with downcasting to a specific `Reflect` type. ### Methods #### `get_field(&self, name: &str) -> Option<&T>` Returns a reference to the value of the field named `name`, downcast to `T`. #### `get_field_mut(&mut self, name: &str) -> Option<&mut T>` Returns a mutable reference to the value of the field named `name`, downcast to `T`. ``` -------------------------------- ### Type Conversion and Initialization Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.ToolTip_search=std%3A%3Avec This section details methods for type conversion and initialization from a World. ```APIDOC ## POST /websites/rs_bevy_extended_ui_1_4_1_bevy_extended_ui/from ### Description Creates an instance of the type from itself. This effectively returns the argument unchanged, implementing the `From for T` trait. ### Method POST ### Endpoint /websites/rs_bevy_extended_ui_1_4_1_bevy_extended_ui/from ### Parameters #### Request Body - **t** (T) - Required - The value to convert. ### Request Example ```json { "t": "some_value" } ``` ### Response #### Success Response (200) - **T** - The converted value (unchanged). #### Response Example ```json { "result": "some_value" } ``` ## POST /websites/rs_bevy_extended_ui_1_4_1_bevy_extended_ui/from_world ### Description Creates an instance of the type from the `World`. This method requires the type to implement `Default` and will call `default()` to create the instance. ### Method POST ### Endpoint /websites/rs_bevy_extended_ui_1_4_1_bevy_extended_ui/from_world ### Parameters #### Request Body - **_world** (World) - Required - A mutable reference to the World from which to create the instance. ### Request Example ```json { "_world": "" } ``` ### Response #### Success Response (200) - **T** - The newly created instance of the type. #### Response Example ```json { "instance": "" } ``` ``` -------------------------------- ### Field Access Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.InputField Provides methods to get or mutably get a field from a struct by name, downcasting to a specific type. ```APIDOC ## GET /get_field ### Description Retrieves the value of a specific field from a struct. ### Method GET ### Endpoint /get_field ### Parameters #### Query Parameters - **struct_id** (string) - Required - The ID of the struct instance. - **field_name** (string) - Required - The name of the field to retrieve. - **field_type** (string) - Required - The expected type of the field (e.g., 'i32', 'String'). ### Response #### Success Response (200) - **field_value** (any) - The value of the requested field. #### Response Example ```json { "field_value": 123 } ``` ``` ```APIDOC ## PUT /get_field_mut ### Description Retrieves a mutable reference to the value of a specific field from a struct. ### Method PUT ### Endpoint /get_field_mut ### Parameters #### Query Parameters - **struct_id** (string) - Required - The ID of the struct instance. - **field_name** (string) - Required - The name of the field to retrieve. - **field_type** (string) - Required - The expected type of the field (e.g., 'i32', 'String'). ### Request Body - **new_value** (any) - Optional - The new value to set for the field. ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Field updated successfully." } ``` ``` -------------------------------- ### Equivalent Methods Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/static.HEADLINE_ID_POOL_search=u32+-%3E+bool Demonstrates the `equivalent` method available across various Bevy Extended UI components for comparison. ```APIDOC ## Various Endpoints for Equivalent Methods ### Description These endpoints represent the `equivalent` method found in various Bevy Extended UI components. This method is used to check for equivalence between two instances, often involving a generic type `K` constrained by `u32`. ### Method POST ### Endpoint - /html/HtmlSystemSet/equivalent - /html/HtmlChangeAction/equivalent - /html/HtmlFocusState/equivalent - /lang/HtmlLangSetting/equivalent - /styles/CalcUnit/equivalent - /styles/TransitionTiming/equivalent - /styles/AnimationDirection/equivalent - /styles/TransitionProperty/equivalent - /styles/paint/Colored/equivalent - /widgets/UIWidgetState/equivalent - /widgets/FormValidationMode/equivalent - /widgets/ButtonType/equivalent - /widgets/ChoiceOption/equivalent - /widgets/DividerAlignment/equivalent - /widgets/FieldKind/equivalent - /widgets/FieldMode/equivalent - /widgets/HeadlineType/equivalent - /widgets/DateFormat/equivalent - /widgets/InputType/equivalent - /widgets/InputCap/equivalent - /widgets/ToolTipVariant/equivalent - /widgets/ToolTipPriority/equivalent - /widgets/ToolTipAlignment/equivalent - /widgets/ToolTipTrigger/equivalent ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **other** (K) - Required - The other instance to compare against. ### Request Example ```json { "other": "" } ``` ### Response #### Success Response (200) - **result** (bool) - True if the instances are equivalent, false otherwise. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### Get String Slice from TagName Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.TagName Demonstrates how to get an immutable string slice (&str) from a TagName component. This is useful for reading the tag name without modification. ```Rust let s = String::from("foo"); assert_eq!("foo", s.as_str()); ``` -------------------------------- ### Styles TransitionTiming Equivalent Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.ExtendedRegistryPlugin_search=u32+-%3E+bool Details the 'equivalent' method for TransitionTiming, highlighting type checking and the 'u32'/'f32' type hint. ```APIDOC ## POST /bevy_extended_ui/styles/TransitionTiming/equivalent ### Description Checks if the current type is equivalent to a generic type `K`, with a specific note about `u32` potentially being a placeholder for `f32`. ### Method POST ### Endpoint /bevy_extended_ui/styles/TransitionTiming/equivalent ### Parameters #### Query Parameters - **K** (type) - Required - The generic type to compare against. ### Request Body (No request body specified for this method) ### Response #### Success Response (200) - **bool** (boolean) - True if the types are equivalent, false otherwise. #### Response Example ```json { "equivalent": true } ``` ``` -------------------------------- ### Conversion Utilities Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.UiRegistry_search= Provides various conversion utilities including `Into`, `IntoEither`, `IntoResult`, `TryFrom`, and `TryInto`. ```APIDOC ## Conversion Utilities ### Description This section details various conversion traits and their implementations, facilitating type transformations within the library. ### Traits and Methods #### `Into` ##### Description Calls `U::from(self)`. This conversion is determined by the implementation of `From for U`. ##### Method `self` ##### Endpoint N/A (Trait implementation) ##### Parameters None ##### Returns - `U` - The converted value. #### `IntoEither` ##### Description Converts `self` into either the `Left` or `Right` variant of `Either` based on a boolean flag or a closure. ##### Methods - `into_either(self, into_left: bool) -> Either` - `into_either_with(self, into_left: F) -> Either` where `F: FnOnce(&Self) -> bool` ##### Endpoint N/A (Trait implementation) ##### Parameters - `into_left` (bool or closure) - Determines whether to convert to `Left` or `Right`. ##### Returns - `Either` - The converted value in an `Either` variant. #### `IntoResult` ##### Description Converts this type into the system output type `Result`. ##### Method `into_result(self) -> Result` ##### Endpoint N/A (Trait implementation) ##### Parameters None ##### Returns - `Result` - The converted result. #### `TryFrom` ##### Description Performs a fallible conversion from type `U` to type `T`. ##### Method `try_from(value: U) -> Result>::Error>` ##### Endpoint N/A (Trait implementation) ##### Parameters - `value` (`U`) - The value to convert. ##### Returns - `Result` - The converted value or an error. #### `TryInto` ##### Description Performs a fallible conversion from type `T` to type `U`. ##### Method `try_into(self) -> Result>::Error>` ##### Endpoint N/A (Trait implementation) ##### Parameters None ##### Returns - `Result` - The converted value or an error. ### Request Example ```json { "example": "Not applicable for trait methods" } ``` ### Response #### Success Response (200) - **Converted Value** (Various Types) - The result of the conversion. #### Response Example ```json { "example": "Not applicable for trait methods" } ``` ``` -------------------------------- ### Get Field by Name (Immutable) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.StylePair Provides a method to get an immutable reference to a struct field by its name. The field's value is downcast to a specified `Reflect` type `T`. ```rust impl GetField for S where S: Struct, { fn get_field(&self, name: &str) -> Option<&T> where T: Reflect, } ``` -------------------------------- ### Bundle and BundleFromComponents Implementations Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.CssSource_search=u32+-%3E+bool Details on how components can be bundled and created from other components. ```APIDOC ### impl Bundle for C #### fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator #### fn get_component_ids( components: &Components, ) -> impl Iterator> ### impl BundleFromComponents for C #### unsafe fn from_components(ctx: &mut T, func: &mut F) -> C ### Description These implementations facilitate the use of Bevy's ECS `Bundle` system. `Bundle` allows grouping components together, and `BundleFromComponents` provides a way to construct a `Bundle` from a set of existing components. ``` -------------------------------- ### Getting Struct Field by Name Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.Background_search= Provides methods to get a reference or mutable reference to a struct field by its name. The field's value is downcast to a specified type `T` that must implement `Reflect`. ```rust fn get_field(&self, name: &str) -> Option<&T> where S: Struct, T: Reflect ``` ```rust fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where S: Struct, T: Reflect ``` -------------------------------- ### UiRegistry Initialization and Basic Operations Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.UiRegistry Demonstrates how to create a new UiRegistry, add UI sources, and remove them. These are fundamental operations for managing UI elements. ```rust pub fn new() -> Self pub fn add(&mut self, name: String, source: HtmlSource) pub fn remove(&mut self, name: &str) ``` -------------------------------- ### Getting Struct Field by Name Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.Background Provides methods to get a reference or mutable reference to a struct field by its name, downcasting it to a specified `Reflect` type. Returns `None` if the field does not exist or cannot be downcasted. ```rust impl GetField for S where S: Struct, { fn get_field(&self, name: &str) -> Option<&T> where T: Reflect; fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where T: Reflect; } ``` -------------------------------- ### Get Underlying ID from UIGenID in Rust Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.UIGenID_search=u32+-%3E+bool The `get` method for the UIGenID struct returns the underlying `usize` numeric identifier. This allows direct access to the unique ID value for comparison or other operations. ```rust pub fn get(&self) -> usize ``` -------------------------------- ### Get Component IDs for a Bundle (Rust) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.ColorPicker_search=u32+-%3E+bool Provides methods to retrieve component IDs associated with a Bevy Bundle. This includes iterating over registered components and getting component IDs for a given Bundle. ```rust impl Bundle for C where C: Component { fn component_ids(components: &mut ComponentsRegistrator<'_>) -> impl Iterator + '_; fn get_component_ids(components: &Components) -> impl Iterator>; } ``` -------------------------------- ### Equivalent Method Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/static.RADIO_BUTTON_ID_POOL_search=u32+-%3E+bool Demonstrates the `equivalent` method used across various Bevy Extended UI components for comparison. ```APIDOC ## METHOD equivalent ### Description The `equivalent` method is used across various components and enums within `bevy_extended_ui` to check for equality between instances, often involving generic type parameters. ### Method `equivalent` ### Endpoint N/A (Method within structs/enums) ### Parameters - **&self** (Self) - The instance on which the method is called. - **other** (&K) - The other instance to compare against. ### Type Constraints - `K` must match `u32` in the context of the provided examples. ### Request Example ```rust // Example for HtmlSystemSet::equivalent use bevy_extended_ui::html::HtmlSystemSet; let set1 = HtmlSystemSet::SomeState; let set2 = HtmlSystemSet::SomeState; let set3 = HtmlSystemSet::AnotherState; assert!(set1.equivalent(&set2)); assert!(!set1.equivalent(&set3)); ``` ### Response #### Success Response (200) - **bool** - Returns `true` if the instances are equivalent, `false` otherwise. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### Reflection and Settings Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.UiRegistry_search=u32+-%3E+bool Utilities for making types reflectable and configuring settings. ```APIDOC ## Reflection and Settings ### Description Utilities for making types reflectable and configuring settings. ### `Reflectable` #### Constraints * `T: Reflect + GetTypeRegistration + Typed + TypePath` ### `Settings` #### Constraints * `T: 'static + Send + Sync` ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) * No direct return value, enables reflection and settings capabilities. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### BindToID Struct Definition and Get Method (Rust) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.BindToID Defines the BindToID struct, which associates a UI child entity with a parent widget by ID. The `get` method returns the bound widget ID. ```rust pub struct BindToID(pub usize); impl BindToID { pub fn get(&self) -> usize { self.0 } } ``` -------------------------------- ### Getting Struct Fields by Name with `GetField` Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.TransformStyle_search=std%3A%3Avec The `GetField` trait enables accessing struct fields by their name. It provides methods to get either an immutable or mutable reference to a field, downcasting it to a specified type `T`. ```rust /// Returns a reference to the value of the field named `name`, downcast to `T`. fn get_field(&self, name: &str) -> Option<&T> where T: Reflect; ``` ```rust /// Returns a mutable reference to the value of the field named `name`, downcast to `T`. fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where T: Reflect; ``` -------------------------------- ### Widgets ToolTipAlignment Equivalent Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.ExtendedRegistryPlugin_search=u32+-%3E+bool Provides documentation for the 'equivalent' method within ToolTipAlignment, emphasizing type comparison and the 'u32'/'f32' type hint. ```APIDOC ## POST /bevy_extended_ui/widgets/ToolTipAlignment/equivalent ### Description Checks if the current type is equivalent to a generic type `K`, with a specific note about `u32` potentially being a placeholder for `f32`. ### Method POST ### Endpoint /bevy_extended_ui/widgets/ToolTipAlignment/equivalent ### Parameters #### Query Parameters - **K** (type) - Required - The generic type to compare against. ### Request Body (No request body specified for this method) ### Response #### Success Response (200) - **bool** (boolean) - True if the types are equivalent, false otherwise. #### Response Example ```json { "equivalent": true } ``` ``` -------------------------------- ### Get Field by Name (Rust) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.Body_search= Provides methods to get a reference or mutable reference to a struct field by its name, downcasting to a specific type T. Requires the struct to implement the `Struct` and `Reflect` traits. ```rust impl GetField for S where S: Struct, { fn get_field(&self, name: &str) -> Option<&T> where T: Reflect, { // ... implementation ... } fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where T: Reflect, { // ... implementation ... } } ``` -------------------------------- ### Get Field by Name (Rust) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.Body_search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides methods to get a reference or mutable reference to a struct field by its name, downcasting to a specified type T. Requires the struct to implement the 'Struct' and 'Reflect' traits. ```rust impl GetField for S where S: Struct, { fn get_field(&self, name: &str) -> Option<&T> where T: Reflect, { // Implementation details... } fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where T: Reflect, { // Implementation details... } } ``` -------------------------------- ### Equivalent Method Documentation Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/html/struct.HtmlDragStart_search=u32+-%3E+bool This section documents the `equivalent` method found in various modules of the Bevy Extended UI library. This method is used to check for equivalence between types, often involving a generic parameter `K` that is constrained to `u32`. ```APIDOC ## `equivalent` Method ### Description Checks for equivalence between the current instance and another instance of the same type. This method is generic and often constrained where the generic type `K` must match `u32`. ### Method `equivalent` ### Endpoint N/A (This is a method documentation, not an API endpoint) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **bool**: `true` if the instances are equivalent, `false` otherwise. #### Response Example N/A ### Usage Examples This method is used internally within various components of the Bevy Extended UI library, such as: - `bevy_extended_ui::html::HtmlSystemSet::equivalent` - `bevy_extended_ui::html::HtmlChangeAction::equivalent` - `bevy_extended_ui::html::HtmlFocusState::equivalent` - `bevy_extended_ui::lang::HtmlLangSetting::equivalent` - `bevy_extended_ui::styles::CalcUnit::equivalent` - `bevy_extended_ui::styles::TransitionTiming::equivalent` - `bevy_extended_ui::styles::AnimationDirection::equivalent` - `bevy_extended_ui::styles::TransitionProperty::equivalent` - `bevy_extended_ui::styles::paint::Colored::equivalent` - `bevy_extended_ui::widgets::UIWidgetState::equivalent` - `bevy_extended_ui::widgets::FormValidationMode::equivalent` - `bevy_extended_ui::widgets::ButtonType::equivalent` - `bevy_extended_ui::widgets::ChoiceOption::equivalent` - `bevy_extended_ui::widgets::DividerAlignment::equivalent` - `bevy_extended_ui::widgets::FieldKind::equivalent` - `bevy_extended_ui::widgets::FieldMode::equivalent` - `bevy_extended_ui::widgets::HeadlineType::equivalent` - `bevy_extended_ui::widgets::DateFormat::equivalent` - `bevy_extended_ui::widgets::InputType::equivalent` - `bevy_extended_ui::widgets::InputCap::equivalent` - `bevy_extended_ui::widgets::ToolTipVariant::equivalent` - `bevy_extended_ui::widgets::ToolTipPriority::equivalent` - `bevy_extended_ui::widgets::ToolTipAlignment::equivalent` - `bevy_extended_ui::widgets::ToolTipTrigger::equivalent` **Note**: The initial message "Type \"u32\" not found and used as generic parameter. Consider searching for \"f32\" instead." suggests a potential type mismatch or a hint for developers to use `f32` in certain contexts where `u32` might have been mistakenly used as a generic parameter. ``` -------------------------------- ### Type Conversions and Utilities Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/io/struct.HtmlLoader_search=u32+-%3E+bool Documentation for various type conversion traits like `From`, `TryFrom`, `Into`, `TryInto`, and utility traits like `Instrument` and `IntoEither`. ```APIDOC ## Type Conversion and Utility Traits ### Description This section details traits related to type conversions, instrumentation, and conditional operations. ### `impl From for T` - **Description**: Returns the argument unchanged. - **Method**: `from(t: T) -> T` ### `impl FromWorld for T` - **Description**: Creates `Self` using `default()`. - **Method**: `from_world(_world: &mut World) -> T` (Requires `T: Default`) ### `impl Instrument for T` - **Description**: Instruments this type with a `Span`. - **Methods**: - `instrument(self, span: Span) -> Instrumented` - `in_current_span(self) -> Instrumented` ### `impl Into for T` - **Description**: Calls `U::from(self)`. Conversion behavior depends on the `From for U` implementation. - **Method**: `into(self) -> U` (Requires `U: From`) ### `impl IntoEither for T` - **Description**: Converts `self` into a `Left` or `Right` variant of `Either`. - **Methods**: - `into_either(self, into_left: bool) -> Either` - `into_either_with(self, into_left: F) -> Either` (Requires `F: FnOnce(&Self) -> bool`) ### `impl IntoResult for T` - **Description**: Converts this type into the system output type. - **Method**: `into_result(self) -> Result` ### `impl TryFrom for T` - **Description**: Performs the conversion, returning a `Result`. - **Method**: `try_from(value: U) -> Result>::Error>` - **Associated Type**: `Error = Infallible` ### `impl TryInto for T` - **Description**: Performs the conversion, returning a `Result`. - **Method**: `try_into(self) -> Result>::Error>` - **Associated Type**: `Error = >::Error` ### `impl WithSubscriber for T` - **Description**: Attaches a `Subscriber` to this type. - **Methods**: - `with_subscriber(self, subscriber: S) -> WithDispatch` (Requires `S: Into`) - `with_current_subscriber(self) -> WithDispatch` ``` -------------------------------- ### Get Path to Reflectable Value (Rust) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/enum.FormValidationMode Implements the GetPath trait for navigating through reflectable data structures. Provides methods to get immutable and mutable references to values specified by a path, and statically typed references. ```rust fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>> where T: Reflect + ?Sized ``` ```rust fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>> where T: Reflect + ?Sized ``` ```rust fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>> where T: Reflect ``` -------------------------------- ### Getting Struct Field by Name Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.ParsedCss_search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Provides methods to get a reference or a mutable reference to a struct field by its name, downcasting the field's value to a specified type `T`. This allows for dynamic access to struct members. ```rust fn get_field(&self, name: &str) -> Option<&T> where T: Reflect, ``` ```rust fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where T: Reflect, ``` -------------------------------- ### Conversion and Initialization Traits Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.DatePicker_search=u32+-%3E+bool Documentation for trait implementations related to type conversion, initialization from world, and identity transformations. ```APIDOC ## Conversion and Initialization Traits ### Description This section covers trait implementations for type conversions, including identity conversion, initialization from `World`, and standard conversion traits. ### From for T #### Methods - `from(t: T) -> T`: Returns the argument unchanged, effectively an identity conversion. ### FromWorld for T #### Methods - `from_world(_world: &mut World) -> T`: Creates an instance of `T` using its `default()` implementation. Requires `T: Default`. ### Into for T #### Methods - `into(self) -> U`: Converts `self` into type `U`. This relies on the `From for U` implementation. Requires `U: From`. ``` -------------------------------- ### Getting a Reference via Path in Rust (Reflection) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/enum.InputCap_search= Explains how to get an immutable reference to a nested value using a path, leveraging Rust's reflection capabilities. This requires the type `T` to implement `Reflect` and `ReflectPath`. ```rust impl GetPath for T where T: Reflect + ?Sized, { fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>> { // Implementation details } fn path<'p, U>( &self, path: impl ReflectPath<'p>, ) -> Result<&U, ReflectPathError<'p>> where U: Reflect, { // Implementation details } } ``` -------------------------------- ### UiRegistry Initialization and Creation Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.UiRegistry_search= Demonstrates how to create a new, empty instance of UiRegistry. This is the starting point for managing UI components. ```rust pub fn new() -> Self ``` -------------------------------- ### Pointer Initialization Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/struct.GradientStop Provides methods for pointer initialization, including alignment and an unsafe initialization function. ```APIDOC ## Pointer Initialization Utilities ### Description This trait provides utilities for working with pointers, including their alignment and an unsafe method for initializing memory. ### Constants and Methods - `ALIGN`: `usize` - The alignment requirement for the pointer. - `init(init: ::Init)`: `unsafe fn` - Initializes memory with the given initializer. ### Endpoint N/A (Constants and methods within an implementation) ### Parameters - `init` (`::Init`): The initializer for the memory. ### Request Example ```rust // This is an unsafe operation and requires careful handling unsafe { let ptr_address = ::init(initializer_value); // Use the pointer address } ``` ### Response #### Success Response - `ALIGN`: `usize` - The alignment value. - `init`: `usize` - The starting address of the initialized memory. #### Response Example ```json { "ALIGN": 8, "init_address": 16789543210 } ``` ### Error Handling - This involves `unsafe` operations and requires careful memory management to avoid undefined behavior. ``` -------------------------------- ### Get Value by Path using Reflection Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/styles/enum.TransitionTiming_search=u32+-%3E+bool Provides methods to get references (mutable or immutable) to values within a reflected structure using a path. This is a core part of Bevy's reflection API for accessing nested data. ```rust impl GetPath for T where T: Reflect + ?Sized, ``` ```rust fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>> ``` ```rust fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>> ``` ```rust fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>> where T: Reflect, ``` -------------------------------- ### Struct Field Access (GetField Trait) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/html/struct.HtmlEventBindings_search= Provides methods to get and get mutable references to struct fields by name, downcasting them to a specific `Reflect` type. This trait is essential for runtime struct manipulation and reflection. ```rust fn get_field(&self, name: &str) -> Option<&T> where T: Reflect, Returns a reference to the value of the field named `name`, downcast to `T`. Source§ ``` ```rust fn get_field_mut(&mut self, name: &str) -> Option<&mut T> where T: Reflect, Returns a mutable reference to the value of the field named `name`, downcast to `T`. Source§ ``` -------------------------------- ### Styles TransitionProperty Equivalent Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.ExtendedRegistryPlugin_search=u32+-%3E+bool Provides documentation for the 'equivalent' method within TransitionProperty, emphasizing type checking and the 'u32'/'f32' type hint. ```APIDOC ## POST /bevy_extended_ui/styles/TransitionProperty/equivalent ### Description Checks if the current type is equivalent to a generic type `K`, with a specific note about `u32` potentially being a placeholder for `f32`. ### Method POST ### Endpoint /bevy_extended_ui/styles/TransitionProperty/equivalent ### Parameters #### Query Parameters - **K** (type) - Required - The generic type to compare against. ### Request Body (No request body specified for this method) ### Response #### Success Response (200) - **bool** (boolean) - True if the types are equivalent, false otherwise. #### Response Example ```json { "equivalent": true } ``` ``` -------------------------------- ### World and System Integration Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/html/struct.HtmlID_search=std%3A%3Avec Documentation for integration with Bevy's World and system execution. ```APIDOC ## impl FromWorld for T ### Description Provides a `FromWorld` implementation for types that implement `Default`. ### Methods #### fn from_world(_world: &mut World) -> T Creates `Self` using `default()`. ## impl IntoResult for T ### Description Provides a method to convert a type into a `Result` suitable for system outputs. ### Methods #### fn into_result(self) -> Result Converts this type into the system output type. ``` -------------------------------- ### Navigating Reflection Paths (Rust) Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.Paragraph_search=std%3A%3Avec Enables traversing nested data structures using a path. These methods allow getting or mutably getting references to values deep within a reflected structure. They return a `Result` which is either a reference to the value or a `ReflectPathError`. ```rust impl GetPath for T where T: Reflect + ?Sized, { fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>> { // ... implementation details ... } fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>> { // ... implementation details ... } fn path<'p, T>( // Note: T here is the type to downcast to &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>> where T: Reflect, { // ... implementation details ... } fn path_mut<'p, T>( // Note: T here is the type to downcast to &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut T, ReflectPathError<'p>> where T: Reflect, { // ... implementation details ... } } ``` -------------------------------- ### UIGenID Tuple Struct Field Access Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/widgets/struct.UIGenID_search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Defines methods for accessing fields of `UIGenID` when treated as a tuple struct. This includes getting field values by index, getting the number of fields, iterating over fields, and converting to a dynamic tuple struct representation. ```rust impl TupleStruct for UIGenID fn field(&self, index: usize) -> Option<&dyn PartialReflect> fn field_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect> fn field_len(&self) -> usize fn iter_fields(&self) -> TupleStructFieldIter<'_> fn to_dynamic_tuple_struct(&self) -> DynamicTupleStruct fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo> ``` -------------------------------- ### Widgets InputCap Equivalent Source: https://docs.rs/bevy_extended_ui/1.4.1/bevy_extended_ui/registry/struct.ExtendedRegistryPlugin_search=u32+-%3E+bool Provides documentation for the 'equivalent' method within InputCap, emphasizing type checking and the 'u32'/'f32' type hint. ```APIDOC ## POST /bevy_extended_ui/widgets/InputCap/equivalent ### Description Checks if the current type is equivalent to a generic type `K`, with a specific note about `u32` potentially being a placeholder for `f32`. ### Method POST ### Endpoint /bevy_extended_ui/widgets/InputCap/equivalent ### Parameters #### Query Parameters - **K** (type) - Required - The generic type to compare against. ### Request Body (No request body specified for this method) ### Response #### Success Response (200) - **bool** (boolean) - True if the types are equivalent, false otherwise. #### Response Example ```json { "equivalent": true } ``` ```