docs(sdk): Add some missing hints for the qrcode feature
parent
82a99b5267
commit
ae0f4c4cc5
|
@ -37,6 +37,7 @@ mod sas;
|
||||||
|
|
||||||
pub use matrix_sdk_base::crypto::{AcceptSettings, CancelInfo};
|
pub use matrix_sdk_base::crypto::{AcceptSettings, CancelInfo};
|
||||||
#[cfg(feature = "qrcode")]
|
#[cfg(feature = "qrcode")]
|
||||||
|
#[cfg_attr(feature = "docs", doc(cfg(qrcode)))]
|
||||||
pub use qrcode::QrVerification;
|
pub use qrcode::QrVerification;
|
||||||
pub use requests::VerificationRequest;
|
pub use requests::VerificationRequest;
|
||||||
pub use sas::SasVerification;
|
pub use sas::SasVerification;
|
||||||
|
@ -47,6 +48,7 @@ pub enum Verification {
|
||||||
/// The `m.sas.v1` verification variant.
|
/// The `m.sas.v1` verification variant.
|
||||||
SasV1(SasVerification),
|
SasV1(SasVerification),
|
||||||
#[cfg(feature = "qrcode")]
|
#[cfg(feature = "qrcode")]
|
||||||
|
#[cfg_attr(feature = "docs", doc(cfg(qrcode)))]
|
||||||
/// The `m.qr_code.*.v1` verification variant.
|
/// The `m.qr_code.*.v1` verification variant.
|
||||||
QrV1(QrVerification),
|
QrV1(QrVerification),
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,8 +85,10 @@ impl VerificationRequest {
|
||||||
|
|
||||||
/// Accept the verification request.
|
/// Accept the verification request.
|
||||||
///
|
///
|
||||||
/// This method will accept the request and signal that it supports the
|
/// This method will accept the request and signal by default that it
|
||||||
/// `m.sas.v1`, the `m.qr_code.show.v1`, and `m.reciprocate.v1` method.
|
/// supports the `m.sas.v1`, the `m.qr_code.show.v1`, and `m.reciprocate.v1`
|
||||||
|
/// method. If the `qrcode` feature is disabled it will only signal that it
|
||||||
|
/// supports the `m.sas.v1` method.
|
||||||
///
|
///
|
||||||
/// If QR code scanning should be supported or QR code showing shouldn't be
|
/// If QR code scanning should be supported or QR code showing shouldn't be
|
||||||
/// supported the [`accept_with_methods()`] method should be used instead.
|
/// supported the [`accept_with_methods()`] method should be used instead.
|
||||||
|
@ -114,8 +116,9 @@ impl VerificationRequest {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "qrcode")]
|
|
||||||
/// Generate a QR code
|
/// Generate a QR code
|
||||||
|
#[cfg(feature = "qrcode")]
|
||||||
|
#[cfg_attr(feature = "docs", doc(cfg(qrcode)))]
|
||||||
pub async fn generate_qr_code(&self) -> Result<Option<QrVerification>> {
|
pub async fn generate_qr_code(&self) -> Result<Option<QrVerification>> {
|
||||||
Ok(self
|
Ok(self
|
||||||
.inner
|
.inner
|
||||||
|
|
Loading…
Reference in New Issue