pub struct AllocatingState {
pub op_id: u64,
pub index: u32,
pub remaining: u128,
pub plan: Vec<AllocationPlanEntry>,
}Expand description
Supplying idle underlying to targets according to a plan or queue.
§Transitions
- On completion of allocation:
Withdrawing(to satisfy pending user requests) orIdle(if stopped). - On stop/failure:
Idle.
Fields§
§op_id: u64§index: u32§remaining: u128§plan: Vec<AllocationPlanEntry>Implementations§
Trait Implementations§
Source§impl BorshDeserialize for AllocatingState
impl BorshDeserialize for AllocatingState
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSchema for AllocatingState
impl BorshSchema for AllocatingState
Source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
Source§fn add_definitions_recursively(
definitions: &mut BTreeMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut BTreeMap<Declaration, Definition>, )
Recursively, using DFS, add type definitions required for this type.
Type definition partially explains how to serialize/deserialize a type.
Source§impl BorshSerialize for AllocatingState
impl BorshSerialize for AllocatingState
Source§impl Clone for AllocatingState
impl Clone for AllocatingState
Source§fn clone(&self) -> AllocatingState
fn clone(&self) -> AllocatingState
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 Debug for AllocatingState
impl Debug for AllocatingState
Source§impl<'de> Deserialize<'de> for AllocatingState
impl<'de> Deserialize<'de> for AllocatingState
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 From<AllocatingState> for OpState
impl From<AllocatingState> for OpState
Source§fn from(value: AllocatingState) -> Self
fn from(value: AllocatingState) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AllocatingState
impl PartialEq for AllocatingState
Source§impl Serialize for AllocatingState
impl Serialize for AllocatingState
impl Eq for AllocatingState
impl StructuralPartialEq for AllocatingState
Auto Trait Implementations§
impl Freeze for AllocatingState
impl RefUnwindSafe for AllocatingState
impl Send for AllocatingState
impl Sync for AllocatingState
impl Unpin for AllocatingState
impl UnwindSafe for AllocatingState
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