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
impl PropertyOptions
Sourcepub const INSERT_IF_MISSING: Self
pub const INSERT_IF_MISSING: Self
Create the property if it does not exist (PropOption_InsertIfMissing).
Sourcepub const INSERT_ELEMENT: Self
pub const INSERT_ELEMENT: Self
Insert an array element (PropOption_InsertElement).
Sourcepub const DELETE_IF_EXISTS: Self
pub const DELETE_IF_EXISTS: Self
Delete the property if it exists (PropOption_DeleteIfExists).
Sourcepub const REMOVE_ELEMENT: Self
pub const REMOVE_ELEMENT: Self
Remove an array element (PropOption_RemoveElement).
Sourcepub const DO_NOTHING_IF_EXISTS: Self
pub const DO_NOTHING_IF_EXISTS: Self
Leave an existing property untouched (PropOption_DoNothingIfExists).
Sourcepub const SET_ONLY_IF_DOES_NOT_EXIST: Self
pub const SET_ONLY_IF_DOES_NOT_EXIST: Self
Set only when the property does not already exist
(PropOption_SetOnlyIfDoesNotExist).
Sourcepub const COERCE_FROM_NUMBER: Self
pub const COERCE_FROM_NUMBER: Self
Convert from a number (PropOption_CoerceFromNumber).
Sourcepub const COERCE_FROM_STRING: Self
pub const COERCE_FROM_STRING: Self
Convert from a string (PropOption_CoerceFromString).
Sourcepub const COERCE_TO_ENUM: Self
pub const COERCE_TO_ENUM: Self
Convert to an enum (PropOption_CoerceToEnum).
Sourcepub const COERCE_FROM_BOOLEAN: Self
pub const COERCE_FROM_BOOLEAN: Self
Convert from a boolean (PropOption_CoerceFromBoolean).
Sourcepub const COERCE_TO_NUMBER: Self
pub const COERCE_TO_NUMBER: Self
Convert to a number (PropOption_CoerceToNumber).
Sourcepub const COERCE_TO_STRING: Self
pub const COERCE_TO_STRING: Self
Convert to a string (PropOption_CoerceToString).
Sourcepub const COERCE_FROM_ENUM: Self
pub const COERCE_FROM_ENUM: Self
Convert from an enum (PropOption_CoerceFromEnum).
Sourcepub const COERCE_TO_BOOLEAN: Self
pub const COERCE_TO_BOOLEAN: Self
Convert to a boolean (PropOption_CoerceToBoolean).
Sourcepub const NOT_OWNING: Self
pub const NOT_OWNING: Self
Do not take ownership (PropOption_NotOwning).
Sourcepub const REFER_TO_ALIAS: Self
pub const REFER_TO_ALIAS: Self
Resolve to the alias rather than its target (PropOption_ReferToAlias).
Sourcepub const DO_NOT_ADOPT_CURRENT_NAME: Self
pub const DO_NOT_ADOPT_CURRENT_NAME: Self
Keep the existing name when copying (PropOption_DoNotAdoptCurrentName).
Sourcepub const CASE_INSENSITIVE: Self
pub const CASE_INSENSITIVE: Self
Match names case-insensitively (PropOption_CaseInsensitive).
Sourcepub const REQUIRE_IDENTICAL_STRUCTURE: Self
pub const REQUIRE_IDENTICAL_STRUCTURE: Self
Require an identical structure (PropOption_RequireIdenticalStructure).
Sourcepub const DO_NOT_RECURSE: Self
pub const DO_NOT_RECURSE: Self
Do not recurse into subproperties (PropOption_DoNotRecurse).
Sourcepub const COERCE_FROM_REFERENCE: Self
pub const COERCE_FROM_REFERENCE: Self
Convert from a reference (PropOption_CoerceFromReference).
Sourcepub const COERCE_TO_REFERENCE: Self
pub const COERCE_TO_REFERENCE: Self
Convert to a reference (PropOption_CoerceToReference).
Sourcepub const COERCE_BAD_NUMBERS_TO_ZERO: Self
pub const COERCE_BAD_NUMBERS_TO_ZERO: Self
Treat unusable numbers as zero (PropOption_CoerceBadNumbersToZero).
Sourcepub const OVERRIDE_NOT_DELETABLE: Self
pub const OVERRIDE_NOT_DELETABLE: Self
Allow deleting an otherwise protected property
(PropOption_OverrideNotDeletable).
Sourcepub const DO_NOT_SHARE_PROPERTIES: Self
pub const DO_NOT_SHARE_PROPERTIES: Self
Copy rather than share subproperties (PropOption_DoNotShareProperties).
Sourcepub const COPY_ALL_FLAGS: Self
pub const COPY_ALL_FLAGS: Self
Copy every flag (PropOption_CopyAllFlags).
Source§impl PropertyOptions
impl PropertyOptions
Sourcepub const fn bits(&self) -> i32
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?
More examples
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}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}Sourcepub const fn from_bits(bits: i32) -> Option<Self>
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.
Sourcepub const fn from_bits_truncate(bits: i32) -> Self
pub const fn from_bits_truncate(bits: i32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: i32) -> Self
pub const fn from_bits_retain(bits: i32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
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.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn remove(&mut self, other: Self)
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.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: Self) -> Self
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.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl PropertyOptions
impl PropertyOptions
Sourcepub const fn iter(&self) -> Iter<PropertyOptions>
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.
Sourcepub const fn iter_names(&self) -> IterNames<PropertyOptions>
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
impl Binary for PropertyOptions
Source§impl BitAnd for PropertyOptions
impl BitAnd for PropertyOptions
Source§impl BitAndAssign for PropertyOptions
impl BitAndAssign for PropertyOptions
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for PropertyOptions
impl BitOr for PropertyOptions
Source§fn bitor(self, other: PropertyOptions) -> Self
fn bitor(self, other: PropertyOptions) -> Self
The bitwise or (|) of the bits in self and other.
Source§type Output = PropertyOptions
type Output = PropertyOptions
| operator.Source§impl BitOrAssign for PropertyOptions
impl BitOrAssign for PropertyOptions
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for PropertyOptions
impl BitXor for PropertyOptions
Source§impl BitXorAssign for PropertyOptions
impl BitXorAssign for PropertyOptions
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for PropertyOptions
impl Clone for PropertyOptions
Source§fn clone(&self) -> PropertyOptions
fn clone(&self) -> PropertyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PropertyOptions
Source§impl Debug for PropertyOptions
impl Debug for PropertyOptions
Source§impl Default for PropertyOptions
impl Default for PropertyOptions
Source§fn default() -> PropertyOptions
fn default() -> PropertyOptions
impl Eq for PropertyOptions
Source§impl Extend<PropertyOptions> for PropertyOptions
impl Extend<PropertyOptions> for PropertyOptions
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
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)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for PropertyOptions
impl Flags for PropertyOptions
Source§const FLAGS: &'static [Flag<PropertyOptions>]
const FLAGS: &'static [Flag<PropertyOptions>]
Source§fn from_bits_retain(bits: i32) -> PropertyOptions
fn from_bits_retain(bits: i32) -> PropertyOptions
Source§fn all_named() -> PropertyOptions
fn all_named() -> PropertyOptions
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<PropertyOptions> for PropertyOptions
impl FromIterator<PropertyOptions> for PropertyOptions
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
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
impl Hash for PropertyOptions
Source§impl IntoIterator for PropertyOptions
impl IntoIterator for PropertyOptions
Source§impl LowerHex for PropertyOptions
impl LowerHex for PropertyOptions
Source§impl Not for PropertyOptions
impl Not for PropertyOptions
Source§impl Octal for PropertyOptions
impl Octal for PropertyOptions
Source§impl PartialEq for PropertyOptions
impl PartialEq for PropertyOptions
Source§impl PublicFlags for PropertyOptions
impl PublicFlags for PropertyOptions
impl StructuralPartialEq for PropertyOptions
Source§impl Sub for PropertyOptions
impl Sub for PropertyOptions
Source§fn sub(self, other: Self) -> Self
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
type Output = PropertyOptions
- operator.Source§impl SubAssign for PropertyOptions
impl SubAssign for PropertyOptions
Source§fn sub_assign(&mut self, other: Self)
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.