Struct yew_octicons::Icon
source · pub struct Icon { /* private fields */ }
Expand description
An Octicon with size information. This can be used in yew’s html!
macro.
use yew::html;
use yew_octicons::Icon;
use yew_octicons::IconKind;
let code = html! {
<span>
{ Icon::new(IconKind::Alert) }
</span>
};
Implementations§
source§impl Icon
impl Icon
sourcepub fn new(kind: IconKind) -> Self
pub fn new(kind: IconKind) -> Self
Create a default-sized 16px icon
use yew::html;
use yew_octicons::Icon;
use yew_octicons::IconKind;
let code = html! {
<span>
{ Icon::new(IconKind::Alert) }
</span>
};
Trait Implementations§
source§impl PartialEq<Icon> for Icon
impl PartialEq<Icon> for Icon
source§impl PartialOrd<Icon> for Icon
impl PartialOrd<Icon> for Icon
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Icon
impl StructuralPartialEq for Icon
Auto Trait Implementations§
impl RefUnwindSafe for Icon
impl Send for Icon
impl Sync for Icon
impl Unpin for Icon
impl UnwindSafe for Icon
Blanket Implementations§
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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.