diff src/lib.rs @ 74:c7c596e6388f

Make conversations type-safe (last big reorg) (REAL) (NOT CLICKBAIT) In previous versions of Conversation, you could send messages and then return messages of the wrong type or in the wrong order or whatever. The receiver would then have to make sure that there were the right number of messages and that each message was the right type. That's annoying. This change makes the `Message` enum a two-way channel, where the asker puts their question into it, and then the answerer (the conversation) puts the answer in and returns control to the asker. The asker then only has to pull the Answer of the type they wanted out of the message.
author Paul Fisher <paul@pfish.zone>
date Fri, 06 Jun 2025 22:21:17 -0400
parents ac6881304c78
children c30811b4afae
line wrap: on
line diff
--- a/src/lib.rs	Thu Jun 05 03:41:38 2025 -0400
+++ b/src/lib.rs	Fri Jun 06 22:21:17 2025 -0400
@@ -26,17 +26,20 @@
 #![allow(dead_code)]
 
 pub mod constants;
-mod conv;
+pub mod conv;
 pub mod module;
 
 pub mod handle;
+
+#[cfg(feature = "link")]
 mod pam_ffi;
 
+#[cfg(feature = "link")]
+pub use crate::pam_ffi::{LibPamHandle, OwnedLibPamHandle};
 #[doc(inline)]
 pub use crate::{
     constants::{ErrorCode, Flags, Result},
-    conv::{Conversation, ConversationMux, DemuxedConversation, Response},
+    conv::{BinaryData, Conversation, SimpleConversation},
     handle::{PamHandleApplication, PamHandleModule, PamShared},
     module::PamModule,
-    pam_ffi::{LibPamHandle, OwnedLibPamHandle},
 };