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<MctpLinuxEp>
pub fn create_endpoint(&self) -> Result<MctpLinuxEp>
Create an MCTPEndpoint using the net & eid values in this address.
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