pub struct Annotations<A: Annotation> { /* private fields */ }
Implementations§
§impl<A: Annotation> Annotations<A>
impl<A: Annotation> Annotations<A>
pub fn new() -> Self
pub fn get_annotations(&mut self) -> &mut Option<HashMap<String, A>>
pub fn annotations<T: Into<String>, U: IntoIterator<Item = (T, A)>>( self, value: U, ) -> Annotations<A>
Trait Implementations§
source§impl<A: Clone + Annotation> Clone for Annotations<A>
impl<A: Clone + Annotation> Clone for Annotations<A>
source§fn clone(&self) -> Annotations<A>
fn clone(&self) -> Annotations<A>
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<A: Debug + Annotation> Debug for Annotations<A>
impl<A: Debug + Annotation> Debug for Annotations<A>
source§impl<A: Default + Annotation> Default for Annotations<A>
impl<A: Default + Annotation> Default for Annotations<A>
source§fn default() -> Annotations<A>
fn default() -> Annotations<A>
Returns the “default value” for a type. Read more
source§impl<'de, A> Deserialize<'de> for Annotations<A>where
A: Deserialize<'de> + Annotation,
impl<'de, A> Deserialize<'de> for Annotations<A>where
A: Deserialize<'de> + Annotation,
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<A: PartialEq + Annotation> PartialEq for Annotations<A>
impl<A: PartialEq + Annotation> PartialEq for Annotations<A>
source§impl<A> Serialize for Annotations<A>where
A: Serialize + Annotation,
impl<A> Serialize for Annotations<A>where
A: Serialize + Annotation,
impl<A: Eq + Annotation> Eq for Annotations<A>
impl<A: Annotation> StructuralPartialEq for Annotations<A>
Auto Trait Implementations§
impl<A> Freeze for Annotations<A>
impl<A> RefUnwindSafe for Annotations<A>where
A: RefUnwindSafe,
impl<A> Send for Annotations<A>where
A: Send,
impl<A> Sync for Annotations<A>where
A: Sync,
impl<A> Unpin for Annotations<A>where
A: Unpin,
impl<A> UnwindSafe for Annotations<A>where
A: UnwindSafe,
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
)