atagen

macltok

public
Star0
Watch0
fbeaaa098107ea3a2693391aaa175f1c17cf2899
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,
61
    EventContextPage, EventContextSession, EventRef, HistoryState, ImagePack, ImagePackSource,
62
    ImagePacks, KeyBackupState, LatestEvent, LifecycleCommand, LinkPreview, LinkPreviewImage,
63
    Media, MediaCommand, MediaDescriptor, MediaFile, MediaId, MediaKind, MediaLocation, MediaSize,
64
    MemberFilter, MemberMembership, MemberSummary, MembershipChange, Message, MessageContent,
65
    MessageEditContent, MessageKind, MessageMentions, NotificationCommand, OwnDevice, PackCommand,
66
    PackImage, PackImageInfo, PackUsage, Patch, PowerLevelChanges, Profile, PushNotification,
67
    PushNotificationEvent, PushNotificationRoom, PushNotificationSender, PushNotificationStatus,
68
    Reaction, 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, ThreadListCloseReason,
72
    ThreadListCommand, ThreadListEntry, ThreadSummary, ThreadUnread, TimelineCommand,
73
    TimelineContent, TimelineDiff, TimelineDiffError, TimelineEvent, TimelineId, TimelineItem,
74
    TimelineItemId, TypingState, UploadDetails, UploadOutcome, UploadThumbnail, UtdCause,
75
    VerificationAction, VerificationFailure, 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;