Struct Builder

Source
pub struct Builder(/* private fields */);

Implementations§

Source§

impl Builder

Source

pub fn with_origin(self, originator: Originator) -> Self

Filters for the origin of the message

May be either a phone number, contact (unimplemented as of now) or a string. Messages which are sent via the API and do not have an origin defined will have "inbox" be the default originator.

Source

pub fn with_payload_type(self, payload_type: PayloadType) -> Self

Filters for the payload type, either being SMS or Binary

Source

pub fn with_direction(self, direction: Direction) -> Self

Filters for the direction

Source

pub fn with_status(self, status: Status) -> Self

Filters for the status of the messages being listed

Source

pub fn with_destination<T>(self, msisdn: T) -> Self
where T: Into<QueryRecipient>,

Counterpart to with_origin

Source

pub fn skip(self, skip: u32) -> Self

The number of messages to skip before listing. Allows it to be used as paginating.

Source

pub fn count(self, upper_limit: u32) -> Self

Limits the number of returned messages

Source

pub fn contains_term(self, term: &str) -> Self

Validate the message contained a fixed term

Source

pub fn between(self, start: DateTime, stop: DateTime) -> Self

Filters for messages that were sent in a certain range

Source

pub fn from(self, start: DateTime) -> Self

Defines the timspan since when the message was sent TODO rename, too amibiguous

Source

pub fn until(self, stop: DateTime) -> Self

Until what timestamp the messages we are interested in are filtered

Source

pub fn build(self) -> ListParameters

Finalizes and returns the ListParameters

Trait Implementations§

Source§

impl Default for Builder

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> 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.