libmctp::smbus_proto

Struct SMBusRoutingInformationUpdateEntry

Source
pub struct SMBusRoutingInformationUpdateEntry<T>(pub T);
Expand description

The MCTP SMBus/I2C Routing Information Update Entry Format

Tuple Fields§

§0: T

Implementations§

Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> SMBusRoutingInformationUpdateEntry<T>

Source

pub fn entry_type(&self) -> u8

Entry Type

Source

pub fn set_entry_type(&mut self, value: u8)

Entry Type

Source

pub fn eid_range_size(&self) -> u8

Size of EID Range. The count of EIDs in the range.

Source

pub fn set_eid_range_size(&mut self, value: u8)

Size of EID Range. The count of EIDs in the range.

Source

pub fn first_eid(&self) -> u8

First EID in EID Range

Source

pub fn set_first_eid(&mut self, value: u8)

First EID in EID Range

Source

pub fn physical_address(&self) -> u8

Physical address

Source

pub fn set_physical_address(&mut self, value: u8)

Physical address

Source§

impl SMBusRoutingInformationUpdateEntry<[u8; 4]>

Source

pub fn new( entry_type: RoutingInformationUpdateEntryType, range_size: u8, first_eid: u8, physical_address: u8, ) -> Self

Create a new SMBusRoutingInformationUpdateEntry.

Source

pub fn new_from_buf(buf: [u8; 4]) -> Self

Create a new SMBusRoutingInformationUpdateEntry from an existing buffer.

buffer: The existing buffer for the SMBusRoutingInformationUpdateEntry No checks are performed on the buffer.

Trait Implementations§

Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<i128> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> i128

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: i128)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<i16> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> i16

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: i16)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<i32> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> i32

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: i32)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<i64> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> i64

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: i64)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<i8> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> i8

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: i8)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<u128> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> u128

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: u128)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<u16> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> u16

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: u16)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<u32> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> u32

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: u32)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<u64> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> u64

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: u64)

Set a range of bits.
Source§

impl<T: AsMut<[u8]> + AsRef<[u8]>> BitRange<u8> for SMBusRoutingInformationUpdateEntry<T>

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> u8

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: u8)

Set a range of bits.

Auto Trait Implementations§

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> Bit for T
where T: BitRange<u8>,

Source§

fn bit(&self, bit: usize) -> bool

Get a single bit.
Source§

fn set_bit(&mut self, bit: usize, value: bool)

Set a single bit.
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.