pub trait SrpServer {
Show 15 methods
// Required methods
fn srp_server_get_address_mode(&self) -> SrpServerAddressMode;
fn srp_server_get_state(&self) -> SrpServerState;
fn srp_server_get_port(&self) -> u16;
fn srp_server_set_enabled(&self, enabled: bool);
fn srp_server_set_auto_enable_mode(&self, enabled: bool);
fn srp_server_is_enabled(&self) -> bool;
fn srp_server_is_auto_enable_mode(&self) -> bool;
fn srp_server_is_running(&self) -> bool;
fn srp_server_set_domain(&self, domain: &CStr) -> Result;
fn srp_server_get_domain(&self) -> &CStr;
fn srp_server_get_response_counters(&self) -> &SrpServerResponseCounters;
fn srp_server_next_host<'a>(
&'a self,
prev: Option<&'a SrpServerHost>,
) -> Option<&'a SrpServerHost>;
fn srp_server_handle_service_update_result(
&self,
id: SrpServerServiceUpdateId,
result: Result,
);
fn srp_server_set_service_update_fn<'a, F>(&'a self, f: Option<F>)
where F: FnMut(&'a Instance, SrpServerServiceUpdateId, &'a SrpServerHost, u32) + 'a;
// Provided method
fn srp_server_hosts(&self) -> SrpServerHostIterator<'_, Self> ⓘ
where Self: Sized { ... }
}
Expand description
Server Methods from the OpenThread SRP Module.
Required Methods§
Sourcefn srp_server_get_address_mode(&self) -> SrpServerAddressMode
fn srp_server_get_address_mode(&self) -> SrpServerAddressMode
Functional equivalent of
otsys::otSrpServerGetAddressMode
.
Sourcefn srp_server_get_state(&self) -> SrpServerState
fn srp_server_get_state(&self) -> SrpServerState
Functional equivalent of
otsys::otSrpServerGetState
.
Sourcefn srp_server_get_port(&self) -> u16
fn srp_server_get_port(&self) -> u16
Functional equivalent of
otsys::otSrpServerGetPort
.
Sourcefn srp_server_set_enabled(&self, enabled: bool)
fn srp_server_set_enabled(&self, enabled: bool)
Functional equivalent of
otsys::otSrpServerSetEnabled
.
Sourcefn srp_server_set_auto_enable_mode(&self, enabled: bool)
fn srp_server_set_auto_enable_mode(&self, enabled: bool)
Functional equivalent of
otsys::otSrpServerSetEnabled
.
Sourcefn srp_server_is_enabled(&self) -> bool
fn srp_server_is_enabled(&self) -> bool
Returns true if the SRP server is enabled.
Sourcefn srp_server_is_auto_enable_mode(&self) -> bool
fn srp_server_is_auto_enable_mode(&self) -> bool
Returns true if SRP server auto-enable mode is enabled.
Sourcefn srp_server_is_running(&self) -> bool
fn srp_server_is_running(&self) -> bool
Returns true if the SRP server is running, false if it is stopped or disabled.
Sourcefn srp_server_set_domain(&self, domain: &CStr) -> Result
fn srp_server_set_domain(&self, domain: &CStr) -> Result
Functional equivalent of
otsys::otSrpServerSetDomain
.
Sourcefn srp_server_get_domain(&self) -> &CStr
fn srp_server_get_domain(&self) -> &CStr
Functional equivalent of
otsys::otSrpServerGetDomain
.
Sourcefn srp_server_get_response_counters(&self) -> &SrpServerResponseCounters
fn srp_server_get_response_counters(&self) -> &SrpServerResponseCounters
Functional equivalent of
otsys::otSrpServerGetResponseCounters
.
Sourcefn srp_server_next_host<'a>(
&'a self,
prev: Option<&'a SrpServerHost>,
) -> Option<&'a SrpServerHost>
fn srp_server_next_host<'a>( &'a self, prev: Option<&'a SrpServerHost>, ) -> Option<&'a SrpServerHost>
Functional equivalent of
otsys::otSrpServerGetNextHost
.
Sourcefn srp_server_handle_service_update_result(
&self,
id: SrpServerServiceUpdateId,
result: Result,
)
fn srp_server_handle_service_update_result( &self, id: SrpServerServiceUpdateId, result: Result, )
Functional equivalent of
otsys::otSrpServerHandleServiceUpdateResult
.
Sourcefn srp_server_set_service_update_fn<'a, F>(&'a self, f: Option<F>)
fn srp_server_set_service_update_fn<'a, F>(&'a self, f: Option<F>)
Functional equivalent of
otsys::otSrpServerSetServiceUpdateHandler
.
Provided Methods§
Sourcefn srp_server_hosts(&self) -> SrpServerHostIterator<'_, Self> ⓘwhere
Self: Sized,
fn srp_server_hosts(&self) -> SrpServerHostIterator<'_, Self> ⓘwhere
Self: Sized,
Returns an iterator over the SRP hosts.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.