Skip to main content

PropertyOptions

Struct PropertyOptions 

Source
pub struct PropertyOptions(/* private fields */);
Expand description

Options controlling how a property lookup or mutation behaves (PropOption_*).

A bitmask, not an enumeration: the engine combines flags. Passing PropertyOptions::NONE requests the default behavior.

Several names share a bit because the engine reuses it per context (for example Self::INSERT_IF_MISSING and Self::INSERT_ELEMENT); the name documents intent at the call site.

use rs_teststand::PropertyOptions;

let options = PropertyOptions::INSERT_IF_MISSING | PropertyOptions::COERCE_TO_STRING;
assert!(options.contains(PropertyOptions::INSERT_IF_MISSING));
assert!(PropertyOptions::NONE.is_empty());

Implementations§

Source§

impl PropertyOptions

Source

pub const NONE: Self

Default behavior (PropOption_NoOptions).

Source

pub const INSERT_IF_MISSING: Self

Create the property if it does not exist (PropOption_InsertIfMissing).

Source

pub const INSERT_ELEMENT: Self

Insert an array element (PropOption_InsertElement).

Source

pub const DELETE_IF_EXISTS: Self

Delete the property if it exists (PropOption_DeleteIfExists).

Source

pub const REMOVE_ELEMENT: Self

Remove an array element (PropOption_RemoveElement).

Source

pub const DO_NOTHING_IF_EXISTS: Self

Leave an existing property untouched (PropOption_DoNothingIfExists).

Source

pub const SET_ONLY_IF_DOES_NOT_EXIST: Self

Set only when the property does not already exist (PropOption_SetOnlyIfDoesNotExist).

Source

pub const COERCE_FROM_NUMBER: Self

Convert from a number (PropOption_CoerceFromNumber).

Source

pub const COERCE_FROM_STRING: Self

Convert from a string (PropOption_CoerceFromString).

Source

pub const COERCE_TO_ENUM: Self

Convert to an enum (PropOption_CoerceToEnum).

Source

pub const COERCE_FROM_BOOLEAN: Self

Convert from a boolean (PropOption_CoerceFromBoolean).

Source

pub const COERCE_TO_NUMBER: Self

Convert to a number (PropOption_CoerceToNumber).

Source

pub const COERCE_TO_STRING: Self

Convert to a string (PropOption_CoerceToString).

Source

pub const COERCE_FROM_ENUM: Self

Convert from an enum (PropOption_CoerceFromEnum).

Source

pub const COERCE_TO_BOOLEAN: Self

Convert to a boolean (PropOption_CoerceToBoolean).

Source

pub const NOT_OWNING: Self

Do not take ownership (PropOption_NotOwning).

Source

pub const REFER_TO_ALIAS: Self

Resolve to the alias rather than its target (PropOption_ReferToAlias).

Source

pub const DO_NOT_ADOPT_CURRENT_NAME: Self

Keep the existing name when copying (PropOption_DoNotAdoptCurrentName).

Source

pub const CASE_INSENSITIVE: Self

Match names case-insensitively (PropOption_CaseInsensitive).

Source

pub const REQUIRE_IDENTICAL_STRUCTURE: Self

Require an identical structure (PropOption_RequireIdenticalStructure).

Source

pub const DO_NOT_RECURSE: Self

Do not recurse into subproperties (PropOption_DoNotRecurse).

Source

pub const COERCE_FROM_REFERENCE: Self

Convert from a reference (PropOption_CoerceFromReference).

Source

pub const COERCE_TO_REFERENCE: Self

Convert to a reference (PropOption_CoerceToReference).

Source

pub const COERCE: Self

Every conversion flag (PropOption_Coerce).

Source

pub const COERCE_BAD_NUMBERS_TO_ZERO: Self

Treat unusable numbers as zero (PropOption_CoerceBadNumbersToZero).

Source

pub const OVERRIDE_NOT_DELETABLE: Self

Allow deleting an otherwise protected property (PropOption_OverrideNotDeletable).

Source

pub const DO_NOT_SHARE_PROPERTIES: Self

Copy rather than share subproperties (PropOption_DoNotShareProperties).

Source

pub const COPY_ALL_FLAGS: Self

Copy every flag (PropOption_CopyAllFlags).

Source§

impl PropertyOptions

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

Source

pub const fn all() -> Self

Get a flags value with all known bits set.

Source

pub const fn bits(&self) -> i32

Get the underlying bits value.

