patternfly-yew 0.7.4

PatternFly 5 components for Yew
Documentation
1
2
3
4
5
6
7
8
9
10
use implicit_clone::unsync::IString;
use std::borrow::Cow;

/// Turn an `IString` (or `AttrValue`) into a `Cow<'static, str>`
pub fn attr_value_to_static_cow(value: &IString) -> Cow<'static, str> {
    match value {
        IString::Static(s) => (*s).into(),
        IString::Rc(s) => (*s).to_string().into(),
    }
}