pub struct AccountChangeMessage {
pub output_mode: ConsoleOutputMode,
pub action: String,
pub result: String,
pub status: MessageStatus,
pub src_user: String,
pub dest_user: String,
}Fields§
§output_mode: ConsoleOutputMode§action: String§result: String§status: MessageStatus§src_user: String§dest_user: StringTrait Implementations§
Source§impl Debug for AccountChangeMessage
impl Debug for AccountChangeMessage
Source§impl Default for AccountChangeMessage
impl Default for AccountChangeMessage
Source§impl<'de> Deserialize<'de> for AccountChangeMessage
impl<'de> Deserialize<'de> for AccountChangeMessage
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 Display for AccountChangeMessage
This outputs in either JSON or Text depending on the output_mode setting
impl Display for AccountChangeMessage
This outputs in either JSON or Text depending on the output_mode setting
use std::fmt::format;
use kanidm_proto::messages::*;
let mut msg = AccountChangeMessage::default();
msg.action=String::from("cake_eating");
msg.src_user=String::from("Kani");
msg.dest_user=String::from("Krabby");
msg.result=String::from("It was amazing");
assert_eq!(msg.status, MessageStatus::Success);
let expected_result = "success - cake_eating for Krabby: It was amazing";
assert_eq!(format!("{}", msg), expected_result);
msg.output_mode = ConsoleOutputMode::JSON;
let expected_result = "{\"action\":\"cake_eating\",\"result\":\"It was amazing\",\"status\":\"success\",\"src_user\":\"Kani\",\"dest_user\":\"Krabby\"}";
assert_eq!(format!("{}", msg), expected_result);Auto Trait Implementations§
impl Freeze for AccountChangeMessage
impl RefUnwindSafe for AccountChangeMessage
impl Send for AccountChangeMessage
impl Sync for AccountChangeMessage
impl Unpin for AccountChangeMessage
impl UnwindSafe for AccountChangeMessage
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].