pub trait Property<'t>: InspectTypeInternal {
    type Type;

    // Required method
    fn set(&self, value: Self::Type);

    // Provided method
    fn atomic_update<R, F: FnOnce(&Self) -> R>(&self, update_fn: F) -> R { ... }
}
Expand description

Trait implemented by properties.

Required Associated Types§

source

type Type

The type of the property.

Required Methods§

source

fn set(&self, value: Self::Type)

Set the property value to |value|.

Provided Methods§

source

fn atomic_update<R, F: FnOnce(&Self) -> R>(&self, update_fn: F) -> R

Takes a function to execute as under a single lock of the Inspect VMO. This function receives a reference to the Property on which it is called.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'t> Property<'t> for BoolProperty

§

type Type = bool

source§

impl<'t> Property<'t> for BytesProperty

§

type Type = &'t [u8]

source§

impl<'t> Property<'t> for DoubleProperty

§

type Type = f64

source§

impl<'t> Property<'t> for IntProperty

§

type Type = i64

source§

impl<'t> Property<'t> for StringProperty

§

type Type = &'t str

source§

impl<'t> Property<'t> for UintProperty

§

type Type = u64