pub struct TransitionBundle(/* private fields */);
Implementations§
Methods from Deref<Target = Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>>§
Sourcepub fn iter_mut(&'c mut self) -> <&'c mut C as IntoIterator>::IntoIter
pub fn iter_mut(&'c mut self) -> <&'c mut C as IntoIterator>::IntoIter
Returns an iterator that allows modifying each value.
The iterator yields all items from start to end.
Sourcepub fn keyed_values_mut(&'c mut self) -> <&'c mut C as IntoIterator>::IntoIter
pub fn keyed_values_mut(&'c mut self) -> <&'c mut C as IntoIterator>::IntoIter
Returns an iterator that allows modifying each value for each key.
Sourcepub fn push(&mut self, elem: <C as Collection>::Item) -> Result<(), Error>
pub fn push(&mut self, elem: <C as Collection>::Item) -> Result<(), Error>
Attempts to add a single element to the confined collection. Fails if the number of elements in the collection already maximal.
Sourcepub fn extend<T>(&mut self, iter: T) -> Result<(), Error>
pub fn extend<T>(&mut self, iter: T) -> Result<(), Error>
Attempts to add all elements from an iterator to the confined collection. Fails if the number of elements in the collection already maximal.
Sourcepub fn len_u8(&self) -> u8
pub fn len_u8(&self) -> u8
Returns number of elements in the confined collection as u8
. The
confinement guarantees that the collection length can’t exceed
u8::MAX
.
Sourcepub fn len_u16(&self) -> u16
pub fn len_u16(&self) -> u16
Returns number of elements in the confined collection as u16
. The
confinement guarantees that the collection length can’t exceed
u16::MAX
.
Sourcepub fn len_u24(&self) -> u24
pub fn len_u24(&self) -> u24
Returns number of elements in the confined collection as u24
. The
confinement guarantees that the collection length can’t exceed
u24::MAX
.
Sourcepub fn len_u32(&self) -> u32
pub fn len_u32(&self) -> u32
Returns number of elements in the confined collection as u32
. The
confinement guarantees that the collection length can’t exceed
u32::MAX
.
Sourcepub fn get_mut(
&mut self,
key: &<C as KeyedCollection>::Key,
) -> Option<&mut <C as KeyedCollection>::Value>
pub fn get_mut( &mut self, key: &<C as KeyedCollection>::Key, ) -> Option<&mut <C as KeyedCollection>::Value>
Gets mutable reference to an element of the collection.
Sourcepub fn insert(
&mut self,
key: <C as KeyedCollection>::Key,
value: <C as KeyedCollection>::Value,
) -> Result<Option<<C as KeyedCollection>::Value>, Error>
pub fn insert( &mut self, key: <C as KeyedCollection>::Key, value: <C as KeyedCollection>::Value, ) -> Result<Option<<C as KeyedCollection>::Value>, Error>
Inserts a new value into the confined collection under a given key. Fails if the collection already contains maximum number of elements allowed by the confinement.
Sourcepub fn pop(&mut self) -> Option<char>
pub fn pop(&mut self) -> Option<char>
Removes the last character from a string and returns it, or None
if
it is empty.
Sourcepub fn remove(&mut self, index: usize) -> Result<char, Error>
pub fn remove(&mut self, index: usize) -> Result<char, Error>
Removes a single character from the confined string, unless the string doesn’t shorten more than the confinement requirement. Errors otherwise.
Sourcepub fn pop(&mut self) -> Option<AsciiChar>
pub fn pop(&mut self) -> Option<AsciiChar>
Removes the last character from a string and returns it, or None
if
it is empty.
Sourcepub fn remove(&mut self, index: usize) -> Result<AsciiChar, Error>
pub fn remove(&mut self, index: usize) -> Result<AsciiChar, Error>
Removes a single character from the confined string, unless the string doesn’t shorten more than the confinement requirement. Errors otherwise.
Sourcepub fn pop(&mut self) -> Option<T>
pub fn pop(&mut self) -> Option<T>
Removes the last element from a vector and returns it, or None
if it
is empty.
Sourcepub fn remove(&mut self, index: usize) -> Result<T, Error>
pub fn remove(&mut self, index: usize) -> Result<T, Error>
Removes an element from the vector at a given index. Errors if the index exceeds the number of elements in the vector, of if the new vector length will be less than the confinement requirement. Returns the removed element otherwise.
Sourcepub fn iter(&self) -> Iter<'_, T>
pub fn iter(&self) -> Iter<'_, T>
Returns an iterator over the slice.
The iterator yields all items from start to end.
Sourcepub fn pop_front(&mut self) -> Option<T>
pub fn pop_front(&mut self) -> Option<T>
Removes the first element and returns it, or None
if the deque is
empty.
Sourcepub fn pop_back(&mut self) -> Option<T>
pub fn pop_back(&mut self) -> Option<T>
Removes the last element and returns it, or None
if the deque is
empty.
Sourcepub fn push_from(&mut self, elem: T) -> Result<(), Error>
pub fn push_from(&mut self, elem: T) -> Result<(), Error>
Prepends an element to the deque. Errors if the new collection length will not fit the confinement requirements.
Sourcepub fn push_back(&mut self, elem: T) -> Result<(), Error>
pub fn push_back(&mut self, elem: T) -> Result<(), Error>
Appends an element to the deque. Errors if the new collection length will not fit the confinement requirements.
Sourcepub fn remove(&mut self, index: usize) -> Result<T, Error>
pub fn remove(&mut self, index: usize) -> Result<T, Error>
Removes an element from the deque at a given index. Errors if the index exceeds the number of elements in the deque, of if the new deque length will be less than the confinement requirement. Returns the removed element otherwise.
Sourcepub fn remove(&mut self, elem: &T) -> Result<bool, Error>
Available on crate feature std
only.
pub fn remove(&mut self, elem: &T) -> Result<bool, Error>
std
only.Removes an element from the set. Errors if the index exceeds the number of elements in the set, of if the new collection length will be less than the confinement requirement. Returns if the element was present in the set.
Sourcepub fn take(&mut self, elem: &T) -> Result<Option<T>, Error>
Available on crate feature std
only.
pub fn take(&mut self, elem: &T) -> Result<Option<T>, Error>
std
only.Removes an element from the set. Errors if the index exceeds the number of elements in the set, of if the new collection length will be less than the confinement requirement. Returns the removed element otherwise.
Sourcepub fn remove(&mut self, elem: &T) -> Result<bool, Error>
pub fn remove(&mut self, elem: &T) -> Result<bool, Error>
Removes an element from the set. Errors if the index exceeds the number of elements in the set, of if the new collection length will be less than the confinement requirement. Returns if the element was present in the set.
Sourcepub fn take(&mut self, elem: &T) -> Result<Option<T>, Error>
pub fn take(&mut self, elem: &T) -> Result<Option<T>, Error>
Removes an element from the set. Errors if the index exceeds the number of elements in the set, of if the new collection length will be less than the confinement requirement. Returns the removed element otherwise.
Sourcepub fn remove(&mut self, key: &K) -> Result<Option<V>, Error>
Available on crate feature std
only.
pub fn remove(&mut self, key: &K) -> Result<Option<V>, Error>
std
only.Removes an element from the map. Errors if the index exceeds the number of elements in the map, of if the new collection length will be less than the confinement requirement. Returns the removed value otherwise.
Trait Implementations§
Source§impl AsMut<<TransitionBundle as Wrapper>::Inner> for TransitionBundle
impl AsMut<<TransitionBundle as Wrapper>::Inner> for TransitionBundle
Source§impl AsRef<Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>> for TransitionBundle
impl AsRef<Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>> for TransitionBundle
Source§impl Borrow<Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>> for TransitionBundle
impl Borrow<Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>> for TransitionBundle
Source§impl BorrowMut<<TransitionBundle as Wrapper>::Inner> for TransitionBundle
impl BorrowMut<<TransitionBundle as Wrapper>::Inner> for TransitionBundle
Source§fn borrow_mut(&mut self) -> &mut <TransitionBundle as Wrapper>::Inner
fn borrow_mut(&mut self) -> &mut <TransitionBundle as Wrapper>::Inner
Source§impl BundleExt for TransitionBundle
impl BundleExt for TransitionBundle
Source§fn reveal_seal(&mut self, seal: GraphSeal)
fn reveal_seal(&mut self, seal: GraphSeal)
Source§fn reveal_transition(
&mut self,
transition: &Transition,
) -> Result<bool, RevealError>
fn reveal_transition( &mut self, transition: &Transition, ) -> Result<bool, RevealError>
Source§impl Clone for TransitionBundle
impl Clone for TransitionBundle
Source§fn clone(&self) -> TransitionBundle
fn clone(&self) -> TransitionBundle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CommitStrategy for TransitionBundle
impl CommitStrategy for TransitionBundle
Source§type Strategy = ConcealStrict
type Strategy = ConcealStrict
Source§impl CommitmentId for TransitionBundle
impl CommitmentId for TransitionBundle
Source§impl Conceal for TransitionBundle
impl Conceal for TransitionBundle
Source§type Concealed = TransitionBundle
type Concealed = TransitionBundle
Source§impl Debug for TransitionBundle
impl Debug for TransitionBundle
Source§impl Deref for TransitionBundle
impl Deref for TransitionBundle
Source§impl DerefMut for TransitionBundle
impl DerefMut for TransitionBundle
Source§impl<'de> Deserialize<'de> for TransitionBundle
impl<'de> Deserialize<'de> for TransitionBundle
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransitionBundle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransitionBundle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>> for TransitionBundle
impl From<Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>> for TransitionBundle
Source§fn from(
v: Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>,
) -> TransitionBundle
fn from( v: Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>, ) -> TransitionBundle
Source§impl From<TransitionBundle> for Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
impl From<TransitionBundle> for Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
Source§fn from(
wrapped: TransitionBundle,
) -> Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
fn from( wrapped: TransitionBundle, ) -> Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
Source§impl MergeReveal for TransitionBundle
impl MergeReveal for TransitionBundle
fn merge_reveal(self, other: Self) -> Result<Self, MergeRevealError>
Source§impl PartialEq for TransitionBundle
impl PartialEq for TransitionBundle
Source§impl Serialize for TransitionBundle
impl Serialize for TransitionBundle
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl StrictDecode for TransitionBundle
impl StrictDecode for TransitionBundle
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<TransitionBundle, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl StrictDumb for TransitionBundle
impl StrictDumb for TransitionBundle
fn strict_dumb() -> TransitionBundle
Source§impl StrictEncode for TransitionBundle
impl StrictEncode for TransitionBundle
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
Source§impl StrictTuple for TransitionBundle
impl StrictTuple for TransitionBundle
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for TransitionBundle
impl StrictType for TransitionBundle
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB
fn strict_name() -> Option<TypeName>
Source§impl Wrapper for TransitionBundle
impl Wrapper for TransitionBundle
Source§type Inner = Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
type Inner = Confined<BTreeMap<OpId, BundleItem>, amplify::::collection::confinement::TinyOrdMap::{constant#0}, amplify::::collection::confinement::TinyOrdMap::{constant#1}>
Source§fn from_inner(inner: <TransitionBundle as Wrapper>::Inner) -> TransitionBundle
fn from_inner(inner: <TransitionBundle as Wrapper>::Inner) -> TransitionBundle
Source§fn as_inner(&self) -> &<TransitionBundle as Wrapper>::Inner
fn as_inner(&self) -> &<TransitionBundle as Wrapper>::Inner
Source§fn into_inner(self) -> <TransitionBundle as Wrapper>::Inner
fn into_inner(self) -> <TransitionBundle as Wrapper>::Inner
Source§impl WrapperMut for TransitionBundle
impl WrapperMut for TransitionBundle
Source§fn as_inner_mut(&mut self) -> &mut <TransitionBundle as Wrapper>::Inner
fn as_inner_mut(&mut self) -> &mut <TransitionBundle as Wrapper>::Inner
impl Eq for TransitionBundle
impl StrictProduct for TransitionBundle
impl StructuralPartialEq for TransitionBundle
Auto Trait Implementations§
impl Freeze for TransitionBundle
impl RefUnwindSafe for TransitionBundle
impl Send for TransitionBundle
impl Sync for TransitionBundle
impl Unpin for TransitionBundle
impl UnwindSafe for TransitionBundle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CommitEncode for T
impl<T> CommitEncode for T
Source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
io::Write
writer instanceSource§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
key
and return true
if they are equal.