pub struct Value<'a>(/* private fields */);Expand description
A borrowed value in a key-value pair.
Implementations§
Source§impl<'a> Value<'a>
impl<'a> Value<'a>
Sourcepub fn static_str(s: &'static str) -> Self
pub fn static_str(s: &'static str) -> Self
Create a value from a static string.
Sourcepub fn map(m: &'a [(Key<'a>, Value<'a>)]) -> Self
pub fn map(m: &'a [(Key<'a>, Value<'a>)]) -> Self
Create a value from a borrowed map of key-value pairs.
Sourcepub fn debug(d: &'a dyn Debug) -> Self
pub fn debug(d: &'a dyn Debug) -> Self
Create a value that is formatted lazily with fmt::Debug.
Sourcepub fn display(d: &'a dyn Display) -> Self
pub fn display(d: &'a dyn Display) -> Self
Create a value that is formatted lazily with fmt::Display.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> !RefUnwindSafe for Value<'a>
impl<'a> !Send for Value<'a>
impl<'a> !Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnsafeUnpin for Value<'a>
impl<'a> !UnwindSafe for Value<'a>
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