pub struct Ptp {
pub version: PtpVersion,
pub server: PtpServer,
}Expand description
PTP clock source with version and server details.
Fields§
§version: PtpVersion§server: PtpServerImplementations§
Source§impl Ptp
impl Ptp
Sourcepub fn new(version: PtpVersion, server: PtpServer) -> Self
pub fn new(version: PtpVersion, server: PtpServer) -> Self
Constructs a Ptp with the specified PtpVersion and PtpServer.
Sourcepub fn from_gmid(version: PtpVersion, gmid: impl Into<Eui64>) -> Self
pub fn from_gmid(version: PtpVersion, gmid: impl Into<Eui64>) -> Self
Constructs a Ptp from the specified PtpVersion and GMID.
Sourcepub fn from_gmid_with_domain(gmid: impl Into<Eui64>, domain: PtpDomain) -> Self
pub fn from_gmid_with_domain(gmid: impl Into<Eui64>, domain: PtpDomain) -> Self
Sourcepub fn from_gmid_with_domain_name(
gmid: impl Into<Eui64>,
name: impl ToString,
) -> Self
pub fn from_gmid_with_domain_name( gmid: impl Into<Eui64>, name: impl ToString, ) -> Self
Constructs a Ptp from the specified GMID and domain name.
This will assign version IEEE 1588-2002.
Sourcepub fn try_from_gmid_with_domain_number(
gmid: impl Into<Eui64>,
number: u8,
) -> Result<Self, AttributeError>
pub fn try_from_gmid_with_domain_number( gmid: impl Into<Eui64>, number: u8, ) -> Result<Self, AttributeError>
Tries to construct a Ptp from the specified GMID and domain number.
This will assign version IEEE 1588-2008.
Returns an Error if number is not in range (0-127) (inclusive)
Sourcepub fn new_traceable(version: PtpVersion) -> Self
pub fn new_traceable(version: PtpVersion) -> Self
Constructs a traceable Ptp.
Trait Implementations§
impl Eq for Ptp
Source§impl From<(PtpVersion, PtpServer)> for Ptp
impl From<(PtpVersion, PtpServer)> for Ptp
Source§fn from(ptp: (PtpVersion, PtpServer)) -> Self
fn from(ptp: (PtpVersion, PtpServer)) -> Self
Converts to this type from the input type.
Source§impl From<Ptp> for ReferenceClock
impl From<Ptp> for ReferenceClock
impl StructuralPartialEq for Ptp
Auto Trait Implementations§
impl Freeze for Ptp
impl RefUnwindSafe for Ptp
impl Send for Ptp
impl Sync for Ptp
impl Unpin for Ptp
impl UnsafeUnpin for Ptp
impl UnwindSafe for Ptp
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