Skip to main content

TerminalBuilder

Struct TerminalBuilder 

Source
pub struct TerminalBuilder<S: State = Empty> { /* private fields */ }
Available on crate feature v2_3_0 only.
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> TerminalBuilder<S>

Source

pub fn build(self) -> Terminal
where S: IsComplete,

Finish building and return the requested object

Source

pub fn terminal_id( self, value: impl Into<CiString<36>>, ) -> TerminalBuilder<SetTerminalId<S>>
where S::TerminalId: IsUnset,

Required.

Unique ID that identifies a terminal.

Source

pub fn customer_reference( self, value: impl Into<CiString<36>>, ) -> TerminalBuilder<SetCustomerReference<S>>
where S::CustomerReference: IsUnset,

Optional (Some / Option setters). Reference used to link the terminal to a CSMS.

Source

pub fn maybe_customer_reference( self, value: Option<impl Into<CiString<36>>>, ) -> TerminalBuilder<SetCustomerReference<S>>
where S::CustomerReference: IsUnset,

Optional (Some / Option setters). Reference used to link the terminal to a CSMS.

Source

pub fn party_id( self, value: impl Into<PartyId>, ) -> TerminalBuilder<SetPartyId<S>>
where S::PartyId: IsUnset,

Optional (Some / Option setters). Party ID, as an alternative to the customer reference.

Source

pub fn maybe_party_id( self, value: Option<impl Into<PartyId>>, ) -> TerminalBuilder<SetPartyId<S>>
where S::PartyId: IsUnset,

Optional (Some / Option setters). Party ID, as an alternative to the customer reference.

Source

pub fn country_code( self, value: impl Into<CountryCode>, ) -> TerminalBuilder<SetCountryCode<S>>
where S::CountryCode: IsUnset,

Optional (Some / Option setters). Country code, as an alternative to the customer reference.

Source

pub fn maybe_country_code( self, value: Option<impl Into<CountryCode>>, ) -> TerminalBuilder<SetCountryCode<S>>
where S::CountryCode: IsUnset,

Optional (Some / Option setters). Country code, as an alternative to the customer reference.

Source

pub fn address( self, value: impl Into<CiString<45>>, ) -> TerminalBuilder<SetAddress<S>>
where S::Address: IsUnset,

Optional (Some / Option setters). Street/block name and house number if available.

Source

pub fn maybe_address( self, value: Option<impl Into<CiString<45>>>, ) -> TerminalBuilder<SetAddress<S>>
where S::Address: IsUnset,

Optional (Some / Option setters). Street/block name and house number if available.

Source

pub fn city(self, value: impl Into<CiString<45>>) -> TerminalBuilder<SetCity<S>>
where S::City: IsUnset,

Optional (Some / Option setters). City or town.

Source

pub fn maybe_city( self, value: Option<impl Into<CiString<45>>>, ) -> TerminalBuilder<SetCity<S>>
where S::City: IsUnset,

Optional (Some / Option setters). City or town.

Source

pub fn postal_code( self, value: impl Into<CiString<10>>, ) -> TerminalBuilder<SetPostalCode<S>>
where S::PostalCode: IsUnset,

Optional (Some / Option setters). Postal code of the terminal.

Source

pub fn maybe_postal_code( self, value: Option<impl Into<CiString<10>>>, ) -> TerminalBuilder<SetPostalCode<S>>
where S::PostalCode: IsUnset,

Optional (Some / Option setters). Postal code of the terminal.

Source

pub fn state( self, value: impl Into<CiString<20>>, ) -> TerminalBuilder<SetState<S>>
where S::State: IsUnset,

Optional (Some / Option setters). State or province, only where relevant.

Source

pub fn maybe_state( self, value: Option<impl Into<CiString<20>>>, ) -> TerminalBuilder<SetState<S>>
where S::State: IsUnset,

Optional (Some / Option setters). State or province, only where relevant.

Source

pub fn country( self, value: impl Into<CiString<3>>, ) -> TerminalBuilder<SetCountry<S>>
where S::Country: IsUnset,

Optional (Some / Option setters). ISO 3166-1 alpha-3 code for the country of this terminal.

Source

pub fn maybe_country( self, value: Option<impl Into<CiString<3>>>, ) -> TerminalBuilder<SetCountry<S>>
where S::Country: IsUnset,

Optional (Some / Option setters). ISO 3166-1 alpha-3 code for the country of this terminal.

Source

pub fn coordinates( self, value: impl Into<GeoLocation>, ) -> TerminalBuilder<SetCoordinates<S>>
where S::Coordinates: IsUnset,

Optional (Some / Option setters). Coordinates of the terminal.

