pub struct FeatureFlag {
pub feature: Option<String>,
pub context_type: Option<String>,
pub context_id: Option<u64>,
pub state: Option<String>,
pub locked: Option<bool>,
pub transitions: Option<Value>,
/* private fields */
}Expand description
The state of a feature flag for a particular context (account, course, or user).
Fields§
§feature: Option<String>§context_type: Option<String>§context_id: Option<u64>§state: Option<String>One of: "on", "off", "allowed", "allowed_on", "hidden"
locked: Option<bool>§transitions: Option<Value>Implementations§
Source§impl FeatureFlag
impl FeatureFlag
Sourcepub async fn delete(&self) -> Result<FeatureFlag>
pub async fn delete(&self) -> Result<FeatureFlag>
Remove this feature flag, reverting to the inherited value.
§Canvas API
DELETE /api/v1/:context_type/:context_id/features/flags/:feature
Sourcepub async fn set_feature_flag(&self, state: &str) -> Result<FeatureFlag>
pub async fn set_feature_flag(&self, state: &str) -> Result<FeatureFlag>
Set this feature flag to the given state.
state must be one of: "on", "off", "allowed", "allowed_on", "hidden".
§Canvas API
PUT /api/v1/:context_type/:context_id/features/flags/:feature
Trait Implementations§
Source§impl Clone for FeatureFlag
impl Clone for FeatureFlag
Source§fn clone(&self) -> FeatureFlag
fn clone(&self) -> FeatureFlag
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FeatureFlag
impl Debug for FeatureFlag
Source§impl<'de> Deserialize<'de> for FeatureFlag
impl<'de> Deserialize<'de> for FeatureFlag
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FeatureFlag
impl !RefUnwindSafe for FeatureFlag
impl Send for FeatureFlag
impl Sync for FeatureFlag
impl Unpin for FeatureFlag
impl UnsafeUnpin for FeatureFlag
impl !UnwindSafe for FeatureFlag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more