#[non_exhaustive]pub struct ScopeRecord {
pub scope_ref: String,
pub scope_epoch: u64,
pub kind: ScopeKind,
pub expires_at_ms: Option<u64>,
pub parent: Option<ScopeParent>,
pub child_owners: Vec<Principal>,
pub carriers: Vec<ScopeCarrier>,
pub attributes: ScopeAttributes,
}Expand description
One scope as its owner registers it in scope.sync or scope.apply.
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.scope_ref: String§scope_epoch: u64Owner-supplied session number. The owner keeps it with its own record of the session, re-sends the same value for the same session after any restart, and uses a higher one when it reuses the ref for a new session.
kind: ScopeKind§expires_at_ms: Option<u64>Absolute Unix wall-clock deadline in milliseconds. It cannot be added, changed or removed within this scope epoch; absent means no deadline. This is not an authority attribute.
parent: Option<ScopeParent>§child_owners: Vec<Principal>Principals, other than the owner, allowed to register child scopes under this one. Listing a principal here grants it nothing else.
carriers: Vec<ScopeCarrier>§attributes: ScopeAttributesImplementations§
Source§impl ScopeRecord
impl ScopeRecord
pub fn new( scope_ref: impl Into<String>, scope_epoch: u64, kind: ScopeKind, ) -> Self
pub fn with_expires_at_ms(self, expires_at_ms: Option<u64>) -> Self
pub fn with_parent(self, parent: Option<ScopeParent>) -> Self
pub fn with_child_owners(self, child_owners: Vec<Principal>) -> Self
pub fn with_carriers(self, carriers: Vec<ScopeCarrier>) -> Self
pub fn with_attributes(self, attributes: ScopeAttributes) -> Self
Trait Implementations§
Source§impl Clone for ScopeRecord
impl Clone for ScopeRecord
Source§impl Debug for ScopeRecord
impl Debug for ScopeRecord
Source§impl<'de> Deserialize<'de> for ScopeRecord
impl<'de> Deserialize<'de> for ScopeRecord
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 ScopeRecord
Source§impl PartialEq for ScopeRecord
impl PartialEq for ScopeRecord
Source§impl Serialize for ScopeRecord
impl Serialize for ScopeRecord
impl StructuralPartialEq for ScopeRecord
Auto Trait Implementations§
impl Freeze for ScopeRecord
impl RefUnwindSafe for ScopeRecord
impl Send for ScopeRecord
impl Sync for ScopeRecord
impl Unpin for ScopeRecord
impl UnsafeUnpin for ScopeRecord
impl UnwindSafe for ScopeRecord
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