pub struct ShortenRequest { /* private fields */ }Expand description
Request payload for POST / (shorten URL).
Implementations§
Source§impl ShortenRequest
impl ShortenRequest
Sourcepub fn new<U: Into<String>>(url: U) -> Self
pub fn new<U: Into<String>>(url: U) -> Self
Creates a new ShortenRequest with the mandatory url.
Sourcepub fn alias<A: Into<String>>(self, alias: A) -> Self
pub fn alias<A: Into<String>>(self, alias: A) -> Self
Optional custom alias (must follow API rules)
Sourcepub fn password<P: Into<String>>(self, password: P) -> Self
pub fn password<P: Into<String>>(self, password: P) -> Self
Optional password (must follow API rules).
Sourcepub fn max_clicks(self, max: u32) -> Self
pub fn max_clicks(self, max: u32) -> Self
Optional max-clicks (must be positive).
Sourcepub fn block_bots(self, flag: bool) -> Self
pub fn block_bots(self, flag: bool) -> Self
Optional block bots flag.
Trait Implementations§
Source§impl Clone for ShortenRequest
impl Clone for ShortenRequest
Source§fn clone(&self) -> ShortenRequest
fn clone(&self) -> ShortenRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShortenRequest
impl Debug for ShortenRequest
Source§impl Default for ShortenRequest
impl Default for ShortenRequest
Source§fn default() -> ShortenRequest
fn default() -> ShortenRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShortenRequest
impl RefUnwindSafe for ShortenRequest
impl Send for ShortenRequest
impl Sync for ShortenRequest
impl Unpin for ShortenRequest
impl UnsafeUnpin for ShortenRequest
impl UnwindSafe for ShortenRequest
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