Struct jcm::RejectedEvent
source · #[repr(C)]pub struct RejectedEvent { /* private fields */ }Expand description
Represents a reject event.
Implementations§
source§impl RejectedEvent
impl RejectedEvent
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new RejectedEvent.
sourcepub const fn create(
event_type: EventType,
event_code: EventCode,
reject_code: RejectCode
) -> Self
pub const fn create( event_type: EventType, event_code: EventCode, reject_code: RejectCode ) -> Self
Creates a new RejectedEvent from the provided parameters.
sourcepub const fn message_type(&self) -> MessageType
pub const fn message_type(&self) -> MessageType
Gets the MessageType of the RejectedEvent.
sourcepub const fn event_type(&self) -> EventType
pub const fn event_type(&self) -> EventType
Gets the EventType of the RejectedEvent.
sourcepub fn set_event_type(&mut self, event_type: EventType)
pub fn set_event_type(&mut self, event_type: EventType)
Sets the EventType of the RejectedEvent.
sourcepub fn with_event_type(self, event_type: EventType) -> Self
pub fn with_event_type(self, event_type: EventType) -> Self
Builder function that sets the EventType of the RejectedEvent.
sourcepub const fn message_code(&self) -> MessageCode
pub const fn message_code(&self) -> MessageCode
Gets the MessageCode of the RejectedEvent.
sourcepub const fn event_code(&self) -> EventCode
pub const fn event_code(&self) -> EventCode
Gets the EventCode of the RejectedEvent.
sourcepub fn set_event_code(&mut self, event_code: EventCode) -> Result<()>
pub fn set_event_code(&mut self, event_code: EventCode) -> Result<()>
Sets the EventCode of the RejectedEvent.
event_code must be one of EventCode::Rejected or EventCode::AcceptorRejected.
sourcepub fn with_event_code(self, event_code: EventCode) -> Result<Self>
pub fn with_event_code(self, event_code: EventCode) -> Result<Self>
Builder function that sets the EventCode of the RejectedEvent.
event_code must be one of EventCode::Rejected or EventCode::AcceptorRejected.
sourcepub const fn reject_code(&self) -> RejectCode
pub const fn reject_code(&self) -> RejectCode
Gets the RejectCode of the RejectedEvent.
sourcepub fn set_reject_code(&mut self, reject_code: RejectCode)
pub fn set_reject_code(&mut self, reject_code: RejectCode)
Sets the RejectCode of the RejectedEvent.
sourcepub fn with_reject_code(self, reject_code: RejectCode) -> Self
pub fn with_reject_code(self, reject_code: RejectCode) -> Self
Builder function that sets the RejectCode of the RejectedEvent.
Trait Implementations§
source§impl Clone for RejectedEvent
impl Clone for RejectedEvent
source§fn clone(&self) -> RejectedEvent
fn clone(&self) -> RejectedEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RejectedEvent
impl Debug for RejectedEvent
source§impl Default for RejectedEvent
impl Default for RejectedEvent
source§impl From<&RejectedEvent> for Message
impl From<&RejectedEvent> for Message
source§fn from(val: &RejectedEvent) -> Self
fn from(val: &RejectedEvent) -> Self
source§impl From<&RejectedEvent> for MessageData
impl From<&RejectedEvent> for MessageData
source§fn from(val: &RejectedEvent) -> Self
fn from(val: &RejectedEvent) -> Self
source§impl From<RejectedEvent> for Message
impl From<RejectedEvent> for Message
source§fn from(val: RejectedEvent) -> Self
fn from(val: RejectedEvent) -> Self
source§impl From<RejectedEvent> for MessageData
impl From<RejectedEvent> for MessageData
source§fn from(val: RejectedEvent) -> Self
fn from(val: RejectedEvent) -> Self
source§impl PartialEq for RejectedEvent
impl PartialEq for RejectedEvent
source§fn eq(&self, other: &RejectedEvent) -> bool
fn eq(&self, other: &RejectedEvent) -> bool
self and other values to be equal, and is used
by ==.