mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-27 23:01:57 +00:00
rust fmt for pbs src
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
50fa7bad49
commit
b635dc3ee1
@ -1,17 +1,16 @@
|
||||
use std::borrow::Cow;
|
||||
use anyhow::{bail, Error};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use proxmox_schema::{api, ApiStringFormat, const_regex, Schema, StringSchema};
|
||||
use proxmox_schema::{api, const_regex, ApiStringFormat, Schema, StringSchema};
|
||||
|
||||
const_regex!{
|
||||
const_regex! {
|
||||
pub MAINTENANCE_MESSAGE_REGEX = r"^[[:^cntrl:]]*$";
|
||||
}
|
||||
|
||||
pub const MAINTENANCE_MESSAGE_FORMAT: ApiStringFormat =
|
||||
ApiStringFormat::Pattern(&MAINTENANCE_MESSAGE_REGEX);
|
||||
|
||||
|
||||
pub const MAINTENANCE_MESSAGE_SCHEMA: Schema =
|
||||
StringSchema::new("Message describing the reason for the maintenance.")
|
||||
.format(&MAINTENANCE_MESSAGE_FORMAT)
|
||||
@ -27,7 +26,7 @@ pub enum Operation {
|
||||
|
||||
#[api]
|
||||
#[derive(Deserialize, Serialize, PartialEq)]
|
||||
#[serde(rename_all="kebab-case")]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
/// Maintenance type.
|
||||
pub enum MaintenanceType {
|
||||
/// Only read operations are allowed on the datastore.
|
||||
|
Loading…
Reference in New Issue
Block a user