comparison src/conv.rs @ 146:1bc52025156b

Split PAM items into their own separate struct. To trim down the number of methods on `PamShared`, this puts all the Items into their own struct(s). This also makes the split between authtok/authtok_item easier to understand.
author Paul Fisher <paul@pfish.zone>
date Sun, 06 Jul 2025 19:10:26 -0400
parents ebb71a412b58
children
comparison
equal deleted inserted replaced
145:8f964b701652 146:1bc52025156b
410 self.communicate(&[<$msg>::new($param.as_ref()).exchange()]); 410 self.communicate(&[<$msg>::new($param.as_ref()).exchange()]);
411 } 411 }
412 }; 412 };
413 } 413 }
414 414
415 impl<C: Conversation> ConversationAdapter for C { 415 impl<C: Conversation + ?Sized> ConversationAdapter for C {
416 conv_fn!(prompt(message: OsStr) -> OsString { QAndA }); 416 conv_fn!(prompt(message: OsStr) -> OsString { QAndA });
417 conv_fn!(masked_prompt(message: OsStr) -> OsString { MaskedQAndA } ); 417 conv_fn!(masked_prompt(message: OsStr) -> OsString { MaskedQAndA } );
418 conv_fn!(error_msg(message: OsStr) { ErrorMsg }); 418 conv_fn!(error_msg(message: OsStr) { ErrorMsg });
419 conv_fn!(info_msg(message: OsStr) { InfoMsg }); 419 conv_fn!(info_msg(message: OsStr) { InfoMsg });
420 conv_fn!(radio_prompt(message: OsStr) -> OsString { RadioQAndA }); 420 conv_fn!(radio_prompt(message: OsStr) -> OsString { RadioQAndA });