From 629eecd5107d37bd8d7e51f35222ec9518be374f Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Thu, 13 Apr 2023 18:07:02 +0200 Subject: [PATCH] Add a comment about the interaction between CardTransaction::init_card_caps and CardTransaction::initialize --- openpgp-card/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpgp-card/src/lib.rs b/openpgp-card/src/lib.rs index a89a12a..ee0f362 100644 --- a/openpgp-card/src/lib.rs +++ b/openpgp-card/src/lib.rs @@ -70,7 +70,11 @@ pub trait CardTransaction { /// Set the card capabilities in the CardTransaction. /// /// Setting these capabilities is typically part of a bootstrapping - /// process: the information about the card's capabilities is typically + /// process (this fn is typically called from [CardTransaction::initialize]. + /// When implementing CardTransaction, you probably want to call + /// [CardTransaction::initialize] during setup). + /// + /// The information about the card's capabilities is typically /// requested from the card using the same CardTransaction instance, /// before the card's capabilities have been initialized. fn init_card_caps(&mut self, caps: CardCaps);