pub trait ReviewExt:
IsA<Review>
+ Sealed
+ 'static {
Show 37 methods
// Provided methods
fn add_flags(&self, flags: ReviewFlags) { ... }
fn add_metadata(&self, key: &str, value: &str) { ... }
fn equal(&self, review2: &impl IsA<Review>) -> bool { ... }
fn date(&self) -> Option<DateTime> { ... }
fn description(&self) -> Option<GString> { ... }
fn flags(&self) -> ReviewFlags { ... }
fn id(&self) -> Option<GString> { ... }
fn locale(&self) -> Option<GString> { ... }
fn metadata_item(&self, key: &str) -> Option<GString> { ... }
fn priority(&self) -> i32 { ... }
fn rating(&self) -> i32 { ... }
fn reviewer_id(&self) -> Option<GString> { ... }
fn reviewer_name(&self) -> Option<GString> { ... }
fn summary(&self) -> Option<GString> { ... }
fn version(&self) -> Option<GString> { ... }
fn set_date(&self, date: &DateTime) { ... }
fn set_description(&self, description: &str) { ... }
fn set_flags(&self, flags: ReviewFlags) { ... }
fn set_id(&self, id: &str) { ... }
fn set_locale(&self, locale: &str) { ... }
fn set_priority(&self, priority: i32) { ... }
fn set_rating(&self, rating: i32) { ... }
fn set_reviewer_id(&self, reviewer_id: &str) { ... }
fn set_reviewer_name(&self, reviewer_name: &str) { ... }
fn set_summary(&self, summary: &str) { ... }
fn set_version(&self, version: &str) { ... }
fn connect_date_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_description_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_flags_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_locale_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_rating_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_reviewer_id_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_reviewer_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_summary_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_version_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
sourcefn add_flags(&self, flags: ReviewFlags)
fn add_flags(&self, flags: ReviewFlags)
Adds flags to an existing review without replacing the other flags.
§flags
a ReviewFlags
, e.g. ReviewFlags::SELF
sourcefn add_metadata(&self, key: &str, value: &str)
fn add_metadata(&self, key: &str, value: &str)
fn equal(&self, review2: &impl IsA<Review>) -> bool
sourcefn description(&self) -> Option<GString>
fn description(&self) -> Option<GString>
sourcefn flags(&self) -> ReviewFlags
fn flags(&self) -> ReviewFlags
Gets any flags set on the review, for example if the user has already voted on the review or if the user wrote the review themselves.
§Returns
a ReviewFlags
, e.g. ReviewFlags::SELF
sourcefn metadata_item(&self, key: &str) -> Option<GString>
fn metadata_item(&self, key: &str) -> Option<GString>
sourcefn priority(&self) -> i32
fn priority(&self) -> i32
This allows the UI to sort reviews into the correct order. Higher numbers indicate a more important or relevant review.
§Returns
the review priority, or 0 for unset.
sourcefn rating(&self) -> i32
fn rating(&self) -> i32
Gets the star rating of the review, where 100 is 5 stars.
§Returns
integer as a percentage, or 0 for unset
sourcefn reviewer_id(&self) -> Option<GString>
fn reviewer_id(&self) -> Option<GString>
sourcefn reviewer_name(&self) -> Option<GString>
fn reviewer_name(&self) -> Option<GString>
sourcefn set_description(&self, description: &str)
fn set_description(&self, description: &str)
Sets the multi-line review text that forms the body of the review.
§description
multi-line description
sourcefn set_flags(&self, flags: ReviewFlags)
fn set_flags(&self, flags: ReviewFlags)
Gets any flags set on the review, for example if the user has already voted on the review or if the user wrote the review themselves.
§flags
a ReviewFlags
, e.g. ReviewFlags::SELF
sourcefn set_locale(&self, locale: &str)
fn set_locale(&self, locale: &str)
sourcefn set_priority(&self, priority: i32)
fn set_priority(&self, priority: i32)
Sets the priority for the review, where positive numbers indicate a better review for the specific user.
§priority
a priority value
sourcefn set_rating(&self, rating: i32)
fn set_rating(&self, rating: i32)
Sets the star rating of the review, where 100 is 5 stars..
§rating
a integer as a percentage, or 0 for unset
sourcefn set_reviewer_id(&self, reviewer_id: &str)
fn set_reviewer_id(&self, reviewer_id: &str)
Sets the name of the reviewer, which can be left unset.
§reviewer_id
the reviewer ID, e.g. “deadbeef”
sourcefn set_reviewer_name(&self, reviewer_name: &str)
fn set_reviewer_name(&self, reviewer_name: &str)
Sets the name of the reviewer, which can be left unset.
§reviewer_name
the reviewer name, e.g. “David Smith”
sourcefn set_summary(&self, summary: &str)
fn set_summary(&self, summary: &str)
Sets the one-line summary that may be displayed in bold.
§summary
a one-line summary, e.g. “Awesome application”