pub struct MctpAddr { /* private fields */ }
Expand description
Helper for applications taking an MCTP address as an argument, configuration, etc.
Address specifications can either be <eid>
, or <net>,<eid>
EID may be either specified in decimal or hex, the latter requiring an ‘0x’ prefix.
Net must be in decimal.
If no network is specified, the default of MCTP_NET_ANY is used.
Implementations§
Source§impl MctpAddr
impl MctpAddr
Sourcepub fn net(&self) -> u32
pub fn net(&self) -> u32
Return the MCTP Network ID for this address, defaulting to MCTP_NET_ANY if none was provided originally.
Sourcepub fn create_endpoint(&self) -> Result<MctpLinuxReq>
pub fn create_endpoint(&self) -> Result<MctpLinuxReq>
Create an MctpLinuxReq
using the net & eid values in this address.
Sourcepub fn create_listener(&self, typ: MsgType) -> Result<MctpLinuxListener>
pub fn create_listener(&self, typ: MsgType) -> Result<MctpLinuxListener>
Create an MCTPListener
.
The net of the listener comes from this address, with the MCTP message type as an argument.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MctpAddr
impl RefUnwindSafe for MctpAddr
impl Send for MctpAddr
impl Sync for MctpAddr
impl Unpin for MctpAddr
impl UnwindSafe for MctpAddr
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