pub struct Server_Proxy { /* private fields */ }
Implementations§
Source§impl Server_Proxy
impl Server_Proxy
Sourcepub fn take_event_stream(&self) -> Server_EventStream
pub fn take_event_stream(&self) -> Server_EventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn start_serving(
&self,
) -> QueryResponseFut<ServerStartServingResult, DefaultFuchsiaResourceDialect>
pub fn start_serving( &self, ) -> QueryResponseFut<ServerStartServingResult, DefaultFuchsiaResourceDialect>
Starts serving DHCP leases.
Starts the DHCP server with the current set of parameters.
On error the server remains in the stopped state. If the server is
already serving, StartServing
is a no-op.
*error a zx.Status indicating why the server could not be started.
Sourcepub fn stop_serving(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn stop_serving( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Stops serving DHCP leases.
Stopping causes all the listening ports to be closed.
Configuring parameters on the DHCP server is only allowed when the server is stopped.
If the server is not currently serving, StopServing
is a no-op.
Sourcepub fn is_serving(
&self,
) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
pub fn is_serving( &self, ) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
Returns whether or not the server is serving DHCP leases.
Sourcepub fn get_option(
&self,
code: OptionCode,
) -> QueryResponseFut<ServerGetOptionResult, DefaultFuchsiaResourceDialect>
pub fn get_option( &self, code: OptionCode, ) -> QueryResponseFut<ServerGetOptionResult, DefaultFuchsiaResourceDialect>
Returns the requested Option if it is supported.
- request
code
the code of an Option whose value has been requested.
- response
value
the value of the requested Option.
- error a zx.Status indicating why the value could not be retrieved.
Sourcepub fn get_parameter(
&self,
name: ParameterName,
) -> QueryResponseFut<ServerGetParameterResult, DefaultFuchsiaResourceDialect>
pub fn get_parameter( &self, name: ParameterName, ) -> QueryResponseFut<ServerGetParameterResult, DefaultFuchsiaResourceDialect>
Returns the requested Parameter if it is supported.
- request
name
the name of a Parameter whose value has been requested.
- response
value
the value of the requested Parameter.
- error a zx.Status indicating why the value could not be retrieved.
Sourcepub fn set_option(
&self,
value: &Option_,
) -> QueryResponseFut<ServerSetOptionResult, DefaultFuchsiaResourceDialect>
pub fn set_option( &self, value: &Option_, ) -> QueryResponseFut<ServerSetOptionResult, DefaultFuchsiaResourceDialect>
Sets the Option to the argument. On success, a SetOption will take effect immediately.
- request
value
an Option whose value will be set to the value of this argument.
- error a zx.Status indicating the cause of failure.
Sourcepub fn set_parameter(
&self,
value: &Parameter,
) -> QueryResponseFut<ServerSetParameterResult, DefaultFuchsiaResourceDialect>
pub fn set_parameter( &self, value: &Parameter, ) -> QueryResponseFut<ServerSetParameterResult, DefaultFuchsiaResourceDialect>
Sets the Parameter to the argument. On success, the new parameter value can be queried by GetParameter or ListParameter immediately. However, the server may require a restart in order for the new Parameter value to take effect.
Setting parameters is only allowed if the server is stopped.
ZX_ERR_BAD_STATE
is returned otherwise.
- request
value
a Parameter whose value will be set to the value of this argument.
- error a zx.Status indicating the cause of failure.
Sourcepub fn list_options(
&self,
) -> QueryResponseFut<ServerListOptionsResult, DefaultFuchsiaResourceDialect>
pub fn list_options( &self, ) -> QueryResponseFut<ServerListOptionsResult, DefaultFuchsiaResourceDialect>
Lists all DHCP options for which the Server has a value. Any option which does not have a value will be omitted from the returned list. ListOptions provides administrators a means to print a server’s configuration as opposed to querying the value of a single Option.
- response
options
a vector containing all of the options for which the Server has a value. Bounded to 256 as options are identified by a 1 octet code and 256 is the maximum number of such codes.
- error a zx.Status indicating the cause of failure.
Sourcepub fn list_parameters(
&self,
) -> QueryResponseFut<ServerListParametersResult, DefaultFuchsiaResourceDialect>
pub fn list_parameters( &self, ) -> QueryResponseFut<ServerListParametersResult, DefaultFuchsiaResourceDialect>
Lists all DHCP server parameters. ListParameters provides administrators a means to print a server’s configuration as opposed to querying the value of a single Parameter.
- response
parameter
a vector containing the values of all of the Server’s parameters. Bounded to 256 to provide a generous upper limit on the number of server parameters while being of the same size as ListOptions.
- error a zx.Status indicating the cause of failure.
Sourcepub fn reset_options(
&self,
) -> QueryResponseFut<ServerResetOptionsResult, DefaultFuchsiaResourceDialect>
pub fn reset_options( &self, ) -> QueryResponseFut<ServerResetOptionsResult, DefaultFuchsiaResourceDialect>
Resets all DHCP options to have no value. On success, ResetOptions will take effect immediately.
- error a zx.Status indicating the cause of failure.
Sourcepub fn reset_parameters(
&self,
) -> QueryResponseFut<ServerResetParametersResult, DefaultFuchsiaResourceDialect>
pub fn reset_parameters( &self, ) -> QueryResponseFut<ServerResetParametersResult, DefaultFuchsiaResourceDialect>
Resets all DHCP server parameters to their default value. On success, the reset parameter values can be queried immediately with GetParameter or ListParameters. However, the server must be restarted before all new parameter values take effect.
Setting parameters is only allowed if the server is stopped.
ZX_ERR_BAD_STATE
is returned otherwise.
- error a zx.Status indicating the cause of failure.
Sourcepub fn clear_leases(
&self,
) -> QueryResponseFut<ServerClearLeasesResult, DefaultFuchsiaResourceDialect>
pub fn clear_leases( &self, ) -> QueryResponseFut<ServerClearLeasesResult, DefaultFuchsiaResourceDialect>
Clears all leases maintained by the Server. On success, ClearLeases will take effect immediately. Server administrators should take care when calling this method as the DHCP protocol does not provide a mechanism by which a Server can notify a client that its lease has been cleared.
- error a zx.Status indicating the cause of failure.
Trait Implementations§
Source§impl Clone for Server_Proxy
impl Clone for Server_Proxy
Source§fn clone(&self) -> Server_Proxy
fn clone(&self) -> Server_Proxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Server_Proxy
impl Debug for Server_Proxy
Source§impl Proxy for Server_Proxy
impl Proxy for Server_Proxy
Source§type Protocol = Server_Marker
type Protocol = Server_Marker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl Server_ProxyInterface for Server_Proxy
impl Server_ProxyInterface for Server_Proxy
type StartServingResponseFut = QueryResponseFut<Result<(), i32>>
type StopServingResponseFut = QueryResponseFut<()>
type IsServingResponseFut = QueryResponseFut<bool>
type GetOptionResponseFut = QueryResponseFut<Result<Option_, i32>>
type GetParameterResponseFut = QueryResponseFut<Result<Parameter, i32>>
type SetOptionResponseFut = QueryResponseFut<Result<(), i32>>
type SetParameterResponseFut = QueryResponseFut<Result<(), i32>>
type ListOptionsResponseFut = QueryResponseFut<Result<Vec<Option_>, i32>>
type ListParametersResponseFut = QueryResponseFut<Result<Vec<Parameter>, i32>>
type ResetOptionsResponseFut = QueryResponseFut<Result<(), i32>>
type ResetParametersResponseFut = QueryResponseFut<Result<(), i32>>
type ClearLeasesResponseFut = QueryResponseFut<Result<(), i32>>
fn start_serving(&self) -> Self::StartServingResponseFut
fn stop_serving(&self) -> Self::StopServingResponseFut
fn is_serving(&self) -> Self::IsServingResponseFut
fn get_option(&self, code: OptionCode) -> Self::GetOptionResponseFut
fn get_parameter(&self, name: ParameterName) -> Self::GetParameterResponseFut
fn set_option(&self, value: &Option_) -> Self::SetOptionResponseFut
fn set_parameter(&self, value: &Parameter) -> Self::SetParameterResponseFut
fn list_options(&self) -> Self::ListOptionsResponseFut
fn list_parameters(&self) -> Self::ListParametersResponseFut
fn reset_options(&self) -> Self::ResetOptionsResponseFut
fn reset_parameters(&self) -> Self::ResetParametersResponseFut
fn clear_leases(&self) -> Self::ClearLeasesResponseFut
Auto Trait Implementations§
impl Freeze for Server_Proxy
impl !RefUnwindSafe for Server_Proxy
impl Send for Server_Proxy
impl Sync for Server_Proxy
impl Unpin for Server_Proxy
impl !UnwindSafe for Server_Proxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)