#[non_exhaustive]pub struct ScopeSelector {
pub owner: Principal,
pub scope_ref: String,
pub scope_epoch: Option<u64>,
pub bind_proof: Option<String>,
pub hold_presence: bool,
}Expand description
The scope a route is opened under, re-exported so a caller of
SubcConsumer::open_route_scoped can name the type from this crate.
The scope a route.open asks to be admitted under.
scope_epoch is optional on the wire only so that leaving it out is
refused by name (scope_epoch_required) rather than as a malformed body:
every opener must name it, the owner included.
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: Option<u64>§bind_proof: Option<String>Base64url-encoded 32-byte secret, without padding. Ignored for records without a bind-proof hash, so holders may always send their proof.
hold_presence: boolKeep connection-held presence after an admitted open, even if its route
closes. Send only to daemons advertising scope-replace-if-idle/v1.
Implementations§
Source§impl ScopeSelector
impl ScopeSelector
pub fn new( owner: Principal, scope_ref: impl Into<String>, scope_epoch: Option<u64>, ) -> ScopeSelector
pub fn with_bind_proof(self, proof: Option<String>) -> ScopeSelector
pub fn with_hold_presence(self, hold_presence: bool) -> ScopeSelector
Trait Implementations§
Source§impl Clone for ScopeSelector
impl Clone for ScopeSelector
Source§fn clone(&self) -> ScopeSelector
fn clone(&self) -> ScopeSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScopeSelector
impl Debug for ScopeSelector
Source§impl<'de> Deserialize<'de> for ScopeSelector
impl<'de> Deserialize<'de> for ScopeSelector
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScopeSelector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScopeSelector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ScopeSelector
impl Display for ScopeSelector
impl Eq for ScopeSelector
Source§impl PartialEq for ScopeSelector
impl PartialEq for ScopeSelector
Source§impl Serialize for ScopeSelector
impl Serialize for ScopeSelector
Source§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
impl StructuralPartialEq for ScopeSelector
Auto Trait Implementations§
impl Forget for ScopeSelector
impl Freeze for ScopeSelector
impl Move for ScopeSelector
impl RefUnwindSafe for ScopeSelector
impl Send for ScopeSelector
impl Sync for ScopeSelector
impl Unpin for ScopeSelector
impl UnsafeUnpin for ScopeSelector
impl UnwindSafe for ScopeSelector
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