[go: up one dir, main page]

Struct rss::CloudBuilder [] [src]

pub struct CloudBuilder { /* fields omitted */ }

A builder used to create a Cloud.

Methods

impl CloudBuilder
[src]

Construct a new CloudBuilder using the values from an existing Cloud.

Examples

use rss::{Channel, CloudBuilder};

let input = include_str!("tests/data/cloud.xml");
let channel = input.parse::<Channel>().unwrap();
let cloud = channel.cloud().unwrap().clone();
let builder = CloudBuilder::from_cloud(cloud).unwrap();

Errors

If this function encounters an error while parsing port from a String to an i64 it will return an IntParsing error.

Set the domain for the Cloud.

Examples

use rss::CloudBuilder;

let builder = CloudBuilder::default()
    .domain("http://rpc.sys.com/");

Set the port for the Cloud.

Examples

use rss::CloudBuilder;

let builder = CloudBuilder::default()
    .port(80);

Set the path for the Cloud.

Examples

use rss::CloudBuilder;

let builder = CloudBuilder::default()
    .path("/RPC2");

Set the register procedure for the Cloud.

Examples

use rss::CloudBuilder;

let builder = CloudBuilder::default()
    .register_procedure("pingMe");

Set the protocol for the Cloud.

Examples

use rss::CloudBuilder;

let builder = CloudBuilder::default()
    .protocol("soap");

Validate the contents of this CloudBuilder.

Examples

use rss::CloudBuilder;

let builder = CloudBuilder::default()
        .domain("http://rpc.sys.com/")
        .port(80)
        .path("/RPC2")
        .register_procedure("pingMe")
        .protocol("soap")
        .validate()
        .unwrap();

Construct the Cloud from this CloudBuilder.

Examples

use rss::CloudBuilder;

let cloud = CloudBuilder::default()
        .domain("http://rpc.sys.com/")
        .port(80)
        .path("/RPC2")
        .register_procedure("pingMe")
        .protocol("soap")
        .finalize();

Trait Implementations

impl Debug for CloudBuilder
[src]

Formats the value using the given formatter.

impl Clone for CloudBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for CloudBuilder
[src]

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