atagen

macltok

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