[−][src]Trait trakt::selectors::Selector
A trait for selecting something (movie, show, etc.) by different methods (ids, number, etc.) and supporting additional data (rated_at, collected_at, etc.)
Required methods
fn build(self) -> Value
Consumes the object and returns serde_json::Value
fn insert(self, k: String, v: Value) -> Self
Insert a key-value pair into the item
fn map(self, map: Map<String, Value>) -> Self
Insert a key-value map into the item
Provided methods
fn value(self, value: Value) -> Self
fn item<T: Serialize>(self, item: T) -> Self
Insert a serializable item
fn json(self, json: &str) -> Self
Insert a JSON object into the item
#Panics
Panics if json is not a valid JSON Object
fn insert_num(self, k: String, v: impl Into<Number>) -> Self
Insert a key-number pair into the item
fn insert_str(self, k: String, v: String) -> Self
Insert a key-string pair into the item
fn insert_date(self, k: String, v: DateTime<Utc>) -> Self
Insert a key-date pair into the item
fn rated_at(self, date: DateTime<Utc>) -> Self
Specify when an item was rated
fn collected_at(self, date: DateTime<Utc>) -> Self
Specify when an item was collected
fn watched_at(self, date: DateTime<Utc>) -> Self
Specify when an item was watched
fn rating(self, rating: u8) -> Self
Specify an rating for an item