Skip to content

Commit

Permalink
Merge pull request #253 from TheNeikos/feature/add_yoke
Browse files Browse the repository at this point in the history
Add yokeable to packets
  • Loading branch information
TheNeikos authored Mar 25, 2024
2 parents 50a2f01 + eec6f7b commit 55843b6
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ crate::v5::properties::define_properties! {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901217")]
pub struct MAuth<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/connack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ define_properties![
}
];

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901074")]
pub struct MConnack<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use crate::v5::write::WResult;
use crate::v5::write::WriteMqttPacket;
use crate::v5::MResult;

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
pub struct MConnect<'i> {
pub client_identifier: &'i str,
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/disconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ define_properties! {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901205")]
pub struct MDisconnect<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub mod subscribe;
pub mod unsuback;
pub mod unsubscribe;

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug)]
pub enum MqttPacket<'i> {
Auth(MAuth<'i>),
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/pingreq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::v5::write::WResult;
use crate::v5::write::WriteMqttPacket;
use crate::v5::MResult;

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901195")]
pub struct MPingreq;
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/pingresp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::v5::write::WResult;
use crate::v5::write::WriteMqttPacket;
use crate::v5::MResult;

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901200")]
pub struct MPingresp;
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/puback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ define_properties!(
}
);

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901121")]
pub struct MPuback<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/pubcomp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ crate::v5::properties::define_properties! {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901151")]
pub struct MPubcomp<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use crate::v5::write::WResult;
use crate::v5::write::WriteMqttPacket;
use crate::v5::MResult;

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901100")]
pub struct MPublish<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/pubrec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ crate::v5::properties::define_properties![
}
];

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901131")]
pub struct MPubrec<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/pubrel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ define_properties!(
}
);

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901141")]
pub struct MPubrel<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/suback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ crate::v5::properties::define_properties! {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901171")]
pub struct MSuback<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ impl<'i> Iterator for SubscriptionsIter<'i> {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
pub struct MSubscribe<'i> {
pub packet_identifier: PacketIdentifier,
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/unsuback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ crate::v5::properties::define_properties! {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901187")]
pub struct MUnsuback<'i> {
Expand Down
1 change: 1 addition & 0 deletions mqtt-format/src/v5/packets/unsubscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ impl<'i> Unsubscription<'i> {
}
}

#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[derive(Debug, PartialEq)]
#[doc = crate::v5::util::md_speclink!("_Toc3901179")]
pub struct MUnsubscribe<'i> {
Expand Down

0 comments on commit 55843b6

Please sign in to comment.