Struct statime::config::PortConfig
source · 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>
source§fn eq(&self, other: &PortConfig<A>) -> bool
fn eq(&self, other: &PortConfig<A>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.