The returned value is exactly the bits set in this flags value.

Examples found in repository?
examples/execution_run_subsequence.rs (line 36)
35const fn none() -> i32 {
36    PropertyOptions::NONE.bits()
37}
38
39const fn insert_if_missing() -> i32 {
40    PropertyOptions::INSERT_IF_MISSING.bits()
41}
More examples
Hide additional examples
examples/execution_run_test_headless.rs (line 54)
53const fn none() -> i32 {
54    PropertyOptions::NONE.bits()
55}
56
57const fn insert_if_missing() -> i32 {
58    PropertyOptions::INSERT_IF_MISSING.bits()
59}
examples/result_list_parse.rs (line 28)
27const fn none() -> i32 {
28    PropertyOptions::NONE.bits()
29}
30
31const fn insert_if_missing() -> i32 {
32    PropertyOptions::INSERT_IF_MISSING.bits()
33}
examples/step_insert.rs (line 29)
28const fn none() -> i32 {
29    PropertyOptions::NONE.bits()
30}
31
32const fn insert_if_missing() -> i32 {
33    PropertyOptions::INSERT_IF_MISSING.bits()
34}
examples/step_insert_from_template.rs (line 37)
33fn describe_templates(engine: &Engine) -> Result<(), Error> {
34    let templates_file = engine.get_templates_file(GetTemplatesFileOptions::LOAD_IF_NOT_LOADED)?;
35    let root = templates_file
36        .data()?
37        .get_property_object("Root", PropertyOptions::NONE.bits())?;
38    for index in 0..root.get_num_elements()? {
39        let category = root.get_property_object_by_offset(index, PropertyOptions::NONE.bits())?;
40        if category.name()? == "Steps" {
41            println!(
42                "Step templates defined on this station: {}",
43                category.get_num_elements()?
44            );
45        }
46    }
47    Ok(())
48}
49
50/// One configured VI-call step, to act as the prototype.
51fn build_prototype(engine: &Engine) -> Result<Step, Error> {
52    // The maintained LabVIEW adapter. The standard-prototype key still exists
53    // but the documentation marks it obsolete in favour of this one.
54    let step = engine.new_step(AdapterKeyName::LabView.as_str(), "Action")?;
55    step.set_name("Measure (VI)")?;
56    step.set_run_mode(RunMode::Normal)?;
57    step.as_property_object()?.set_val_string(
58        VI_PATH,
59        PropertyOptions::INSERT_IF_MISSING.bits(),
60        r"example.lvlibp\measure.vi",
61    )?;
62    Ok(step)
63}
64
65fn main() -> Result<(), Box<dyn std::error::Error>> {
66    let engine = Engine::new()?;
67    describe_templates(&engine)?;
68
69    let prototype = build_prototype(&engine)?;
70    println!(
71        "Prototype: {} via {:?}, run mode {:?}",
72        prototype.name()?,
73        prototype.adapter_key_name()?,
74        prototype.run_mode()?
75    );
76
77    let sequence_file = engine.new_sequence_file()?;
78    let main_sequence = sequence_file.get_sequence_by_name("MainSequence")?;
79    let template = prototype.as_property_object()?;
80
81    for copy_number in 1..=COPIES {
82        let index = main_sequence.get_num_steps(StepGroup::Main)?;
83        let inserted =
84            main_sequence.insert_step_from_template(&template, index, StepGroup::Main)?;
85        inserted.set_name(&format!("Measure {copy_number} (from template)"))?;
86        // Each copy needs an identity of its own; the clone brought the
87        // prototype's.
88        inserted.create_new_unique_step_id()?;
89    }
90
91    println!(
92        "\nMainSequence now holds {} step(s):",
93        main_sequence.get_num_steps(StepGroup::Main)?
94    );
95    for index in 0..main_sequence.get_num_steps(StepGroup::Main)? {
96        let step = main_sequence.get_step(index, StepGroup::Main)?;
97        println!(
98            "  [{index}] {} -> {}",
99            step.name()?,
100            step.as_property_object()?
101                .get_val_string(VI_PATH, PropertyOptions::NONE.bits())?
102        );
103    }
104
105    // The prototype is untouched and can go on producing copies.
106    println!("\nPrototype still named: {}", prototype.name()?);
107
108    let path = std::env::temp_dir().join("rs_teststand_from_template.seq");
109    let path = path.to_string_lossy().into_owned();
110    sequence_file.save(&path)?;
111    println!("Saved to {path}");
112    Ok(())
113}
examples/template_manage_complex.rs (line 44)
40fn describe_station_templates(engine: &Engine) -> Result<(), Error> {
41    let templates_file = engine.get_templates_file(GetTemplatesFileOptions::LOAD_IF_NOT_LOADED)?;
42    let root = templates_file
43        .data()?
44        .get_property_object("Root", PropertyOptions::NONE.bits())?;
45
46    println!("Station templates file: {}", templates_file.path()?);
47    for index in 0..root.get_num_elements()? {
48        let category = root.get_property_object_by_offset(index, PropertyOptions::NONE.bits())?;
49        println!(
50            "  {}: {} template(s)",
51            category.name()?,
52            category.get_num_elements()?
53        );
54    }
55    Ok(())
56}
57
58/// An empty array container to keep prototypes in.
59fn new_template_group(engine: &Engine) -> Result<PropertyObject, Error> {
60    engine.new_property_object(
61        PropValType::Container,
62        true,
63        "",
64        PropertyOptions::NONE.bits(),
65    )
66}
67
68/// Appends a detached copy of a prototype to the group.
69///
70/// The copy matters: the group must not share the object the caller keeps
71/// editing, or adding a second template would change the first.
72fn append_template(group: &PropertyObject, template: &PropertyObject) -> Result<(), Error> {
73    let index = group.get_num_elements()?;
74    group.set_num_elements(index + 1, PropertyOptions::NONE.bits())?;
75    group.set_property_object(
76        &format!("[{index}]"),
77        PropertyOptions::NONE.bits(),
78        &template.clone_property("", PropertyOptions::NONE.bits())?,
79    )
80}
81
82/// Finds a prototype in the group by name.
83fn find_template(group: &PropertyObject, name: &str) -> Result<Option<PropertyObject>, Error> {
84    for index in 0..group.get_num_elements()? {
85        let candidate = group.get_property_object_by_offset(index, PropertyOptions::NONE.bits())?;
86        if candidate.name()? == name {
87            return Ok(Some(candidate));
88        }
89    }
90    Ok(None)
91}
92
93/// Turns "not found" into an error naming the template that is missing.
94fn require(found: Option<PropertyObject>, name: &'static str) -> Result<PropertyObject, Error> {
95    found.ok_or(Error::UnexpectedType {
96        expected: name,
97        actual: "no template of that name in the group",
98    })
99}
100
101/// A configured Statement step, taken as a property tree so it can be cloned.
102fn step_template(engine: &Engine) -> Result<PropertyObject, Error> {
103    let step = engine.new_step(NO_ADAPTER, "Statement")?;
104    step.set_name(STEP_TEMPLATE)?;
105    step.set_post_expression(r#"Locals.Result = "Hello from step template!""#)?;
106    step.as_property_object()
107}
108
109/// A whole sequence, one step included, as a single prototype.
110fn sequence_template(engine: &Engine) -> Result<PropertyObject, Error> {
111    let sequence = engine.new_sequence()?;
112    sequence.set_name(SEQUENCE_TEMPLATE)?;
113
114    let step = engine.new_step(NO_ADAPTER, "Statement")?;
115    step.set_name("Inside_Sequence_Template")?;
116    sequence.insert_step(&step, 0, StepGroup::Main)?;
117
118    sequence.as_property_object()
119}
120
121/// A string variable carrying its default value.
122fn variable_template(engine: &Engine) -> Result<PropertyObject, Error> {
123    let variable =
124        engine.new_property_object(PropValType::String, false, "", PropertyOptions::NONE.bits())?;
125    variable.set_name(VARIABLE_TEMPLATE)?;
126    variable.set_val_string("", PropertyOptions::NONE.bits(), "Template Variable Value")?;
127    Ok(variable)
128}
129
130/// Stamps one copy of each template into a file that is already on disk.
131fn apply_templates(
132    sequence_file: &SequenceFile,
133    step: &PropertyObject,
134    sequence: &PropertyObject,
135    variable: &PropertyObject,
136) -> Result<(), Error> {
137    let main_sequence = sequence_file.get_sequence_by_name(MAIN_SEQUENCE)?;
138
139    // Inserting returns the copy on the Step interface, so it can be renamed
140    // and re-identified straight away. Without a new step ID the copy would go
141    // on claiming the prototype's identity.
142    let inserted_step = main_sequence.insert_step_from_template(step, 0, StepGroup::Main)?;
143    inserted_step.set_name("Step From Template")?;
144    inserted_step.create_new_unique_step_id()?;
145    println!("  step:     {}", inserted_step.name()?);
146
147    let inserted_sequence = sequence_file.insert_sequence_from_template(sequence)?;
148    inserted_sequence.create_new_unique_step_ids()?;
149    println!(
150        "  sequence: {} ({} step(s))",
151        inserted_sequence.name()?,
152        inserted_sequence.get_num_steps(StepGroup::Main)?
153    );
154
155    // A variable is the easy case: Locals is a property tree, so a clone drops
156    // straight in under the template's own name.
157    let locals = main_sequence.locals()?;
158    locals.set_property_object(
159        &variable.name()?,
160        PropertyOptions::INSERT_IF_MISSING.bits(),
161        &variable.clone_property("", PropertyOptions::NONE.bits())?,
162    )?;
163    println!(
164        "  variable: {} = {:?}",
165        variable.name()?,
166        locals.get_val_string(&variable.name()?, PropertyOptions::NONE.bits())?
167    );
168
169    // A file that does not believe it changed will not write anything.
170    sequence_file
171        .as_property_object_file()?
172        .inc_change_count()?;
173    Ok(())
174}
175
176fn main() -> Result<(), Box<dyn std::error::Error>> {
177    let engine = Engine::new()?;
178    describe_station_templates(&engine)?;
179
180    println!("\nBuilding an in-memory template group...");
181    let group = new_template_group(&engine)?;
182    append_template(&group, &step_template(&engine)?)?;
183    append_template(&group, &sequence_template(&engine)?)?;
184    append_template(&group, &variable_template(&engine)?)?;
185    println!("  {} template(s) stored", group.get_num_elements()?);
186
187    let step = require(find_template(&group, STEP_TEMPLATE)?, STEP_TEMPLATE)?;
188    let sequence = require(find_template(&group, SEQUENCE_TEMPLATE)?, SEQUENCE_TEMPLATE)?;
189    let variable = require(find_template(&group, VARIABLE_TEMPLATE)?, VARIABLE_TEMPLATE)?;
190
191    // Saving first, then reopening, is deliberate: templates are worth having
192    // because they are applied to files a program did not build in this run.
193    let path = std::env::temp_dir().join("rs_teststand_from_templates.seq");
194    let path = path.to_string_lossy().into_owned();
195    engine.new_sequence_file()?.save(&path)?;
196
197    println!("\nApplying templates to the saved file...");
198    let target = engine.get_sequence_file_ex(
199        &path,
200        GetSeqFileOptions::DO_NOT_RUN_LOAD_CALLBACK,
201        rs_teststand::ConflictHandler::Error,
202    )?;
203    apply_templates(&target, &step, &sequence, &variable)?;
204    target.save(&path)?;
205    println!("\nSaved to {path}");
206
207    engine.release_sequence_file_ex(target, PropertyOptions::NONE.bits())?;
208    Ok(())
209}
Source

pub const fn from_bits(bits: i32) -> Option<Self>

Convert from a bits value.

This method will return None if any unknown bits are set.

Source

pub const fn from_bits_truncate(bits: i32) -> Self

Convert from a bits value, unsetting any unknown bits.

Source

pub const fn from_bits_retain(bits: i32) -> Self

Convert from a bits value exactly.

Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

This method will return None if name is empty or doesn’t correspond to any named flag.

Source

pub const fn is_empty(&self) -> bool

Whether all bits in self are unset.

Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in other are also set in self.

Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in other are also set in self.

Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in self and other.

Source

pub fn remove(&mut self, other: Self)

The intersection of self with the complement of other (&!).

This method is not equivalent to self & !other when other has unknown bits set. remove won’t truncate other, but the ! operator will.

Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in self and other.

Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in self and other.

Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in self and other.

Source

pub const fn difference(self, other: Self) -> Self

The intersection of self with the complement of other (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in self and other.

Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in self, truncating the result.

Source§

impl PropertyOptions

Source

pub const fn iter(&self) -> Iter<PropertyOptions>

Yield a set of contained flags values.

Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.

Source

pub const fn iter_names(&self) -> IterNames<PropertyOptions>

Yield a set of contained named flags values.

This method is like iter, except only yields bits in contained named flags. Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

Trait Implementations§

Source§

impl Binary for PropertyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for PropertyOptions

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in self and other.

Source§

type Output = PropertyOptions

The resulting type after applying the & operator.
Source§

impl BitAndAssign for PropertyOptions

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in self and other.

Source§

impl BitOr for PropertyOptions

Source§

fn bitor(self, other: PropertyOptions) -> Self

The bitwise or (|) of the bits in self and other.

Source§

type Output = PropertyOptions

The resulting type after applying the | operator.
Source§

impl BitOrAssign for PropertyOptions

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in self and other.

Source§

impl BitXor for PropertyOptions

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in self and other.

Source§

type Output = PropertyOptions

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for PropertyOptions

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in self and other.

Source§

impl Clone for PropertyOptions

Source§

fn clone(&self) -> PropertyOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PropertyOptions

Source§

impl Debug for PropertyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PropertyOptions

Source§

fn default() -> PropertyOptions

Returns the “default value” for a type. Read more
Source§

impl Eq for PropertyOptions

Source§

impl Extend<PropertyOptions> for PropertyOptions

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for PropertyOptions

Source§

const FLAGS: &'static [Flag<PropertyOptions>]

The set of defined flags.
Source§

type Bits = i32

The underlying bits type.
Source§

fn bits(&self) -> i32

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: i32) -> PropertyOptions

Convert from a bits value exactly.
Source§

fn all_named() -> PropertyOptions

Get a flags value with all bits from named flags set. Read more
Source§

fn empty() -> Self

Get a flags value with all bits unset.
Source§

fn all() -> Self

Get a flags value with all known bits set.
Source§

fn known_bits(&self) -> Self::Bits

Get the known bits from a flags value.
Source§

fn unknown_bits(&self) -> Self::Bits

Get the unknown bits from a flags value.
Source§

fn contains_unknown_bits(&self) -> bool

This method will return true if any unknown bits are set.
Source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
Source§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
Source§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
Source§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
Source§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
Source§

fn iter_defined_names() -> IterDefinedNames<Self>

Yield a set of all named flags defined by Self::FLAGS.
Source§

fn iter_equal_names(&self) -> IterEqualNames<Self>

Get an iterator over all defined names for this flags value. Read more
Source§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
Source§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
Source§

fn intersects(&self, other: Self) -> bool
where Self: Sized,

Whether any set bits in other are also set in self.
Source§

fn contains(&self, other: Self) -> bool
where Self: Sized,

Whether all set bits in other are also set in self.
Source§

fn truncate(&mut self)
where Self: Sized,

Remove any unknown bits from the flags.
Source§

fn insert(&mut self, other: Self)
where Self: Sized,

The bitwise or (|) of the bits in self and other.
Source§

fn remove(&mut self, other: Self)
where Self: Sized,

The intersection of self with the complement of other (&!). Read more
Source§

fn toggle(&mut self, other: Self)
where Self: Sized,

The bitwise exclusive-or (^) of the bits in self and other.
Source§

fn set(&mut self, other: Self, value: bool)
where Self: Sized,

Call Flags::insert when value is true or Flags::remove when value is false.
Source§

fn clear(&mut self)
where Self: Sized,

Unsets all bits in the flags.
Source§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in self and other.
Source§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in self and other.
Source§

fn difference(self, other: Self) -> Self

The intersection of self with the complement of other (&!). Read more
Source§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in self and other.
Source§

fn complement(self) -> Self

The bitwise negation (!) of the bits in self, truncating the result.
Source§

impl FromIterator<PropertyOptions> for PropertyOptions

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

Source§

impl Hash for PropertyOptions

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoIterator for PropertyOptions

Source§

type Item = PropertyOptions

The type of the elements being iterated over.
Source§

type IntoIter = Iter<PropertyOptions>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for PropertyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Not for PropertyOptions

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in self, truncating the result.

Source§

type Output = PropertyOptions

The resulting type after applying the ! operator.
Source§

impl Octal for PropertyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PropertyOptions

Source§

fn eq(&self, other: &PropertyOptions) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PublicFlags for PropertyOptions

Source§

type Primitive = i32

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl StructuralPartialEq for PropertyOptions

Source§

impl Sub for PropertyOptions

Source§

fn sub(self, other: Self) -> Self

The intersection of self with the complement of other (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

Source§

type Output = PropertyOptions

The resulting type after applying the - operator.
Source§

impl SubAssign for PropertyOptions

Source§

fn sub_assign(&mut self, other: Self)

The intersection of self with the complement of other (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

Source§

impl UpperHex for PropertyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.