Struct hcloud::models::server::Server

source ·
pub struct Server {
Show 22 fields pub backup_window: Option<String>, pub created: String, pub datacenter: Box<Datacenter>, pub id: i64, pub image: Option<Box<Image>>, pub included_traffic: Option<i64>, pub ingoing_traffic: Option<i64>, pub iso: Option<Box<Iso>>, pub labels: HashMap<String, String>, pub load_balancers: Option<Vec<i64>>, pub locked: bool, pub name: String, pub outgoing_traffic: Option<i64>, pub placement_group: Option<Option<Box<PlacementGroup>>>, pub primary_disk_size: i32, pub private_net: Vec<ServerPrivateNet>, pub protection: Box<ServerProtection>, pub public_net: Box<ServerPublicNet>, pub rescue_enabled: bool, pub server_type: Box<ServerTypeNoArchitecture>, pub status: Status, pub volumes: Option<Vec<i64>>,
}
Expand description

Server : Servers are virtual machines that can be provisioned.

Fields§

§backup_window: Option<String>

Time window (UTC) in which the backup will run, or null if the backups are not enabled

§created: String

Point in time when the Resource was created (in ISO-8601 format)

§datacenter: Box<Datacenter>§id: i64

ID of the Resource

§image: Option<Box<Image>>§included_traffic: Option<i64>

Free Traffic for the current billing period in bytes

§ingoing_traffic: Option<i64>

Inbound Traffic for the current billing period in bytes

§iso: Option<Box<Iso>>§labels: HashMap<String, String>

User-defined labels (key-value pairs)

§load_balancers: Option<Vec<i64>>

Load Balancer IDs assigned to the server.

§locked: bool

True if Server has been locked and is not available to user

§name: String

Name of the Server (must be unique per Project and a valid hostname as per RFC 1123)

§outgoing_traffic: Option<i64>

Outbound Traffic for the current billing period in bytes

§placement_group: Option<Option<Box<PlacementGroup>>>§primary_disk_size: i32

Size of the primary Disk

§private_net: Vec<ServerPrivateNet>

Private networks information

§protection: Box<ServerProtection>§public_net: Box<ServerPublicNet>§rescue_enabled: bool

True if rescue mode is enabled. Server will then boot into rescue system on next reboot

§server_type: Box<ServerTypeNoArchitecture>§status: Status

Status of the Server

§volumes: Option<Vec<i64>>

IDs of Volumes assigned to this Server

Implementations§

source§

impl Server

source

pub fn new( backup_window: Option<String>, created: String, datacenter: Datacenter, id: i64, image: Option<Image>, included_traffic: Option<i64>, ingoing_traffic: Option<i64>, iso: Option<Iso>, labels: HashMap<String, String>, locked: bool, name: String, outgoing_traffic: Option<i64>, primary_disk_size: i32, private_net: Vec<ServerPrivateNet>, protection: ServerProtection, public_net: ServerPublicNet, rescue_enabled: bool, server_type: ServerTypeNoArchitecture, status: Status ) -> Server

Servers are virtual machines that can be provisioned.

Trait Implementations§

source§

impl Clone for Server

source§

fn clone(&self) -> Server

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 Server

source§

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

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

impl Default for Server

source§

fn default() -> Server

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

impl<'de> Deserialize<'de> for Server

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Server

source§

fn eq(&self, other: &Server) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Server

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

impl StructuralPartialEq for Server

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

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

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