pub struct PropertyCollection {
pub handle: SmartHandle<SPXPROPERTYBAGHANDLE>,
}
Expand description
PropertyCollection is a class to retrieve or set a property value from a property collection.
Fields
handle: SmartHandle<SPXPROPERTYBAGHANDLE>
Implementations
sourceimpl PropertyCollection
impl PropertyCollection
sourcepub fn from_handle(handle: SPXPROPERTYBAGHANDLE) -> PropertyCollection
pub fn from_handle(handle: SPXPROPERTYBAGHANDLE) -> PropertyCollection
Creates a PropertyCollection from a handle (for internal use)
sourcepub fn set_property_by_string<S>(
&mut self,
prop_name: S,
prop_val: S
) -> Result<()> where
S: Into<Vec<u8>>,
pub fn set_property_by_string<S>(
&mut self,
prop_name: S,
prop_val: S
) -> Result<()> where
S: Into<Vec<u8>>,
SetProperty sets the value of a property.
sourcepub fn set_property<S>(
&mut self,
prop_id: PropertyId,
prop_val: S
) -> Result<()> where
S: Into<Vec<u8>>,
pub fn set_property<S>(
&mut self,
prop_id: PropertyId,
prop_val: S
) -> Result<()> where
S: Into<Vec<u8>>,
SetProperty sets the value of a property.
sourcepub fn get_property<S>(
&self,
prop_id: PropertyId,
default_val: S
) -> Result<String> where
S: Into<Vec<u8>>,
pub fn get_property<S>(
&self,
prop_id: PropertyId,
default_val: S
) -> Result<String> where
S: Into<Vec<u8>>,
Returns value of a property. If the property value is not defined, the specified default value is returned.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PropertyCollection
impl Send for PropertyCollection
impl !Sync for PropertyCollection
impl Unpin for PropertyCollection
impl UnwindSafe for PropertyCollection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more