atagen

macltok

public
Star0
Watch0
924b7c0115912af6bd8ab5191841544afcfda9c5
3
ssh://brewery@pls.lobotomise.me:33/atagen/macltok.git
src/lib.rsRust89 lines3.9 KB
1
//! A compact application backend contract on top of the Matrix Rust SDK.
2
3
mod encryption;
4
mod engine;
5
mod error;
6
mod mentions;
7
mod mentions_model;
8
#[cfg(feature = "mirror")]
9
mod mirror;
10
mod model;
11
mod normalise;
12
mod repair_model;
13
mod space_order;
14
mod transport;
15
mod uiaa;
16
mod upload;
17
#[cfg(target_family = "wasm")]
18
mod wasm;
19
20
#[cfg(all(feature = "sqlite", target_family = "wasm"))]
21
compile_error!("sqlite has no filesystem to live on in wasm, use indexeddb");
22
#[cfg(all(feature = "indexeddb", not(target_family = "wasm")))]
23
compile_error!("indexeddb only exists in a browser, use sqlite");
24
25
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
26
mod account;
27
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
28
mod accounts;
29
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
30
mod session_store;
31
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
32
mod store_lock;
33
34
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
35
pub use account::{
36
    AccountError, OAuthApplicationType, OAuthLogin, PasswordLogin, PendingOAuthLogin, Restore,
37
    Session, SessionRecord, SoftLogout, StoreConfig, UnsavedSession,
38
};
39
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
40
pub use accounts::{Account, Accounts};
41
#[cfg(any(feature = "sqlite", feature = "indexeddb"))]
42
pub use session_store::{EncryptedSessionStore, SessionStore};
43
44
pub use engine::{Engine, EngineConfig, EngineError};
45
pub use error::{Error, ErrorKind, ServerError};
46
pub use imbl;
47
pub use mentions_model::{
48
    MentionCaptureState, MentionCoverage, MentionEntry, MentionGap, MentionGapReason, MentionKey,
49
    MentionReason, MentionsBoundary, MentionsCommand, MentionsPage, MentionsUpdate,
50
    SavedMentionContext,
51
};
52
#[cfg(feature = "mirror")]
53
pub use mirror::{
54
    Mirror, MirrorHandle, SessionStatus, State, StateChange, Subscription, TimelineChange,
55
    TimelineState, Update, UploadFailure, UploadState,
56
};
57
pub use model::{
58
    AccountCommand, AttachmentEncryption, AttachmentUpload, Change, Command, CommandOutput,
59
    ConnectionState, CreateRoomOptions, EncryptionCommand, EncryptionState, EngineErrorKind,
60
    EngineFailure, Event, EventContext, EventContextCommand, EventContextPage, EventContextSession,
61
    EventRef, HistoryState, ImagePack, ImagePackSource, ImagePacks, KeyBackupState, LatestEvent,
62
    LifecycleCommand, LinkPreview, LinkPreviewImage, Media, MediaCommand, MediaDescriptor,
63
    MediaFile, MediaId, MediaKind, MediaLocation, MediaSize, MemberFilter, MemberMembership,
64
    MemberSummary, MembershipChange, Message, MessageContent, MessageEditContent, MessageKind,
65
    MessageMentions, NotificationCommand, OwnDevice, PackCommand, PackImage, PackImageInfo,
66
    PackUsage, Patch, PowerLevelChanges, Profile, PushNotification, PushNotificationEvent,
67
    PushNotificationRoom, PushNotificationSender, PushNotificationStatus, Reaction,
68
    RecentHistoryState, RecoveryState, ReplyDetails, ReplyReference, Retain, RichText,
69
    RoomCategory, RoomCommand, RoomHero, RoomListFilter, RoomMatcher, RoomMembership,
70
    RoomNotificationMode, RoomNotificationSettings, RoomPowerLevels, RoomPreset, RoomSummary,
71
    RoomVisibility, SendState, Sender, SpaceChild, Termination, ThreadSummary, TimelineCommand,
72
    TimelineContent, TimelineDiff, TimelineDiffError, TimelineEvent, TimelineId, TimelineItem,
73
    TimelineItemId, TypingState, UploadDetails, UploadOutcome, UploadThumbnail, UtdCause,
74
    VerificationAction, VerificationFailure, VerificationState, VerificationTarget,
75
};
76
pub use repair_model::{
77
    HistoryContinuity, HistoryGap, HistoryGapLifecycle, HistoryRepairCommand, HistoryRepairPhase,
78
    HistoryRepairReport, HistoryRepairStop,
79
};
80
pub use ruma;
81
#[doc(hidden)]
82
pub use transport::PublicationAck;
83
pub use transport::{ClientHandle, EventStream, Pending, SpaceHierarchy};
84
pub use uiaa::{
85
    InteractiveAuth, InteractiveAuthChallenge, InteractiveAuthFailure, InteractiveAuthFlow,
86
    InteractiveAuthOutcome,
87
};
88
#[cfg(target_family = "wasm")]
89
pub use wasm::on_panic;