pub enum ZoneFileFormat {
Json,
Bind,
Csv,
}Expand description
File format of a zone export or import (?format=).
Variants§
Json
The dinio-zone document (ZoneDocument): records with geo routing, balance
ratio, host health, geo bans and health checks, plus redirects. Names relative to
the zone, so it works as a template for another zone. Core’s default.
Bind
A BIND zone file: name, ttl, type and data only.
Csv
CSV with name, ttl, type and data only.
Implementations§
Source§impl ZoneFileFormat
impl ZoneFileFormat
Sourcepub fn from_file_name(name: &str) -> Option<Self>
pub fn from_file_name(name: &str) -> Option<Self>
The format a file name implies: .json; .zone, .bind, .db; .csv (case does
not matter). None for anything else.
§Examples
use dinio_sdk::models::ZoneFileFormat;
assert_eq!(ZoneFileFormat::from_file_name("example.com.zone"), Some(ZoneFileFormat::Bind));
assert_eq!(ZoneFileFormat::from_file_name("export.CSV"), Some(ZoneFileFormat::Csv));
assert_eq!(ZoneFileFormat::from_file_name("records.txt"), None);Trait Implementations§
Source§impl Clone for ZoneFileFormat
impl Clone for ZoneFileFormat
Source§fn clone(&self) -> ZoneFileFormat
fn clone(&self) -> ZoneFileFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ZoneFileFormat
Source§impl Debug for ZoneFileFormat
impl Debug for ZoneFileFormat
Source§impl Default for ZoneFileFormat
impl Default for ZoneFileFormat
Source§fn default() -> ZoneFileFormat
fn default() -> ZoneFileFormat
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ZoneFileFormat
impl<'de> Deserialize<'de> for ZoneFileFormat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for ZoneFileFormat
impl Display for ZoneFileFormat
impl Eq for ZoneFileFormat
Source§impl FromStr for ZoneFileFormat
impl FromStr for ZoneFileFormat
Source§impl Hash for ZoneFileFormat
impl Hash for ZoneFileFormat
Source§impl PartialEq for ZoneFileFormat
impl PartialEq for ZoneFileFormat
Source§impl Serialize for ZoneFileFormat
impl Serialize for ZoneFileFormat
impl StructuralPartialEq for ZoneFileFormat
Auto Trait Implementations§
impl Freeze for ZoneFileFormat
impl RefUnwindSafe for ZoneFileFormat
impl Send for ZoneFileFormat
impl Sync for ZoneFileFormat
impl Unpin for ZoneFileFormat
impl UnsafeUnpin for ZoneFileFormat
impl UnwindSafe for ZoneFileFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.