pub type IntentSettings = SchemaSettings;Expand description
TODO: temporary alias until we can remove this type from the public API
Aliased Type§
struct IntentSettings(pub BitFlags<SchemaSetting, u16>);Fields§
§0: BitFlags<SchemaSetting, u16>Implementations§
Source§impl IntentSettings
impl IntentSettings
Sourcepub fn all_disabled() -> Self
pub fn all_disabled() -> Self
Returns new SchemaSettings with all settings disabled
Sourcepub fn get_enabled(&self) -> BitFlags<IntentSetting>
pub fn get_enabled(&self) -> BitFlags<IntentSetting>
Get all setting enabled
Sourcepub fn is_enabled(&self, grant: IntentSetting) -> bool
pub fn is_enabled(&self, grant: IntentSetting) -> bool
Check if a setting is enabled
Sourcepub fn set(&mut self, grant: IntentSetting)
pub fn set(&mut self, grant: IntentSetting)
Enable a setting
Sourcepub fn from(settings: BitFlags<IntentSetting>) -> Self
pub fn from(settings: BitFlags<IntentSetting>) -> Self
Copy the settings from a BitFlags
Trait Implementations§
Source§impl Decode for IntentSettings
impl Decode for IntentSettings
Source§fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl Encode for IntentSettings
impl Encode for IntentSettings
Source§fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
Convert self to a slice and append it to the destination.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl From<Vec<SchemaSetting>> for IntentSettings
impl From<Vec<SchemaSetting>> for IntentSettings
Source§fn from(settings: Vec<IntentSetting>) -> Self
fn from(settings: Vec<IntentSetting>) -> Self
Copy the settings from a vector of individual settings enums
Source§impl MaxEncodedLen for IntentSettings
impl MaxEncodedLen for IntentSettings
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.