atagen

macltok

public
Star0
Watch0
66db1b3cd8955da257726f2f3028b931ba34c3c0
3
ssh://brewery@pls.lobotomise.me:33/atagen/macltok.git
src/lib.rsRust90 lines4.0 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, ThreadListChange,
55
    ThreadListState, TimelineChange, 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, EventContextCloseReason, 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, ThreadListCommand, ThreadListEntry,
72
    ThreadSummary, ThreadUnread, TimelineCommand, TimelineContent, TimelineDiff, TimelineDiffError,
73
    TimelineEvent, TimelineId, TimelineItem, TimelineItemId, TypingState, UploadDetails,
74
    UploadOutcome, UploadThumbnail, UtdCause, VerificationAction, VerificationFailure,
75
    VerificationState, VerificationTarget,
76
};
77
pub use repair_model::{
78
    HistoryContinuity, HistoryGap, HistoryGapLifecycle, HistoryRepairCommand, HistoryRepairPhase,
79
    HistoryRepairReport, HistoryRepairStop,
80
};
81
pub use ruma;
82
#[doc(hidden)]
83
pub use transport::PublicationAck;
84
pub use transport::{ClientHandle, EventStream, Pending, SpaceHierarchy};
85
pub use uiaa::{
86
    InteractiveAuth, InteractiveAuthChallenge, InteractiveAuthFailure, InteractiveAuthFlow,
87
    InteractiveAuthOutcome,
88
};
89
#[cfg(target_family = "wasm")]
90
pub use wasm::on_panic;