Skip to content

Commit 5c1827f

Browse files
Daniel SalinasDaniel Salinas
authored andcommitted
Send/Sync bounds
1 parent 4680354 commit 5c1827f

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

crates/matrix-sdk-base/src/room/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ use eyeball::{AsyncLock, SharedObservable};
4141
use futures_util::{Stream, StreamExt};
4242
#[cfg(feature = "e2e-encryption")]
4343
use matrix_sdk_common::ring_buffer::RingBuffer;
44+
#[cfg(feature = "test-send-sync")]
45+
use matrix_sdk_common::{SendOutsideWasm, SyncOutsideWasm};
4446
pub use members::{RoomMember, RoomMembersUpdate, RoomMemberships};
4547
pub(crate) use room_info::SyncInfo;
4648
pub use room_info::{

crates/matrix-sdk-common/src/deserialized_responses.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ use crate::{
3434
debug::{DebugRawEvent, DebugStructExt},
3535
serde_helpers::extract_bundled_thread_summary,
3636
};
37+
#[cfg(feature = "test-send-sync")]
38+
use crate::{SendOutsideWasm, SyncOutsideWasm};
3739

3840
const AUTHENTICITY_NOT_GUARANTEED: &str =
3941
"The authenticity of this encrypted message can't be guaranteed on this device.";

crates/matrix-sdk/src/sliding_sync/list/builder.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ impl SlidingSyncListBuilder {
111111
self
112112
}
113113

114+
#[cfg(target_family = "wasm")]
115+
pub fn once_built<C>(mut self, callback: C) -> Self
116+
where
117+
C: Fn(SlidingSyncList) -> SlidingSyncList + 'static,
118+
{
119+
self.once_built = Arc::new(Box::new(callback));
120+
self
121+
}
122+
114123
/// Which SlidingSyncMode to start this list under.
115124
pub fn sync_mode(mut self, value: impl Into<SlidingSyncMode>) -> Self {
116125
self.sync_mode = value.into();

0 commit comments

Comments
 (0)