Struct stabilizer::settings::SettingsItem
source · pub struct SettingsItem {
pub path: String<64>,
pub data: Vec<u8, 256>,
}
Fields§
§path: String<64>
§data: Vec<u8, 256>
Trait Implementations§
source§impl Default for SettingsItem
impl Default for SettingsItem
source§fn default() -> SettingsItem
fn default() -> SettingsItem
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SettingsItem
impl<'de> Deserialize<'de> for SettingsItem
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 Serialize for SettingsItem
impl Serialize for SettingsItem
source§impl StorageItem for SettingsItem
impl StorageItem for SettingsItem
source§fn serialize_into(&self, buffer: &mut [u8]) -> Result<usize, Self::Error>
fn serialize_into(&self, buffer: &mut [u8]) -> Result<usize, Self::Error>
Serialize the key-value item into the given buffer.
Returns the number of bytes the buffer was filled with or an error. Read more
source§fn deserialize_from(buffer: &[u8]) -> Result<Self, Self::Error>
fn deserialize_from(buffer: &[u8]) -> Result<Self, Self::Error>
Deserialize the key-value item from the given buffer. This buffer should be as long
as what was serialized before.
source§fn key(&self) -> Self::Key
fn key(&self) -> Self::Key
The key of the key-value item. It is used by the storage to know what the key of this item is.
§fn deserialize_key_only(buffer: &[u8]) -> Result<Self::Key, Self::Error>where
Self: Sized,
fn deserialize_key_only(buffer: &[u8]) -> Result<Self::Key, Self::Error>where
Self: Sized,
Optimization for deserializing the key only. Can give a small performance boost if
your key is easily extractable from the buffer.
Auto Trait Implementations§
impl Freeze for SettingsItem
impl RefUnwindSafe for SettingsItem
impl Send for SettingsItem
impl Sync for SettingsItem
impl Unpin for SettingsItem
impl UnwindSafe for SettingsItem
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