pub struct StopTransactionRequest {
pub meter_stop: i32,
pub timestamp: DateTime,
pub transaction_id: i32,
pub id_tag: Option<String>,
pub reason: Option<Reason>,
pub transaction_data: Option<Vec<MeterValue>>,
}Expand description
Spec: OCPP 1.6 · Core · Charging Station → CSMS · CALL.
Fields§
§meter_stop: i32The meterStop member.
timestamp: DateTimeThe timestamp member.
transaction_id: i32The transactionId member.
id_tag: Option<String>The idTag member.
reason: Option<Reason>The reason member.
transaction_data: Option<Vec<MeterValue>>The transactionData member.
Implementations§
Source§impl StopTransactionRequest
impl StopTransactionRequest
Sourcepub fn new(
meter_stop: i32,
timestamp: impl Into<DateTime>,
transaction_id: i32,
) -> Self
pub fn new( meter_stop: i32, timestamp: impl Into<DateTime>, transaction_id: i32, ) -> Self
Creates a StopTransactionRequest from its required fields.
Sourcepub fn with_id_tag(self, value: impl Into<String>) -> Self
pub fn with_id_tag(self, value: impl Into<String>) -> Self
Sets the optional idTag field.
Sourcepub fn with_reason(self, value: Reason) -> Self
pub fn with_reason(self, value: Reason) -> Self
Sets the optional reason field.
Sourcepub fn with_transaction_data(self, value: Vec<MeterValue>) -> Self
pub fn with_transaction_data(self, value: Vec<MeterValue>) -> Self
Sets the optional transactionData field.
Trait Implementations§
Source§impl Clone for StopTransactionRequest
impl Clone for StopTransactionRequest
Source§fn clone(&self) -> StopTransactionRequest
fn clone(&self) -> StopTransactionRequest
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 moreimpl Confirmed for StopTransactionRequest
Source§impl Debug for StopTransactionRequest
impl Debug for StopTransactionRequest
Source§impl<'de> Deserialize<'de> for StopTransactionRequest
impl<'de> Deserialize<'de> for StopTransactionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StopTransactionRequest
impl PartialEq for StopTransactionRequest
Source§impl Request for StopTransactionRequest
impl Request for StopTransactionRequest
Source§const KIND: MessageKind = MessageKind::Call
const KIND: MessageKind = MessageKind::Call
CALL or SEND.Source§type Response = StopTransactionResponse
type Response = StopTransactionResponse
The matching response payload, or
NoResponse for a SEND.impl Sealed for StopTransactionRequest
Source§impl Serialize for StopTransactionRequest
impl Serialize for StopTransactionRequest
impl StructuralPartialEq for StopTransactionRequest
Source§impl Validate for StopTransactionRequest
impl Validate for StopTransactionRequest
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Freeze for StopTransactionRequest
impl RefUnwindSafe for StopTransactionRequest
impl Send for StopTransactionRequest
impl Sync for StopTransactionRequest
impl Unpin for StopTransactionRequest
impl UnsafeUnpin for StopTransactionRequest
impl UnwindSafe for StopTransactionRequest
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