pub struct HostFieldValue { /* private fields */ }Expand description
One field of a HostValue record, addressed by its authoritative Candid
field ID.
The fields are private so a record entry cannot be assembled by struct
literal, which would let a caller reach HostValue::record with a value
whose extent was never measured.
Implementations§
Source§impl HostFieldValue
impl HostFieldValue
Sourcepub fn new(id: u32, value: HostValue) -> Self
pub fn new(id: u32, value: HostValue) -> Self
Pair a field ID with a value.
This is deliberately infallible: a field carries no bound of its own,
and the enclosing HostValue::record call is what measures the
combined extent against the caller’s Limits.
pub fn id(&self) -> u32
pub fn value(&self) -> &HostValue
Trait Implementations§
Source§impl Clone for HostFieldValue
impl Clone for HostFieldValue
Source§fn clone(&self) -> HostFieldValue
fn clone(&self) -> HostFieldValue
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 HostFieldValue
impl Debug for HostFieldValue
impl Eq for HostFieldValue
Source§impl PartialEq for HostFieldValue
impl PartialEq for HostFieldValue
Source§impl Serialize for HostFieldValue
impl Serialize for HostFieldValue
impl StructuralPartialEq for HostFieldValue
Auto Trait Implementations§
impl Freeze for HostFieldValue
impl RefUnwindSafe for HostFieldValue
impl Send for HostFieldValue
impl Sync for HostFieldValue
impl Unpin for HostFieldValue
impl UnsafeUnpin for HostFieldValue
impl UnwindSafe for HostFieldValue
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.