pub struct MatrixConfig {
pub enabled: bool,
pub homeserver: String,
pub user_id: String,
pub access_token: Option<String>,
pub password: Option<String>,
pub device_id: Option<String>,
pub data_dir: String,
pub allowlist: Vec<String>,
pub room_allowlist: Vec<String>,
pub auto_join_rooms: bool,
pub enable_encryption: bool,
pub rate_limit_per_second: u32,
}Expand description
Matrix protocol configuration.
Fields§
§enabled: bool§homeserver: StringMatrix homeserver URL (e.g., “https://matrix.org”)
user_id: StringMatrix user ID (e.g., “@bot:matrix.org”)
access_token: Option<String>Access token for authentication (preferred over password)
password: Option<String>Password for authentication (if access_token not provided)
device_id: Option<String>Device ID for the session
data_dir: StringDirectory to store Matrix client data (encryption keys, sync tokens)
allowlist: Vec<String>List of allowed MXIDs (empty = allow all)
room_allowlist: Vec<String>List of allowed room IDs (empty = allow all)
auto_join_rooms: boolAutomatically join rooms when invited
enable_encryption: boolEnable end-to-end encryption
rate_limit_per_second: u32Rate limit for sending messages per second
Trait Implementations§
Source§impl Clone for MatrixConfig
impl Clone for MatrixConfig
Source§fn clone(&self) -> MatrixConfig
fn clone(&self) -> MatrixConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MatrixConfig
impl Debug for MatrixConfig
Source§impl<'de> Deserialize<'de> for MatrixConfig
impl<'de> Deserialize<'de> for MatrixConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MatrixConfig
impl RefUnwindSafe for MatrixConfig
impl Send for MatrixConfig
impl Sync for MatrixConfig
impl Unpin for MatrixConfig
impl UnsafeUnpin for MatrixConfig
impl UnwindSafe for MatrixConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more