Struct yar_client::Builder [] [src]

pub struct Builder { /* fields omitted */ }

Methods

impl<'a> Builder
[src]

[src]

Set Yar Api address http or https only

[src]

Set Request Options

  • [x] YAR_OPT_PACKAGER :JSON 、MsgPack、PHP , the msg body encoding method.
  • [ ] YAR_OPT_PERSISTENT , Temporarily not supported
  • [x] YAR_OPT_TIMEOUT unit second , transport timeout
  • [x] YAR_OPT_CONNECT_TIMEOUT unit second ,TCP connect timeout

[src]

Set yar client Provider name, Default : yar_client_rust If provider's length long than 32 bytes, It will be truncated

[src]

Set yar client Token name, Default : yar_client_rust If provider's length long than 32 bytes, It will be truncated

[src]

Build a new YarClient ,Transport with curl

  use yar_client::Builder;
  use yar_client::YAR_OPT_PACKAGER;

  Builder::default()
  .set_url("http://10limi.com/rpc.php").unwrap()
  .set_opt(YAR_OPT_PACKAGER,"JSON").unwrap().build();

Trait Implementations

impl<'a> Default for Builder
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder