#[non_exhaustive]pub struct SpaceInviteCreateInput<'a> {
pub client_id: Option<&'a str>,
pub space_id: &'a Id,
pub default_channel_id: Option<&'a Id>,
pub expires_at: Option<&'a UTCDate>,
pub max_uses: Option<u64>,
}Expand description
Parameters for creating one SpaceInvite via SpaceInvite/set.
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.client_id: Option<&'a str>Caller-supplied creation key. When None, a ULID is generated automatically.
space_id: &'a IdThe Space this invite grants access to.
default_channel_id: Option<&'a Id>Channel that joining members land in by default. None lets the server choose.
expires_at: Option<&'a UTCDate>Optional expiry time after which the invite is no longer redeemable.
max_uses: Option<u64>Maximum number of times the invite may be redeemed.
Implementations§
Source§impl<'a> SpaceInviteCreateInput<'a>
impl<'a> SpaceInviteCreateInput<'a>
Sourcepub fn new(space_id: &'a Id) -> Self
pub fn new(space_id: &'a Id) -> Self
Create a SpaceInviteCreateInput with required fields; optional fields default to None.
Sourcepub fn with_client_id(self, id: &'a str) -> Self
pub fn with_client_id(self, id: &'a str) -> Self
Set the caller-supplied creation key (overrides the auto-generated ULID).
Sourcepub fn with_max_uses(self, max: u64) -> Self
pub fn with_max_uses(self, max: u64) -> Self
Set the maximum number of times this invite may be used.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SpaceInviteCreateInput<'a>
impl<'a> RefUnwindSafe for SpaceInviteCreateInput<'a>
impl<'a> Send for SpaceInviteCreateInput<'a>
impl<'a> Sync for SpaceInviteCreateInput<'a>
impl<'a> Unpin for SpaceInviteCreateInput<'a>
impl<'a> UnsafeUnpin for SpaceInviteCreateInput<'a>
impl<'a> UnwindSafe for SpaceInviteCreateInput<'a>
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