events: Clean up docs
This commit is contained in:
parent
c8f780dbbb
commit
ddc2138141
@ -121,7 +121,7 @@ pub struct SasV1Content {
|
|||||||
pub commitment: String,
|
pub commitment: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Mandatory initial set of fields for creating an accept `MSasV1Content`.
|
/// Mandatory initial set of fields for creating an accept `SasV1Content`.
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize)]
|
||||||
pub struct SasV1ContentInit {
|
pub struct SasV1ContentInit {
|
||||||
/// The key agreement protocol the device is choosing to use, out of the
|
/// The key agreement protocol the device is choosing to use, out of the
|
||||||
@ -149,7 +149,7 @@ pub struct SasV1ContentInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl From<SasV1ContentInit> for SasV1Content {
|
impl From<SasV1ContentInit> for SasV1Content {
|
||||||
/// Creates a new `MSasV1Content` from the given init struct.
|
/// Creates a new `SasV1Content` from the given init struct.
|
||||||
fn from(init: SasV1ContentInit) -> Self {
|
fn from(init: SasV1ContentInit) -> Self {
|
||||||
SasV1Content {
|
SasV1Content {
|
||||||
hash: init.hash,
|
hash: init.hash,
|
||||||
|
@ -120,7 +120,7 @@ pub struct ReciprocateV1Content {
|
|||||||
|
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
impl ReciprocateV1Content {
|
impl ReciprocateV1Content {
|
||||||
/// Create a new `MReciprocateV1Content` with the given shared secret.
|
/// Create a new `ReciprocateV1Content` with the given shared secret.
|
||||||
///
|
///
|
||||||
/// The shared secret needs to come from the scanned QR code, encoded using
|
/// The shared secret needs to come from the scanned QR code, encoded using
|
||||||
/// unpadded base64.
|
/// unpadded base64.
|
||||||
@ -155,7 +155,7 @@ pub struct SasV1Content {
|
|||||||
pub short_authentication_string: Vec<ShortAuthenticationString>,
|
pub short_authentication_string: Vec<ShortAuthenticationString>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Mandatory initial set of fields for creating an `MSasV1Content`.
|
/// Mandatory initial set of fields for creating an `SasV1Content`.
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize)]
|
||||||
pub struct SasV1ContentInit {
|
pub struct SasV1ContentInit {
|
||||||
/// The key agreement protocols the sending device understands.
|
/// The key agreement protocols the sending device understands.
|
||||||
@ -180,7 +180,7 @@ pub struct SasV1ContentInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SasV1Content {
|
impl SasV1Content {
|
||||||
/// Create a new `MSasV1Content` with the given values.
|
/// Create a new `SasV1Content` with the given values.
|
||||||
///
|
///
|
||||||
/// # Errors
|
/// # Errors
|
||||||
///
|
///
|
||||||
@ -199,7 +199,7 @@ impl SasV1Content {
|
|||||||
impl TryFrom<SasV1ContentInit> for SasV1Content {
|
impl TryFrom<SasV1ContentInit> for SasV1Content {
|
||||||
type Error = InvalidInput;
|
type Error = InvalidInput;
|
||||||
|
|
||||||
/// Creates a new `MSasV1Content` from the given init struct.
|
/// Creates a new `SasV1Content` from the given init struct.
|
||||||
fn try_from(init: SasV1ContentInit) -> Result<Self, Self::Error> {
|
fn try_from(init: SasV1ContentInit) -> Result<Self, Self::Error> {
|
||||||
if !init.key_agreement_protocols.contains(&KeyAgreementProtocol::Curve25519)
|
if !init.key_agreement_protocols.contains(&KeyAgreementProtocol::Curve25519)
|
||||||
&& !init.key_agreement_protocols.contains(&KeyAgreementProtocol::Curve25519HkdfSha256)
|
&& !init.key_agreement_protocols.contains(&KeyAgreementProtocol::Curve25519HkdfSha256)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user