Skip to main content

ArgumentsLocalServerHandler

Trait ArgumentsLocalServerHandler 

Source
pub trait ArgumentsLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn get_string(
        &mut self,
        request: Request<GetString, ___T>,
        responder: Responder<GetString, ___T>,
    ) -> impl Future<Output = ()>;
    fn get_strings(
        &mut self,
        request: Request<GetStrings, ___T>,
        responder: Responder<GetStrings, ___T>,
    ) -> impl Future<Output = ()>;
    fn get_bool(
        &mut self,
        request: Request<GetBool, ___T>,
        responder: Responder<GetBool, ___T>,
    ) -> impl Future<Output = ()>;
    fn get_bools(
        &mut self,
        request: Request<GetBools, ___T>,
        responder: Responder<GetBools, ___T>,
    ) -> impl Future<Output = ()>;
    fn collect(
        &mut self,
        request: Request<Collect, ___T>,
        responder: Responder<Collect, ___T>,
    ) -> impl Future<Output = ()>;
}
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 = ()>

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 = ()>

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 = ()>

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 = ()>

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 = ()>

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".

Implementations on Foreign Types§

Source§

impl<___H, ___T> ArgumentsLocalServerHandler<___T> for Local<___H>
where ___H: ArgumentsServerHandler<___T>, ___T: Transport,

Source§

async fn get_string( &mut self, request: Request<GetString, ___T>, responder: Responder<GetString, ___T>, )

Source§

async fn get_strings( &mut self, request: Request<GetStrings, ___T>, responder: Responder<GetStrings, ___T>, )

Source§

async fn get_bool( &mut self, request: Request<GetBool, ___T>, responder: Responder<GetBool, ___T>, )

Source§

async fn get_bools( &mut self, request: Request<GetBools, ___T>, responder: Responder<GetBools, ___T>, )

Source§

async fn collect( &mut self, request: Request<Collect, ___T>, responder: Responder<Collect, ___T>, )

Implementors§