#[non_exhaustive]pub struct ScopeStamp {
pub owner: Principal,
pub scope_ref: String,
pub scope_epoch: u64,
pub kind: ScopeKind,
pub parent: Option<ScopeParent>,
pub parent_state: Option<ParentState>,
pub attributes: ScopeAttributes,
pub owner_authorized: bool,
pub expires_at_ms: Option<u64>,
}Expand description
The fields the daemon stamps for a live scope.
Build with ScopeStamp::new and the setters so future fields are additive.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.owner: Principal§scope_ref: String§scope_epoch: u64§kind: ScopeKind§parent: Option<ScopeParent>§parent_state: Option<ParentState>§attributes: ScopeAttributesWhether the owner is listed in the daemon’s scope_authority_owners.
Providers decide on this flag and keep no copy of the list.
expires_at_ms: Option<u64>Absolute Unix wall-clock deadline in milliseconds, fixed for this epoch.
On route binds the daemon sends this deadline only to targets declaring
crate::call_mode::CALL_MODES_CAPABILITY, because older providers may
reject unfamiliar scope-stamp fields.
Implementations§
Source§impl ScopeStamp
impl ScopeStamp
Sourcepub fn new(
owner: Principal,
scope_ref: impl Into<String>,
scope_epoch: u64,
kind: ScopeKind,
) -> Self
pub fn new( owner: Principal, scope_ref: impl Into<String>, scope_epoch: u64, kind: ScopeKind, ) -> Self
A stamp with no parent, attributes or deadline, and no owner authority.
pub fn with_parent(self, parent: Option<ScopeParent>) -> Self
pub fn with_parent_state(self, parent_state: Option<ParentState>) -> Self
pub fn with_attributes(self, attributes: ScopeAttributes) -> Self
pub fn with_expires_at_ms(self, expires_at_ms: Option<u64>) -> Self
Trait Implementations§
Source§impl Clone for ScopeStamp
impl Clone for ScopeStamp
Source§impl Debug for ScopeStamp
impl Debug for ScopeStamp
Source§impl<'de> Deserialize<'de> for ScopeStamp
impl<'de> Deserialize<'de> for ScopeStamp
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
impl Eq for ScopeStamp
Source§impl PartialEq for ScopeStamp
impl PartialEq for ScopeStamp
Source§impl Serialize for ScopeStamp
impl Serialize for ScopeStamp
impl StructuralPartialEq for ScopeStamp
Auto Trait Implementations§
impl Freeze for ScopeStamp
impl RefUnwindSafe for ScopeStamp
impl Send for ScopeStamp
impl Sync for ScopeStamp
impl Unpin for ScopeStamp
impl UnsafeUnpin for ScopeStamp
impl UnwindSafe for ScopeStamp
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