Skip to main content

Meter

Struct Meter 

Source
pub struct Meter<'a> { /* private fields */ }
Expand description

Read-only object store for the commissioned simulation profile.

Implementations§

Source§

impl<'a> Meter<'a>

Source

pub fn new(history: &'a RefCell<VirtualMeter>) -> Self

Project the caller’s current import register and history.

Trait Implementations§

Source§

impl ObjectStore for Meter<'_>

Source§

fn get_attribute( &self, class: u16, name: Obis, attr: i8, selection: Option<SelectiveAccess<'_>>, w: &mut dyn Writer, ) -> StoreResult<()>

Write the attribute’s value into w as A-XDR Data. Read more
Source§

fn attribute_access(&self, class: u16, name: Obis, attr: i8) -> AttributeAccess

What this association may do with an attribute. Read more
§

fn set_attribute( &mut self, _class_id: u16, _logical_name: Obis, _attribute_id: i8, _selective_access: Option<SelectiveAccess<'_>>, _value: Data<'_>, ) -> Result<(), DataAccessResult>

Write an attribute. Read more
§

fn invoke_method( &mut self, _class_id: u16, _logical_name: Obis, _method_id: i8, _parameters: Option<Data<'_>>, _w: &mut dyn Writer, ) -> Result<bool, ActionResult>

Invoke a method, writing any return value into w. Read more
§

fn method_access( &self, _class_id: u16, _logical_name: Obis, _method_id: i8, ) -> MethodAccess

What this association may do with a method.
§

fn audit(&mut self, _event: AuditEvent)

Record what the server was asked to do and what came of it. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Meter<'a>

§

impl<'a> !Send for Meter<'a>

§

impl<'a> !Sync for Meter<'a>

§

impl<'a> !UnwindSafe for Meter<'a>

§

impl<'a> Freeze for Meter<'a>

§

impl<'a> Unpin for Meter<'a>

§

impl<'a> UnsafeUnpin for Meter<'a>

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.