Struct Settings

Source
pub struct Settings {
Show 55 fields pub enable_jmx_monitoring: bool, pub rcon_port: u16, pub level_seed: Option<i64>, pub gamemode: Gamemode, pub enable_command_block: bool, pub enable_query: bool, pub enforce_secure_profile: bool, pub level_name: Option<String>, pub motd: Option<String>, pub query_port: u16, pub pvp: bool, pub generate_structures: bool, pub max_chained_neighbor_updates: Option<i32>, pub difficulty: Difficulty, pub network_compression_threshold: i32, pub max_tick_time: i64, pub require_resource_pack: bool, pub use_native_transport: bool, pub max_players: u32, pub online_mode: bool, pub enable_status: bool, pub allow_flight: bool, pub initial_disabled_packs: Option<String>, pub broadcast_rcon_to_ops: bool, pub view_distance: u8, pub server_ip: Option<Ipv4Addr>, pub resource_pack_prompt: Option<String>, pub allow_nether: bool, pub server_port: u16, pub enable_rcon: bool, pub sync_chunk_writes: bool, pub op_permission_level: u8, pub prevent_proxy_connections: bool, pub hide_online_players: bool, pub resource_pack: Option<String>, pub entity_broadcast_range_percentage: u8, pub simulation_distance: u8, pub rcon_password: Option<String>, pub player_idle_timeout: i32, pub force_gamemode: bool, pub rate_limit: u32, pub hardcore: bool, pub white_list: bool, pub broadcast_console_to_ops: bool, pub spawn_npcs: bool, pub spawn_animals: bool, pub log_ips: bool, pub function_permission_level: u8, pub initial_enabled_packs: String, pub level_type: WorldPreset, pub spawn_monsters: bool, pub enforce_whitelist: bool, pub spawn_protection: u16, pub resource_pack_sha1: Option<String>, pub max_world_size: u32,
}

Fields§

§enable_jmx_monitoring: bool§rcon_port: u16§level_seed: Option<i64>§gamemode: Gamemode§enable_command_block: bool§enable_query: bool§enforce_secure_profile: bool§level_name: Option<String>§motd: Option<String>§query_port: u16§pvp: bool§generate_structures: bool§max_chained_neighbor_updates: Option<i32>§difficulty: Difficulty§network_compression_threshold: i32§max_tick_time: i64§require_resource_pack: bool§use_native_transport: bool§max_players: u32§online_mode: bool§enable_status: bool§allow_flight: bool§initial_disabled_packs: Option<String>§broadcast_rcon_to_ops: bool§view_distance: u8§server_ip: Option<Ipv4Addr>§resource_pack_prompt: Option<String>§allow_nether: bool§server_port: u16§enable_rcon: bool§sync_chunk_writes: bool§op_permission_level: u8§prevent_proxy_connections: bool§hide_online_players: bool§resource_pack: Option<String>§entity_broadcast_range_percentage: u8§simulation_distance: u8§rcon_password: Option<String>§player_idle_timeout: i32§force_gamemode: bool§rate_limit: u32§hardcore: bool§white_list: bool§broadcast_console_to_ops: bool§spawn_npcs: bool§spawn_animals: bool§log_ips: bool§function_permission_level: u8§initial_enabled_packs: String§level_type: WorldPreset§spawn_monsters: bool§enforce_whitelist: bool§spawn_protection: u16§resource_pack_sha1: Option<String>§max_world_size: u32

Implementations§

Source§

impl Settings

Source

pub fn new() -> Self

Source

fn get_bool(config: &Properties, key: &str, default: bool) -> bool

Source

fn get_u16(config: &Properties, key: &str, default: u16) -> u16

Source

fn get_u32(config: &Properties, key: &str, default: u32) -> u32

Source

fn get_u8(config: &Properties, key: &str, default: u8) -> u8

Source

fn get_i32(config: &Properties, key: &str, default: i32) -> i32

Source

fn get_i64(config: &Properties, key: &str, default: i64) -> i64

Source

fn get_enum<T: FromStr>(config: &Properties, key: &str, default: T) -> T

Source

fn get_optional_string(config: &Properties, key: &str) -> Option<String>

Source

fn get_optional_i64(config: &Properties, key: &str) -> Option<i64>

Source

fn get_optional_i32(config: &Properties, key: &str) -> Option<i32>

Source

fn get_optional_ip(config: &Properties, key: &str) -> Option<Ipv4Addr>

Trait Implementations§

Source§

impl Debug for Settings

Source§

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

Formats the value using the given formatter. 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.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

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

Source§

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>,

Source§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,