cell: Add code to iterate over IntroEstablished extensions

This commit is contained in:
Nick Mathewson 2023-08-15 13:05:53 -04:00
parent 09d99f1053
commit bac156bcf5
2 changed files with 8 additions and 1 deletions

View File

@ -1 +1,2 @@
ADDED: establish_intro functions now take any impl<Into<HsMacKey>>.
ADDED: Iterator over IntroEstablishedExt.

View File

@ -310,7 +310,8 @@ decl_extension_group! {
///
/// (Currently, no extensions of this type are recognized)
#[derive(Debug,Clone)]
enum IntroEstablishedExt [ IntroEstablishedExtType ] {
#[non_exhaustive]
pub enum IntroEstablishedExt [ IntroEstablishedExtType ] {
}
}
@ -327,6 +328,11 @@ impl IntroEstablished {
pub fn new() -> Self {
Self::default()
}
/// Return an iterator over the extensions declared in this message.
pub fn iter_extensions(&self) -> impl Iterator<Item = &IntroEstablishedExt> {
self.extensions.iter()
}
}
impl Body for IntroEstablished {