pub struct SborPath(Vec<usize>);
Expand description
A series of indexes which describes some value in the sbor tree
Tuple Fields§
§0: Vec<usize>
Implementations§
source§impl SborPath
impl SborPath
pub fn new(path: Vec<usize>) -> SborPath
pub fn get_from_value<X, Y, 'a>(
&'a self,
value: &'a Value<X, Y>
) -> Option<&'a Value<X, Y>>where
X: CustomValueKind,
Y: CustomValue<X>,
pub fn get_from_value_mut<X, Y, 'a>(
&'a self,
value: &'a mut Value<X, Y>
) -> Option<&'a mut Value<X, Y>>where
X: CustomValueKind,
Y: CustomValue<X>,
Trait Implementations§
source§impl From<SborPath> for SborPathBuf
impl From<SborPath> for SborPathBuf
source§fn from(path: SborPath) -> SborPathBuf
fn from(path: SborPath) -> SborPathBuf
Converts to this type from the input type.
source§impl From<SborPathBuf> for SborPath
impl From<SborPathBuf> for SborPath
source§fn from(mutable: SborPathBuf) -> SborPath
fn from(mutable: SborPathBuf) -> SborPath
Converts to this type from the input type.
source§impl PartialEq for SborPath
impl PartialEq for SborPath
impl Eq for SborPath
impl StructuralPartialEq for SborPath
Auto Trait Implementations§
impl RefUnwindSafe for SborPath
impl Send for SborPath
impl Sync for SborPath
impl Unpin for SborPath
impl UnwindSafe for SborPath
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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<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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more