pub struct Socket {
pub id: u8,
pub domains: HashMap<u8, Domain>,
/* private fields */
}Fields§
§id: u8id of the current socket.
domains: HashMap<u8, Domain>domains of the current socket.
Implementations§
Source§impl Socket
impl Socket
Sourcepub fn energy(&self) -> Result<u64, ReadError>
pub fn energy(&self) -> Result<u64, ReadError>
Returns amount of energy used by the socket. The returned value is in micro joules.
pub fn max_energy_range(&self) -> Result<u64, ReadError>
Sourcepub fn total_energy(&self) -> Result<u64, ReadError>
pub fn total_energy(&self) -> Result<u64, ReadError>
Returns the sum of energy used by the sockets and the domains. The returned value is in micro joules.
pub fn snapshot(&self) -> Result<SocketSnapshot, ReadError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Socket
impl RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl UnwindSafe for Socket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more