Struct tea_sdk::tapp::ChannelItem
pub struct ChannelItem {
pub channel_id: H160,
pub tapp_key: String,
pub session_key: String,
pub tbu_1: Option<String>,
pub tbu_2: Option<String>,
pub tbu_3: Option<String>,
pub payer_address: H160,
pub payee_address: H160,
pub grace_period: Option<u64>,
pub fund_remaining: U256,
pub expire_time: Option<u128>,
pub status: ChannelItemStatus,
}
Fields§
§channel_id: H160
§tapp_key: String
§session_key: String
§tbu_1: Option<String>
§tbu_2: Option<String>
§tbu_3: Option<String>
§payer_address: H160
§payee_address: H160
§grace_period: Option<u64>
Use for payer early termination with unit of second
fund_remaining: U256
§expire_time: Option<u128>
§status: ChannelItemStatus
Implementations§
§impl ChannelItem
impl ChannelItem
pub fn is_expired(&self, now: u128) -> bool
pub fn grace_period(&self) -> u128
Trait Implementations§
§impl Clone for ChannelItem
impl Clone for ChannelItem
§fn clone(&self) -> ChannelItem
fn clone(&self) -> ChannelItem
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 more§impl Debug for ChannelItem
impl Debug for ChannelItem
§impl Default for ChannelItem
impl Default for ChannelItem
§fn default() -> ChannelItem
fn default() -> ChannelItem
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for ChannelItem
impl<'de> Deserialize<'de> for ChannelItem
§fn deserialize<__D>(
__deserializer: __D
) -> Result<ChannelItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ChannelItem, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for ChannelItem
impl Serialize for ChannelItem
§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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ChannelItem
impl Send for ChannelItem
impl Sync for ChannelItem
impl Unpin for ChannelItem
impl UnwindSafe for ChannelItem
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