Skip to main content

BoundedNumber

Trait BoundedNumber 

Source
pub trait BoundedNumber {
    const TYPE_DESCRIPTION: &'static str;
    const MIN: Option<f64> = None;
    const MAX: Option<f64> = None;
    const DEFAULT: Option<f64> = None;

    // Required methods
    fn get(&self) -> f64;
    fn new(value: f64) -> Result<Self, BoundedNumberError>
       where Self: Sized;

    // Provided method
    fn validate(value: f64) -> Result<(), BoundedNumberError> { ... }
}

Required Associated Constants§

Source

const TYPE_DESCRIPTION: &'static str

Provided Associated Constants§

Source

const MIN: Option<f64> = None

Source

const MAX: Option<f64> = None

Source

const DEFAULT: Option<f64> = None

Required Methods§

Source

fn get(&self) -> f64

Source

fn new(value: f64) -> Result<Self, BoundedNumberError>
where Self: Sized,

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::vmid::clone::BwlimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::vmid::migrate::BwlimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::vmid::move_volume::BwlimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::vmid::remote_migrate::BwlimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::BwlimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for CpuNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::vmid::config::CpulimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 0 and 8192"

Source§

impl BoundedNumber for proxmox_api::nodes::node::lxc::CpulimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 0 and 8192"

Source§

impl BoundedNumber for proxmox_api::nodes::node::qemu::vmid::config::CpulimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 0 and 128"

Source§

impl BoundedNumber for proxmox_api::nodes::node::qemu::CpulimitNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 0 and 128"

Source§

impl BoundedNumber for proxmox_api::cluster::sdn::fabrics::all::CsnpIntervalNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 1 and 600"

Source§

impl BoundedNumber for proxmox_api::cluster::sdn::fabrics::fabric::id::CsnpIntervalNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 1 and 600"

Source§

impl BoundedNumber for proxmox_api::cluster::sdn::fabrics::fabric::CsnpIntervalNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 1 and 600"

Source§

impl BoundedNumber for DbDevSizeNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 1"

Source§

impl BoundedNumber for proxmox_api::cluster::sdn::fabrics::all::HelloIntervalNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 1 and 600"

Source§

impl BoundedNumber for proxmox_api::cluster::sdn::fabrics::fabric::id::HelloIntervalNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 1 and 600"

Source§

impl BoundedNumber for proxmox_api::cluster::sdn::fabrics::fabric::HelloIntervalNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number between 1 and 600"

Source§

impl BoundedNumber for MaxcpuNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::qemu::vmid::config::MigrateDowntimeNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::nodes::node::qemu::MigrateDowntimeNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0"

Source§

impl BoundedNumber for proxmox_api::cluster::replication::id::RateNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 1"

Source§

impl BoundedNumber for proxmox_api::cluster::replication::RateNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 1"

Source§

impl BoundedNumber for WalDevSizeNum

Source§

const MIN: Option<f64>

Source§

const MAX: Option<f64>

Source§

const DEFAULT: Option<f64>

Source§

const TYPE_DESCRIPTION: &'static str = "an number greater than or equal to 0.5"