pub struct AccessRuleAddEditRequest {
pub name: String,
pub description: Option<String>,
pub enabled: bool,
pub conditions: Vec<AccessCondition>,
pub single_active_lease: bool,
pub default_lease_duration_seconds: Option<i32>,
pub max_lease_duration_seconds: Option<i32>,
pub allows_extensions: bool,
pub max_extension_duration_seconds: Option<i32>,
pub collections: Vec<CollectionId>,
}Expand description
Request to create or edit an access rule.
Fields§
§name: StringThe rule’s display name. Must be non-empty after trimming and at most 256 characters.
description: Option<String>Optional free-text describing the rule’s intent.
enabled: boolWhen false, the rule is inactive and does not gate access for the collections it governs.
conditions: Vec<AccessCondition>The conditions that decide how access is granted under this rule, at most 10.
single_active_lease: boolWhen true, a cipher may have at most one active lease at a time, across all users.
default_lease_duration_seconds: Option<i32>Default lease duration in seconds, used to pre-fill a request opened under this rule. None means the backend default applies.
max_lease_duration_seconds: Option<i32>Hard ceiling on the duration of any single lease granted under this rule, in seconds. None means no per-rule cap.
allows_extensions: boolWhen true, a member holding an active lease under this rule may extend it once. Requires
max_extension_duration_seconds to be a positive value.
max_extension_duration_seconds: Option<i32>The longest a single extension may run, in seconds. Required to be positive when
allows_extensions is true.
collections: Vec<CollectionId>The complete set of collections this rule governs. Writing it replaces the existing associations, so an empty list clears them.
Trait Implementations§
Source§impl Clone for AccessRuleAddEditRequest
impl Clone for AccessRuleAddEditRequest
Source§fn clone(&self) -> AccessRuleAddEditRequest
fn clone(&self) -> AccessRuleAddEditRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccessRuleAddEditRequest
impl Debug for AccessRuleAddEditRequest
Source§impl<'de> Deserialize<'de> for AccessRuleAddEditRequest
impl<'de> Deserialize<'de> for AccessRuleAddEditRequest
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>,
Source§impl From<AccessRuleAddEditRequest> for JsValuewhere
AccessRuleAddEditRequest: Serialize,
impl From<AccessRuleAddEditRequest> for JsValuewhere
AccessRuleAddEditRequest: Serialize,
Source§fn from(value: AccessRuleAddEditRequest) -> Self
fn from(value: AccessRuleAddEditRequest) -> Self
Source§impl From<AccessRuleView> for AccessRuleAddEditRequest
Rebuilds the write payload for a rule that already exists.
impl From<AccessRuleView> for AccessRuleAddEditRequest
Rebuilds the write payload for a rule that already exists.
The rule endpoints have no PATCH, so changing one field means PUTting the whole rule back.
Mapped field by field rather than via struct update syntax: the view carries server-owned
fields (id, organization_id, timestamps) not part of the request, so adding one can’t
silently compile without a human decision.
Source§fn from(view: AccessRuleView) -> Self
fn from(view: AccessRuleView) -> Self
Source§impl FromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
impl FromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
impl IntoWasmAbi for &AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
Source§impl IntoWasmAbi for AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
impl IntoWasmAbi for AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
Source§impl OptionFromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
impl OptionIntoWasmAbi for AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
Source§impl PartialEq for AccessRuleAddEditRequest
impl PartialEq for AccessRuleAddEditRequest
Source§impl RefFromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = SelfOwner<AccessRuleAddEditRequest>
type Anchor = SelfOwner<AccessRuleAddEditRequest>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for AccessRuleAddEditRequest
impl Serialize for AccessRuleAddEditRequest
impl StructuralPartialEq for AccessRuleAddEditRequest
Source§impl TryFrom<AccessRuleAddEditRequest> for AccessRuleRequestModel
impl TryFrom<AccessRuleAddEditRequest> for AccessRuleRequestModel
Source§type Error = AccessRuleError
type Error = AccessRuleError
Source§impl Tsify for AccessRuleAddEditRequest
impl Tsify for AccessRuleAddEditRequest
const DECL: &'static str = "/**\n * Request to create or edit an access rule.\n */\nexport interface AccessRuleAddEditRequest {\n /**\n * The rule\\\'s display name. Must be non-empty after trimming and at most 256 characters.\n */\n name: string;\n /**\n * Optional free-text describing the rule\\\'s intent.\n */\n description: string | undefined;\n /**\n * When false, the rule is inactive and does not gate access for the collections it governs.\n */\n enabled: boolean;\n /**\n * The conditions that decide how access is granted under this rule, at most 10.\n */\n conditions: AccessCondition[];\n /**\n * When true, a cipher may have at most one active lease at a time, across all users.\n */\n singleActiveLease: boolean;\n /**\n * Default lease duration in seconds, used to pre-fill a request opened under this rule. None\n * means the backend default applies.\n */\n defaultLeaseDurationSeconds: number | undefined;\n /**\n * Hard ceiling on the duration of any single lease granted under this rule, in seconds. None\n * means no per-rule cap.\n */\n maxLeaseDurationSeconds: number | undefined;\n /**\n * When true, a member holding an active lease under this rule may extend it once. Requires\n * `max_extension_duration_seconds` to be a positive value.\n */\n allowsExtensions: boolean;\n /**\n * The longest a single extension may run, in seconds. Required to be positive when\n * `allows_extensions` is true.\n */\n maxExtensionDurationSeconds: number | undefined;\n /**\n * The complete set of collections this rule governs. Writing it replaces the existing\n * associations, so an empty list clears them.\n */\n collections: CollectionId[];\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for AccessRuleAddEditRequestwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
impl VectorIntoWasmAbi for AccessRuleAddEditRequestwhere
AccessRuleAddEditRequest: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Auto Trait Implementations§
impl Freeze for AccessRuleAddEditRequest
impl RefUnwindSafe for AccessRuleAddEditRequest
impl Send for AccessRuleAddEditRequest
impl Sync for AccessRuleAddEditRequest
impl Unpin for AccessRuleAddEditRequest
impl UnsafeUnpin for AccessRuleAddEditRequest
impl UnwindSafe for AccessRuleAddEditRequest
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Persist for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.