pub struct FirebaseParams { /* private fields */ }
Expand description

The FirebaseParams struct is a Firebase reference with attatched query parameters that allow you to sort, limit, and format the data received from Firebase.

It has been made into its own struct because the Firebase API specifies that you can only GET data with query parameters. And so taking advantage of type systems, this struct can only GET data.

You can add any number of parameters to this struct by chaining calls together:

let episodes = Firebase::new("https://futurama.firebaseio.com/episodes/").unwrap();
let alphabetic = episodes.order_by("\"title\"").limit_to_first(5);
let first5 = alphabetic.get();

Setting the same parameter overwrites the previous parameter:

let episodes = Firebase::new("https://arrdev.firebaseio.com/episodes/").unwrap();
// This will create a request that gets entries starting at the 0th index.
let skip10 = episodes.start_at(10).start_at(0);

Implementations

Gets data from Firebase.

Examples
let episodes = Firebase::new("https://futurama.firebaseio.com/episodes/").unwrap();
let alphabetic = episodes.order_by("\"title\"").limit_to_first(5);
let first5 = alphabetic.get();

Asynchronous version of the get method, takes a callback and returns a handle to the thread making the request to Firebase.

Returns the current URL as a string that will be used to make the REST call when talking to Firebase.

Modifies the current FirebaseParams instance and sorts this data by the key provided.

Modifies the current FirebaseParams instance and limits the number of entries returned on each request to the first count. Often used with order_by.

Modifies the current FirebaseParams instance and limits the number of entries returned on each request to the last count. Often used with order_by.

Modifies the current FirebaseParams instance and only returns entries starting after the specified index. Often used with order_by.

Modifies the current FirebaseParams instance and only returns entries appearing before the specified index. Often used with order_by.

Modifies the current FirebaseParams instance and returns only the entry at the specified index. Often used with order_by.

Modifies the current FirebaseParams instance and only returns a shallow copy of the db in every request.

Modifies the current FirebaseParams instance and formats the data to be exported in every request. (e.g. includes a priority field)

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.