yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications

Home Page:https://yew.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Align IString/AttrValue with Cow of element

ctron opened this issue · comments

It is possible to set the value of an element using <@{value} />. This seems to be of the type Cow<'static, str>.

However, there also seems to be no IntoPropValue for various string types to Cow<'static, str>, which makes dealing with it a bit cumbersome.

On the other hand AttrValue seems to have solved this just fine.

Maybe a way to deal with this would be to use IString or simply AttrValue for this use case as well. Maybe support Cow<static, str>` would also make sense.