pub struct EmoteUrlBuilder<'a> { /* private fields */ }
Available on crate feature
emote
only.Expand description
Builder for emote URLs.
§Examples
let emote_id = EmoteId::from("emotesv2_dc24652ada1e4c84a5e3ceebae4de709");
assert_eq!(emote_id.url().size_3x().dark_mode().render(), "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dc24652ada1e4c84a5e3ceebae4de709/default/dark/3.0")
Implementations§
Source§impl EmoteUrlBuilder<'_>
impl EmoteUrlBuilder<'_>
Sourcepub fn new(id: &EmoteIdRef) -> EmoteUrlBuilder<'_>
pub fn new(id: &EmoteIdRef) -> EmoteUrlBuilder<'_>
Construct a new EmoteUrlBuilder
from a EmoteId
Defaults to 1.0
scale, default
animation and light
theme.
Sourcepub fn light_mode(self) -> Self
pub fn light_mode(self) -> Self
Set theme to light mode
Sourcepub fn animation_default(self) -> Self
pub fn animation_default(self) -> Self
Set animation mode to default
Sourcepub fn animation_static(self) -> Self
pub fn animation_static(self) -> Self
Set animation mode to static
Sourcepub fn animation_animated(self) -> Self
pub fn animation_animated(self) -> Self
Set animation mode to animate
Trait Implementations§
Source§impl<'a> Clone for EmoteUrlBuilder<'a>
impl<'a> Clone for EmoteUrlBuilder<'a>
Source§fn clone(&self) -> EmoteUrlBuilder<'a>
fn clone(&self) -> EmoteUrlBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for EmoteUrlBuilder<'a>
impl<'a> RefUnwindSafe for EmoteUrlBuilder<'a>
impl<'a> Send for EmoteUrlBuilder<'a>
impl<'a> Sync for EmoteUrlBuilder<'a>
impl<'a> Unpin for EmoteUrlBuilder<'a>
impl<'a> UnwindSafe for EmoteUrlBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)