Struct AsmBuilder

Source
pub struct AsmBuilder { /* private fields */ }
Expand description

A builder pattern for constructing Asm Make sure you call build() to consume the builder and retrieve the underyling Asm

Implementations§

Source§

impl AsmBuilder

Source

pub fn new(group_id: i32) -> Self

Creates the builder. group_id is the only required paramteter which is associated to the SendGrid group_id for Asm subscriptions

§Examples

let builder = AsmBuilder::new(1);
Source

pub fn group_to_display(self, group: i32) -> Self

Adds a display group to the Asm

§Examples

let builder = AsmBuilder::new(1)
    .group_to_display(2)
    .group_to_display(3);
Source

pub fn build(self) -> Asm

Consumes the AsmBuilder and returns the underlying Asm

§Examples

let asm = AsmBuilder::new(1).build();

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.