pub struct StaticValue(/* private fields */);
Expand description
avoiding lifetime issues with generics See: https://github.com/rust-lang/rust/issues/64552
Implementations§
source§impl StaticValue
impl StaticValue
Methods from Deref<Target = Value<'static>>§
sourcepub fn clone_static(&self) -> Value<'static>
pub fn clone_static(&self) -> Value<'static>
Clones the current value and enforces a static lifetime, it works the same
as into_static
but includes cloning logic
sourcepub fn try_as_bytes(&self) -> Result<&[u8], TryTypeError>
pub fn try_as_bytes(&self) -> Result<&[u8], TryTypeError>
Trait Implementations§
source§impl AsRef<Value<'static>> for StaticValue
impl AsRef<Value<'static>> for StaticValue
source§impl Clone for StaticValue
impl Clone for StaticValue
source§fn clone(&self) -> StaticValue
fn clone(&self) -> StaticValue
Returns a copy of the value. Read more
1.0.0 · 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 StaticValue
impl Debug for StaticValue
source§impl Deref for StaticValue
impl Deref for StaticValue
source§impl<'de> Deserialize<'de> for StaticValue
impl<'de> Deserialize<'de> for StaticValue
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 StaticValue
impl Display for StaticValue
source§impl From<Value<'static>> for StaticValue
impl From<Value<'static>> for StaticValue
source§impl PartialEq for StaticValue
impl PartialEq for StaticValue
source§impl Serialize for StaticValue
impl Serialize for StaticValue
impl StructuralPartialEq for StaticValue
Auto Trait Implementations§
impl Freeze for StaticValue
impl RefUnwindSafe for StaticValue
impl Send for StaticValue
impl Sync for StaticValue
impl Unpin for StaticValue
impl UnwindSafe for StaticValue
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)