[−][src]Struct mammut::media_builder::MediaBuilder
A builder pattern struct for constructing a media attachment.
Fields
file: Cow<'static, str>
The file name of the attachment to be uploaded.
description: Option<Cow<'static, str>>
The alt text of the attachment.
focus: Option<(f32, f32)>
The focus point for images.
Methods
impl MediaBuilder
[src]
pub fn new(file: Cow<'static, str>) -> Self
[src]
Create a new attachment from a file name.
pub fn description(self, description: Cow<'static, str>) -> Self
[src]
Set an alt text description for the attachment.
pub fn focus(self, f1: f32, f2: f32) -> Self
[src]
Set a focus point for an image attachment.
Trait Implementations
impl From<String> for MediaBuilder
[src]
fn from(file: String) -> MediaBuilder
[src]
impl From<&'static str> for MediaBuilder
[src]
fn from(file: &'static str) -> MediaBuilder
[src]
impl From<Cow<'static, str>> for MediaBuilder
[src]
fn from(file: Cow<'static, str>) -> MediaBuilder
[src]
impl Default for MediaBuilder
[src]
fn default() -> MediaBuilder
[src]
impl Clone for MediaBuilder
[src]
fn clone(&self) -> MediaBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for MediaBuilder
[src]
impl Serialize for MediaBuilder
[src]
Auto Trait Implementations
impl Unpin for MediaBuilder
impl Send for MediaBuilder
impl Sync for MediaBuilder
impl UnwindSafe for MediaBuilder
impl RefUnwindSafe for MediaBuilder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,