Skip to main content

ArgumentsServerHandler

Trait ArgumentsServerHandler 

Source
pub trait ArgumentsServerHandler<___T = Channel>
where ___T: Transport,
{ // Required methods fn get_string( &mut self, request: Request<GetString, ___T>, responder: Responder<GetString, ___T>, ) -> impl Future<Output = ()> + Send; fn get_strings( &mut self, request: Request<GetStrings, ___T>, responder: Responder<GetStrings, ___T>, ) -> impl Future<Output = ()> + Send; fn get_bool( &mut self, request: Request<GetBool, ___T>, responder: Responder<GetBool, ___T>, ) -> impl Future<Output = ()> + Send; fn get_bools( &mut self, request: Request<GetBools, ___T>, responder: Responder<GetBools, ___T>, ) -> impl Future<Output = ()> + Send; fn collect( &mut self, request: Request<Collect, ___T>, responder: Responder<Collect, ___T>, ) -> impl Future<Output = ()> + Send; }
Expand description

A server handler for the Arguments protocol.

See Arguments for more details.

Required Methods§

Source

fn get_string( &mut self, request: Request<GetString, ___T>, responder: Responder<GetString, ___T>, ) -> impl Future<Output = ()> + Send

Get the value of a boot argument key.

Source

fn get_strings( &mut self, request: Request<GetStrings, ___T>, responder: Responder<GetStrings, ___T>, ) -> impl Future<Output = ()> + Send

Get the values of a list of arguments specified in keys.

Source

fn get_bool( &mut self, request: Request<GetBool, ___T>, responder: Responder<GetBool, ___T>, ) -> impl Future<Output = ()> + Send

Get the boolean value of a boot argument keys, or return defaultval if the argument is not present. A key is considered to be false if its string value is exactly “off”, “0”, or “false”. Any other value (including empty) is returned as true.

Source

fn get_bools( &mut self, request: Request<GetBools, ___T>, responder: Responder<GetBools, ___T>, ) -> impl Future<Output = ()> + Send

Get the boolean values of a list of boot arguments keys.key, or return keys.defaultval for each if not present.

Source

fn collect( &mut self, request: Request<Collect, ___T>, responder: Responder<Collect, ___T>, ) -> impl Future<Output = ()> + Send

Get all boot arguments with keys starting with prefix. Returns a vector with strings of the form ‘key=value’. TODO(https://fxbug.dev/42108659) - remove Collect once boot arguments have been componentised.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§