pub struct TicketInvite(/* private fields */);Expand description
A shareable bearer invitation. Treat its encoded form as a secret.
Implementations§
Source§impl TicketInvite
impl TicketInvite
Sourcepub fn new(id: &str, ticket: &str, options: TicketMeshOptions) -> Result<Self>
pub fn new(id: &str, ticket: &str, options: TicketMeshOptions) -> Result<Self>
Construct an invitation from a freshly minted, expiring compound
endpoint ticket. The grant scope must be ticket:<id>.
Sourcepub fn direct(id: &str, ticket: &str, max_peers: u32) -> Result<Self>
pub fn direct(id: &str, ticket: &str, max_peers: u32) -> Result<Self>
A shareable invitation for a ticket that connects only to its issuer.
Sourcepub fn parse(value: &str) -> Result<Self>
pub fn parse(value: &str) -> Result<Self>
Parse and validate a transferable invitation before presenting its endpoint grant to the Rust admission owner.
pub fn id(&self) -> &str
pub fn endpoint_ticket(&self) -> &str
pub fn max_peers(&self) -> u32
pub fn issuer_node(&self) -> Result<String>
pub fn is_mesh(&self) -> bool
Sourcepub fn renewed(&self, candidate: &str) -> Result<Self>
pub fn renewed(&self, candidate: &str) -> Result<Self>
Accept a newer bearer only for this same issuer and ticket avenue. The protected roster transport authenticates who sent it; this check prevents that transport from silently changing the invitation owner.
pub fn expires_at_ms(&self) -> Result<u64>
pub fn encode(&self) -> String
Trait Implementations§
Source§impl Clone for TicketInvite
impl Clone for TicketInvite
Auto Trait Implementations§
impl Freeze for TicketInvite
impl RefUnwindSafe for TicketInvite
impl Send for TicketInvite
impl Sync for TicketInvite
impl Unpin for TicketInvite
impl UnsafeUnpin for TicketInvite
impl UnwindSafe for TicketInvite
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