pub struct ManagerOptions {
pub port: u16,
pub host: String,
pub username: String,
pub password: String,
pub events: bool,
}Expand description
Structure that contains the Manager configuration options. Represents the configuration options for the manager.
§Fields
port- The port to connect to Asterisk AMI.host- The host to connect to Asterisk AMI.username- The username to authenticate with.password- The password to authenticate with.events- Indicates whether events should be enabled.
§Example
use asterisk_manager::ManagerOptions;
let options = ManagerOptions {
port: 5038,
host: "example.com".to_string(),
username: "admin".to_string(),
password: "password".to_string(),
events: false,
};§Example (JSON)
{
"port": 5038,
"host": "example.com",
"username": "admin",
"password": "password",
"events": false
}Fields§
§port: u16§host: String§username: String§password: String§events: boolTrait Implementations§
Source§impl Debug for ManagerOptions
impl Debug for ManagerOptions
Source§impl<'de> Deserialize<'de> for ManagerOptions
impl<'de> Deserialize<'de> for ManagerOptions
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 ManagerOptions
impl RefUnwindSafe for ManagerOptions
impl Send for ManagerOptions
impl Sync for ManagerOptions
impl Unpin for ManagerOptions
impl UnwindSafe for ManagerOptions
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