Struct dtn7::dtnconfig::DtnConfig

source ·
pub struct DtnConfig {
Show 27 fields pub debug: bool, pub unsafe_httpd: bool, pub v4: bool, pub v6: bool, pub custom_timeout: bool, pub enable_period: bool, pub nodeid: String, pub host_eid: EndpointID, pub webport: u16, pub announcement_interval: Duration, pub disable_neighbour_discovery: bool, pub discovery_destinations: BTreeMap<String, u32>, pub janitor_interval: Duration, pub endpoints: Vec<String>, pub clas: Vec<(CLAsAvailable, HashMap<String, String>)>, pub cla_global_settings: HashMap<CLAsAvailable, HashMap<String, String>>, pub services: BTreeMap<u8, String>, pub routing: String, pub routing_settings: BTreeMap<String, HashMap<String, String>>, pub peer_timeout: Duration, pub statics: Vec<DtnPeer>, pub workdir: PathBuf, pub db: String, pub generate_status_reports: bool, pub ecla_tcp_port: u16, pub ecla_enable: bool, pub parallel_bundle_processing: bool,
}

Fields§

§debug: bool§unsafe_httpd: bool§v4: bool§v6: bool§custom_timeout: bool§enable_period: bool§nodeid: String§host_eid: EndpointID§webport: u16§announcement_interval: Duration§disable_neighbour_discovery: bool§discovery_destinations: BTreeMap<String, u32>§janitor_interval: Duration§endpoints: Vec<String>§clas: Vec<(CLAsAvailable, HashMap<String, String>)>§cla_global_settings: HashMap<CLAsAvailable, HashMap<String, String>>§services: BTreeMap<u8, String>§routing: String§routing_settings: BTreeMap<String, HashMap<String, String>>§peer_timeout: Duration§statics: Vec<DtnPeer>§workdir: PathBuf§db: String§generate_status_reports: bool§ecla_tcp_port: u16§ecla_enable: bool§parallel_bundle_processing: bool

Implementations§

source§

impl DtnConfig

source

pub fn new() -> DtnConfig

source

pub fn set(&mut self, cfg: DtnConfig)

source

pub fn add_destination(&mut self, destination: String) -> Result<()>

Helper function that adds discovery destinations to a config struct

When provided with an IP address without port the default port 3003 is appended

source

pub fn check_destinations(&mut self) -> Result<()>

source

pub fn update_beacon_sequence_number(&mut self, destination: &str)

Updates the beacon sequence number everytime a beacon is sent to a specific IP address

Trait Implementations§

source§

impl Clone for DtnConfig

source§

fn clone(&self) -> DtnConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DtnConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DtnConfig

source§

fn default() -> DtnConfig

Returns the “default value” for a type. Read more
source§

impl From<PathBuf> for DtnConfig

source§

fn from(item: PathBuf) -> Self

Converts to this type from the input type.
source§

impl Serialize for DtnConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more