Source

pub fn maybe_coordinates( self, value: Option<impl Into<GeoLocation>>, ) -> TerminalBuilder<SetCoordinates<S>>
where S::Coordinates: IsUnset,

Optional (Some / Option setters). Coordinates of the terminal.

Source

pub fn invoice_base_url( self, value: impl Into<Url>, ) -> TerminalBuilder<SetInvoiceBaseUrl<S>>
where S::InvoiceBaseUrl: IsUnset,

Optional (Some / Option setters). Base URL of the downloadable invoice.

The full URL is this base plus the session’s authorization_reference; see InvoiceCreator::Cpo.

Source

pub fn maybe_invoice_base_url( self, value: Option<impl Into<Url>>, ) -> TerminalBuilder<SetInvoiceBaseUrl<S>>
where S::InvoiceBaseUrl: IsUnset,

Optional (Some / Option setters). Base URL of the downloadable invoice.

The full URL is this base plus the session’s authorization_reference; see InvoiceCreator::Cpo.

Source

pub fn invoice_creator( self, value: impl Into<InvoiceCreator>, ) -> TerminalBuilder<SetInvoiceCreator<S>>
where S::InvoiceCreator: IsUnset,

Optional (Some / Option setters). Which party creates the invoice for the eDriver.

Source

pub fn maybe_invoice_creator( self, value: Option<impl Into<InvoiceCreator>>, ) -> TerminalBuilder<SetInvoiceCreator<S>>
where S::InvoiceCreator: IsUnset,

Optional (Some / Option setters). Which party creates the invoice for the eDriver.

Source

pub fn reference( self, value: impl Into<CiString<36>>, ) -> TerminalBuilder<SetReference<S>>
where S::Reference: IsUnset,

Optional (Some / Option setters). Mapping value as issued by the PTP, e.g. a serial number.

Source

pub fn maybe_reference( self, value: Option<impl Into<CiString<36>>>, ) -> TerminalBuilder<SetReference<S>>
where S::Reference: IsUnset,

Optional (Some / Option setters). Mapping value as issued by the PTP, e.g. a serial number.

Source

pub fn location_ids( self, value: impl Into<Vec<CiString<36>>>, ) -> TerminalBuilder<SetLocationIds<S>>
where S::LocationIds: IsUnset,

Optional (Some / Option setters). Default: <Vec<CiString<36>> as Default>::default().

All Locations assigned to this terminal.

Source

pub fn maybe_location_ids( self, value: Option<impl Into<Vec<CiString<36>>>>, ) -> TerminalBuilder<SetLocationIds<S>>
where S::LocationIds: IsUnset,

Optional (Some / Option setters). Default: <Vec<CiString<36>> as Default>::default().

All Locations assigned to this terminal.

Source

pub fn evse_uids( self, value: impl Into<Vec<CiString<36>>>, ) -> TerminalBuilder<SetEvseUids<S>>
where S::EvseUids: IsUnset,

Optional (Some / Option setters). Default: <Vec<CiString<36>> as Default>::default().

All EVSEs assigned to this terminal.

Source

pub fn maybe_evse_uids( self, value: Option<impl Into<Vec<CiString<36>>>>, ) -> TerminalBuilder<SetEvseUids<S>>
where S::EvseUids: IsUnset,

Optional (Some / Option setters). Default: <Vec<CiString<36>> as Default>::default().

All EVSEs assigned to this terminal.

Source

pub fn last_updated( self, value: impl Into<DateTime>, ) -> TerminalBuilder<SetLastUpdated<S>>
where S::LastUpdated: IsUnset,

Required.

Timestamp when this Terminal was last updated (or created).

Source

pub fn extensions( self, value: impl Into<Extensions>, ) -> TerminalBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters). Default: <Extensions as Default>::default().

Undocumented JSON fields, preserved verbatim.

Source

pub fn maybe_extensions( self, value: Option<impl Into<Extensions>>, ) -> TerminalBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters). Default: <Extensions as Default>::default().

Undocumented JSON fields, preserved verbatim.

Auto Trait Implementations§

§

impl<S> Freeze for TerminalBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Terminal>)>: Freeze,

§

impl<S> RefUnwindSafe for TerminalBuilder<S>

§

impl<S> Send for TerminalBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Terminal>)>: Send,

§

impl<S> Sync for TerminalBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Terminal>)>: Sync,

§

impl<S> Unpin for TerminalBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Terminal>)>: Unpin,

§

impl<S> UnsafeUnpin for TerminalBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Terminal>)>: UnsafeUnpin,

§

impl<S> UnwindSafe for TerminalBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Terminal>)>: UnwindSafe,

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more