#[non_exhaustive]pub struct GovernanceEvent {
pub message: String,
pub event_type: EventType,
pub entity: Option<Entity>,
/* private fields */
}Expand description
Payload associated with Governance related log events.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: StringThe log message.
event_type: EventTypeThe type of the event.
entity: Option<Entity>Entity resource information if the log event is associated with a specific entity.
Implementations§
Source§impl GovernanceEvent
impl GovernanceEvent
pub fn new() -> Self
Sourcepub fn set_message<T: Into<String>>(self, v: T) -> Self
pub fn set_message<T: Into<String>>(self, v: T) -> Self
Sets the value of message.
Sourcepub fn set_event_type<T: Into<EventType>>(self, v: T) -> Self
pub fn set_event_type<T: Into<EventType>>(self, v: T) -> Self
Sets the value of event_type.
Sourcepub fn set_entity<T>(self, v: T) -> Self
pub fn set_entity<T>(self, v: T) -> Self
Sets the value of entity.
Trait Implementations§
Source§impl Clone for GovernanceEvent
impl Clone for GovernanceEvent
Source§fn clone(&self) -> GovernanceEvent
fn clone(&self) -> GovernanceEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GovernanceEvent
impl Debug for GovernanceEvent
Source§impl Default for GovernanceEvent
impl Default for GovernanceEvent
Source§fn default() -> GovernanceEvent
fn default() -> GovernanceEvent
Returns the “default value” for a type. Read more
Source§impl Message for GovernanceEvent
impl Message for GovernanceEvent
Source§impl PartialEq for GovernanceEvent
impl PartialEq for GovernanceEvent
impl StructuralPartialEq for GovernanceEvent
Auto Trait Implementations§
impl Freeze for GovernanceEvent
impl RefUnwindSafe for GovernanceEvent
impl Send for GovernanceEvent
impl Sync for GovernanceEvent
impl Unpin for GovernanceEvent
impl UnwindSafe for GovernanceEvent
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