Skip to main content

EuvButtonLinkProps

Struct EuvButtonLinkProps 

Source
pub struct EuvButtonLinkProps {
    pub variant: EuvButtonVariant,
    pub size: EuvButtonSize,
    pub label: CowText,
    pub href: CowText,
    pub new_tab: bool,
    pub aria_label: Option<CowText>,
}
Expand description

Props for the euv_button_link component.

A link that looks like a button: the anchor carries the appearance of the button, because a destination the reader follows is not an action the reader performs and the two want different affordances.

Fields§

§variant: EuvButtonVariant

The visual variant determining colour scheme.

§size: EuvButtonSize

The size of the control.

§label: CowText

The label of the link.

§href: CowText

The destination the link points at.

§new_tab: bool

Whether the link opens in a new tab.

§aria_label: Option<CowText>

The accessible name of the link.

The name is the label the link shows unless the caller names one of its own, which a link that carries a glyph rather than a word needs.

Implementations§

Source§

impl EuvButtonLinkProps

Source

pub fn get_variant(&self) -> &EuvButtonVariant

Source

pub fn get_mut_variant(&mut self) -> &mut EuvButtonVariant

Source

pub fn set_variant(&mut self, val: EuvButtonVariant) -> &mut Self

Source

pub fn get_size(&self) -> &EuvButtonSize

Source

pub fn get_mut_size(&mut self) -> &mut EuvButtonSize

Source

pub fn set_size(&mut self, val: EuvButtonSize) -> &mut Self

Source

pub fn get_label(&self) -> &CowText

Source

pub fn get_mut_label(&mut self) -> &mut CowText

Source

pub fn set_label(&mut self, val: CowText) -> &mut Self

Source

pub fn get_href(&self) -> &CowText

Source

pub fn get_mut_href(&mut self) -> &mut CowText

Source

pub fn set_href(&mut self, val: CowText) -> &mut Self

Source

pub fn get_new_tab(&self) -> bool

Source

pub fn get_mut_new_tab(&mut self) -> &mut bool

Source

pub fn set_new_tab(&mut self, val: bool) -> &mut Self

Source

pub fn get_aria_label(&self) -> CowText

Source

pub fn try_get_aria_label(&self) -> &Option<CowText>

Source

pub fn get_mut_aria_label(&mut self) -> &mut Option<CowText>

Source

pub fn set_aria_label(&mut self, val: Option<CowText>) -> &mut Self

Source§

impl EuvButtonLinkProps

Source

pub fn new( variant: EuvButtonVariant, size: EuvButtonSize, label: CowText, href: CowText, new_tab: bool, aria_label: Option<CowText>, ) -> Self

Trait Implementations§

Source§

impl Clone for EuvButtonLinkProps

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EuvButtonLinkProps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the struct fields as a debug struct, skipping excluded fields.

§Arguments
  • &mut std::fmt::Formatter<'_> - The formatter to write the representation into.
§Returns
  • std::fmt::Result - Success or failure of the formatting operation.
Source§

impl Default for EuvButtonLinkProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more