pub struct PortConfig<A> {
pub acceptable_master_list: A,
pub delay_mechanism: DelayMechanism,
pub announce_interval: Interval,
pub announce_receipt_timeout: u8,
pub sync_interval: Interval,
pub master_only: bool,
pub delay_asymmetry: Duration,
}
Expand description
Configuration items of the PTP PortDS dataset. Dynamical fields are kept as part of crate::port::Port.
Fields§
§acceptable_master_list: A
A list that contains all nodes that this Port
will accept as a
master.
This should implement the AcceptableMasterList
trait.
delay_mechanism: DelayMechanism
The mechanism used to measure the delay at this Port
.
announce_interval: Interval
The time between announcements.
announce_receipt_timeout: u8
Specifies how many announce_interval
s to
wait until the announce message expires.
sync_interval: Interval
Time between two sync messages when this Port
is in master mode.
master_only: bool
Never let this Port
become a slave.
delay_asymmetry: Duration
The estimated asymmetry in the link connected to this Port
Implementations§
Source§impl<A> PortConfig<A>
impl<A> PortConfig<A>
Sourcepub fn min_delay_req_interval(&self) -> Interval
pub fn min_delay_req_interval(&self) -> Interval
Minimum time between two delay request messages
Sourcepub fn announce_duration(&self, rng: &mut impl Rng) -> Duration
pub fn announce_duration(&self, rng: &mut impl Rng) -> Duration
Time between two announce messages
For more information see IEEE1588-2019 section 9.2.6.12
Trait Implementations§
Source§impl<A: Clone> Clone for PortConfig<A>
impl<A: Clone> Clone for PortConfig<A>
Source§fn clone(&self) -> PortConfig<A>
fn clone(&self) -> PortConfig<A>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<A: Debug> Debug for PortConfig<A>
impl<A: Debug> Debug for PortConfig<A>
Source§impl<A: Hash> Hash for PortConfig<A>
impl<A: Hash> Hash for PortConfig<A>
Source§impl<A: PartialEq> PartialEq for PortConfig<A>
impl<A: PartialEq> PartialEq for PortConfig<A>
impl<A: Copy> Copy for PortConfig<A>
impl<A: Eq> Eq for PortConfig<A>
impl<A> StructuralPartialEq for PortConfig<A>
Auto Trait Implementations§
impl<A> Freeze for PortConfig<A>where
A: Freeze,
impl<A> RefUnwindSafe for PortConfig<A>where
A: RefUnwindSafe,
impl<A> Send for PortConfig<A>where
A: Send,
impl<A> Sync for PortConfig<A>where
A: Sync,
impl<A> Unpin for PortConfig<A>where
A: Unpin,
impl<A> UnwindSafe for PortConfig<A>where
A: UnwindSafe,
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.