Type Alias bevy_query_ext::prelude::AsDerefOrChar
source · pub type AsDerefOrChar<T, const V: char> = OrChar<AsDeref<T>, V>;
Expand description
When T
implements Deref
for
char
, this will return that value or the specified value if T has no result
§Examples
#[derive(Component, Deref)]
pub struct Wrapped(char);
fn example(query: Query<AsDerefOrChar<Wrapped, 'b'>>) {
let _: char = query.get_single().unwrap();
}
Aliased Type§
struct AsDerefOrChar<T, const V: char>(/* private fields */);