[]Struct mycelium_lib::prelude::Config

pub struct Config {
    pub tcp_port: usize,
    pub udp_port: usize,
    // some fields omitted
}

Fields

tcp_port: usizeudp_port: usize

Methods

impl Config

pub fn new() -> Config

pub fn file_name() -> &'static str

pub fn get_block_size(&self) -> usize

pub fn get_max_page_size(&self) -> usize

pub fn get_page_block_count(&self) -> usize

pub fn get_data_dir(&self) -> Option<String>

pub fn with_block_size(self, block_size: usize) -> Config

Default size of block. 1024 byte default.

pub fn with_block_count(self, block_count: usize) -> Config

Number of blocks stored per page. 30 block default.

pub fn with_data_directory(self, data_dir: &str) -> Config

Directory of data store. Required. If not set runtime errors.

Trait Implementations

impl Clone for Config

impl Fetchable for Config

impl Debug for Config

impl Serialize for Config

impl<'de> Deserialize<'de> for Config

impl Default for Config

Defaults based on machine

Auto Trait Implementations

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

impl RefUnwindSafe for Config

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]