#[repr(C)]pub struct CreateParams {Show 17 fields
pub start_time: u64,
pub net_amount_deposited: u64,
pub period: u64,
pub amount_per_period: u64,
pub cliff: u64,
pub cliff_amount: u64,
pub cancelable_by_sender: bool,
pub cancelable_by_recipient: bool,
pub automatic_withdrawal: bool,
pub transferable_by_sender: bool,
pub transferable_by_recipient: bool,
pub can_topup: bool,
pub stream_name: [u8; 64],
pub withdraw_frequency: u64,
pub ghost: u32,
pub pausable: bool,
pub can_update_rate: bool,
}Expand description
The struct containing parameters for initializing a stream
Fields§
§start_time: u64Timestamp when the tokens start vesting
net_amount_deposited: u64Deposited amount of tokens
period: u64Time step (period) in seconds per which the vesting/release occurs
amount_per_period: u64Amount released per period. Combined with period, we get a release rate.
cliff: u64Vesting contract “cliff” timestamp
cliff_amount: u64Amount unlocked at the “cliff” timestamp
cancelable_by_sender: boolWhether a stream can be canceled by a sender
cancelable_by_recipient: boolWhether a stream can be canceled by a recipient
automatic_withdrawal: boolWhether a 3rd party can initiate withdraw in the name of recipient
transferable_by_sender: boolWhether the sender can transfer the stream
transferable_by_recipient: boolWhether the recipient can transfer the stream
can_topup: boolWhether topup is enabled
stream_name: [u8; 64]The name of this stream
withdraw_frequency: u64Withdraw frequency
ghost: u32used as padding len in serialization in old streams, added for backwards compatibility
pausable: boolWhether the contract can be paused
can_update_rate: boolWhether the contract can update release amount
Trait Implementations§
Source§impl BorshDeserialize for CreateParamswhere
u64: BorshDeserialize,
bool: BorshDeserialize,
[u8; 64]: BorshDeserialize,
u32: BorshDeserialize,
impl BorshDeserialize for CreateParamswhere
u64: BorshDeserialize,
bool: BorshDeserialize,
[u8; 64]: BorshDeserialize,
u32: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for CreateParams
impl BorshSerialize for CreateParams
Source§impl Clone for CreateParams
impl Clone for CreateParams
Source§fn clone(&self) -> CreateParams
fn clone(&self) -> CreateParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CreateParams
impl RefUnwindSafe for CreateParams
impl Send for CreateParams
impl Sync for CreateParams
impl Unpin for CreateParams
impl UnwindSafe for CreateParams
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more