pub struct ByteConfig {
pub parsed: usize,
pub raw: String,
}Expand description
Byte size configuration with raw string representation
This type allows deserializing human-readable byte sizes from configuration files.
§Examples
max_size = "10MB"
buffer_size = "4KiB"Fields§
§parsed: usize§raw: StringTrait Implementations§
Source§impl Clone for ByteConfig
impl Clone for ByteConfig
Source§fn clone(&self) -> ByteConfig
fn clone(&self) -> ByteConfig
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 moreSource§impl Debug for ByteConfig
impl Debug for ByteConfig
Source§impl<'de> Deserialize<'de> for ByteConfig
impl<'de> Deserialize<'de> for ByteConfig
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ByteConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ByteConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ByteConfig
impl Serialize for ByteConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ByteConfig
impl RefUnwindSafe for ByteConfig
impl Send for ByteConfig
impl Sync for ByteConfig
impl Unpin for ByteConfig
impl UnsafeUnpin for ByteConfig
impl UnwindSafe for ByteConfig
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