File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file.
88
99### Features
1010
11+ - Add ` QrCodeData::to_bytes() ` to allow generation of a QR code.
12+ ([ #5939 ] ( https://github.com/matrix-org/matrix-rust-sdk/pull/5939 ) )
1113- [ ** breaking** ] : The new Latest Event API replaces the old API.
1214 ` Room::new_latest_event ` overwrites the ` Room::latest_event ` method. See the
1315 documentation of ` matrix_sdk::latest_event ` to learn about the new API.
Original file line number Diff line number Diff line change @@ -236,6 +236,12 @@ impl QrCodeData {
236236 Ok ( Self { inner : qrcode:: QrCodeData :: from_bytes ( & bytes) ? } . into ( ) )
237237 }
238238
239+ /// Serialize the [`QrCodeData`] into a byte vector for encoding as a QR
240+ /// code.
241+ pub fn to_bytes ( & self ) -> Vec < u8 > {
242+ self . inner . to_bytes ( )
243+ }
244+
239245 /// The server name contained within the scanned QR code data.
240246 ///
241247 /// Note: This value is only present when scanning a QR code the belongs to
You can’t perform that action at this time.
0 commit comments