livekit_datatrack/lib.rs
1// Copyright 2025 LiveKit, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#![doc = include_str!("../README.md")]
16
17/// Common types for local and remote tracks.
18mod track;
19
20/// Local track publication.
21mod local;
22
23/// Remote track subscription.
24mod remote;
25
26/// Application-level frame.
27mod frame;
28
29/// Provider for end-to-end encryption/decryption.
30mod e2ee;
31
32/// Data track packet (DTP) format.
33mod packet;
34
35/// Internal utilities.
36mod utils;
37
38/// Internal error.
39mod error;
40
41/// Public APIs re-exported by client SDKs.
42pub mod api {
43 pub use crate::{error::*, frame::*, local::*, remote::*, track::*};
44}
45
46/// Internal APIs used within client SDKs to power data tracks functionality.
47pub mod backend {
48 pub use crate::e2ee::*;
49
50 /// Local track publication
51 pub mod local {
52 pub use crate::local::{events::*, manager::*, proto::*};
53 }
54
55 /// Remote track subscription
56 pub mod remote {
57 pub use crate::remote::{events::*, manager::*, proto::*};
58 }
59}