Type Alias IntentSettings

Source
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

Source

pub fn all_disabled() -> Self

Returns new SchemaSettings with all settings disabled

Source

pub fn get_enabled(&self) -> BitFlags<IntentSetting>

Get all setting enabled

Source

pub fn is_enabled(&self, grant: IntentSetting) -> bool

Check if a setting is enabled

Source

pub fn set(&mut self, grant: IntentSetting)

Enable a setting

Source

pub fn from(settings: BitFlags<IntentSetting>) -> Self

Copy the settings from a BitFlags

Trait Implementations§

Source§

impl Decode for IntentSettings

Source§

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,

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,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl Encode for IntentSettings

Source§

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 size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<T>(&self, dest: &mut T)
where T: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl From<Vec<SchemaSetting>> for IntentSettings

Source§

fn from(settings: Vec<IntentSetting>) -> Self

Copy the settings from a vector of individual settings enums

Source§

impl MaxEncodedLen for IntentSettings

Source§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
Source§

impl TypeInfo for IntentSettings

Source§

type Identity = SchemaSettings

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl EncodeLike for IntentSettings