Struct CloudBuilder

Source
pub struct CloudBuilder { /* private fields */ }
Expand description

This CloudBuilder struct creates the Cloud.

Implementations§

Source§

impl CloudBuilder

Source

pub fn new() -> CloudBuilder

Construct a new CloudBuilder and return default values.

§Examples
use feed::CloudBuilder;

let cloud_builder = CloudBuilder::new();
Source

pub fn domain(&mut self, domain: &str) -> &mut CloudBuilder

Set the domain that exists under Cloud.

§Examples
use feed::CloudBuilder;

let mut cloud_builder = CloudBuilder::new();
cloud_builder.domain("http://rpc.sys.com/");
Source

pub fn port(&mut self, port: i64) -> &mut CloudBuilder

Set the port that exists under Cloud.

§Examples
use feed::CloudBuilder;

let mut cloud_builder = CloudBuilder::new();
cloud_builder.port(80);
Source

pub fn path(&mut self, path: &str) -> &mut CloudBuilder

Set the path that exists under Cloud.

§Examples
use feed::CloudBuilder;

let mut cloud_builder = CloudBuilder::new();
cloud_builder.path("/RPC2");
Source

pub fn register_procedure( &mut self, register_procedure: &str, ) -> &mut CloudBuilder

Set the register procedure that exists under Cloud.

§Examples
use feed::CloudBuilder;

let mut cloud_builder = CloudBuilder::new();
cloud_builder.register_procedure("pingMe");
Source

pub fn protocol(&mut self, protocol: &str) -> &mut CloudBuilder

Set the protocol that exists under Cloud.

§Examples
use feed::CloudBuilder;

let mut cloud_builder = CloudBuilder::new();
cloud_builder.protocol("soap");
Source

pub fn validate(&mut self) -> Result<&mut CloudBuilder, String>

Validate the contents of Cloud.

§Examples
use feed::CloudBuilder;

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

pub fn finalize(&self) -> Result<Cloud, String>

Construct the Cloud from the CloudBuilder.

§Examples
use feed::CloudBuilder;

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

Trait Implementations§

Source§

impl Clone for CloudBuilder

Source§

fn clone(&self) -> CloudBuilder

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for CloudBuilder

Source§

fn default() -> CloudBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.