atagen

macltok

public
Star0
Watch0
e4bb841a0497f1f169e75a66425e64b6c0981643
3
ssh://brewery@pls.lobotomise.me:33/atagen/macltok.git
src/lib.rsRust88 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, MentionKey, MentionReason,
49
    MentionsBoundary, MentionsCommand, MentionsPage, MentionsUpdate, SavedMentionContext,
50
};
51
#[cfg(feature = "mirror")]
52
pub use mirror::{
53
    Mirror, MirrorHandle, SessionStatus, State, StateChange, Subscription, TimelineChange,
54
    TimelineState, Update, UploadFailure, UploadState,
55
};
56
pub use model::{
57
    AccountCommand, AttachmentEncryption, AttachmentUpload, Change, Command, CommandOutput,
58
    ConnectionState, CreateRoomOptions, EncryptionCommand, EncryptionState, EngineErrorKind,
59
    EngineFailure, Event, EventContext, EventContextCommand, EventContextDirection,
60
    EventContextPage, EventRef, HistoryState, ImagePack, ImagePackSource, ImagePacks,
61
    KeyBackupState, LatestEvent, LifecycleCommand, LinkPreview, LinkPreviewImage, Media,
62
    MediaCommand, MediaDescriptor, MediaFile, MediaId, MediaKind, MediaLocation, MediaSize,
63
    MemberFilter, MemberMembership, MemberSummary, MembershipChange, Message, MessageContent,
64
    MessageEditContent, MessageKind, MessageMentions, NotificationCommand, OwnDevice, PackCommand,
65
    PackImage, PackImageInfo, PackUsage, Patch, PowerLevelChanges, Profile, PushNotification,
66
    PushNotificationEvent, PushNotificationRoom, PushNotificationSender, PushNotificationStatus,
67
    Reaction, RecoveryState, ReplyDetails, ReplyReference, Retain, RichText, RoomCategory,
68
    RoomCommand, RoomHero, RoomListFilter, RoomMatcher, RoomMembership, RoomNotificationMode,
69
    RoomNotificationSettings, RoomPowerLevels, RoomPreset, RoomSummary, RoomVisibility, SendState,
70
    Sender, SpaceChild, Termination, ThreadSummary, TimelineCommand, TimelineContent, TimelineDiff,
71
    TimelineDiffError, TimelineEvent, TimelineId, TimelineItem, TimelineItemId, TypingState,
72
    UploadDetails, UploadOutcome, UploadThumbnail, UtdCause, VerificationAction,
73
    VerificationFailure, VerificationState, VerificationTarget,
74
};
75
pub use repair_model::{
76
    HistoryContinuity, HistoryRepairBudget, HistoryRepairCommand, HistoryRepairPhase,
77
    HistoryRepairPolicy, HistoryRepairReport, HistoryRepairStop, HistoryRepairStrategy,
78
};
79
pub use ruma;
80
#[doc(hidden)]
81
pub use transport::PublicationAck;
82
pub use transport::{ClientHandle, EventStream, Pending, SpaceHierarchy};
83
pub use uiaa::{
84
    InteractiveAuth, InteractiveAuthChallenge, InteractiveAuthFailure, InteractiveAuthFlow,
85
    InteractiveAuthOutcome,
86
};
87
#[cfg(target_family = "wasm")]
88
pub use wasm::on_panic;