From a5b6db427ecae9cb78a3736db7bfd96e924e9e25 Mon Sep 17 00:00:00 2001 From: hsluoyz Date: Thu, 16 Nov 2023 16:06:43 +0000 Subject: [PATCH] deploy: 49f090e07dcd5afa1c48a34f4b962efe7d2ac9b6 --- casbin/all.html | 2 +- casbin/enforcer/struct.EnforceContext.html | 11 + casbin/enum.EffectKind.html | 36 +- casbin/enum.Event.html | 46 +- casbin/enum.EventData.html | 38 +- casbin/error/enum.Error.html | 30 +- casbin/error/enum.ModelError.html | 36 +- casbin/error/enum.PolicyError.html | 28 +- casbin/error/enum.RbacError.html | 28 +- casbin/error/enum.RequestError.html | 28 +- casbin/error/index.html | 2 +- casbin/error/struct.AdapterError.html | 26 +- casbin/function_map/fn.key_match.html | 2 +- casbin/function_map/fn.key_match2.html | 2 +- casbin/function_map/fn.key_match3.html | 2 +- casbin/function_map/fn.regex_match.html | 2 +- casbin/function_map/index.html | 2 +- casbin/function_map/struct.FunctionMap.html | 28 +- casbin/index.html | 2 +- casbin/macro.get_or_err.html | 2 +- casbin/macro.get_or_err_with_context!.html | 11 + casbin/macro.get_or_err_with_context.html | 3 + casbin/macro.push_index_if_explain.html | 2 +- casbin/macro.register_g_function.html | 2 +- casbin/prelude/index.html | 2 +- casbin/rhai/attr.export_fn.html | 2 +- casbin/rhai/attr.export_module.html | 2 +- .../config/hashing/fn.get_ahash_seed.html | 2 +- .../config/hashing/fn.set_ahash_seed.html | 6 +- casbin/rhai/config/hashing/index.html | 6 +- casbin/rhai/config/hashing/sidebar-items.js | 2 +- .../rhai/config/hashing/struct.OnceCell.html | 191 + casbin/rhai/config/index.html | 2 +- casbin/rhai/constant.OP_CONTAINS.html | 2 +- casbin/rhai/constant.OP_EQUALS.html | 2 +- casbin/rhai/enum.EvalAltResult.html | 137 +- casbin/rhai/enum.FnAccess.html | 78 +- casbin/rhai/enum.FnNamespace.html | 70 +- casbin/rhai/enum.LexError.html | 82 +- casbin/rhai/enum.ParseErrorType.html | 154 +- casbin/rhai/fn.eval.html | 4 +- casbin/rhai/fn.eval_file.html | 8 +- casbin/rhai/fn.format_map_as_json.html | 6 +- casbin/rhai/fn.run.html | 2 +- casbin/rhai/fn.run_file.html | 6 +- casbin/rhai/index.html | 8 +- .../macro.combine_with_exported_module.html | 2 +- casbin/rhai/macro.def_package.html | 2 +- casbin/rhai/macro.exported_module.html | 2 +- casbin/rhai/macro.register_exported_fn.html | 2 +- casbin/rhai/macro.set_exported_fn.html | 2 +- casbin/rhai/macro.set_exported_global_fn.html | 2 +- casbin/rhai/packages/index.html | 2 +- .../packages/struct.ArithmeticPackage.html | 24 +- .../packages/struct.BasicArrayPackage.html | 24 +- .../packages/struct.BasicBlobPackage.html | 24 +- .../rhai/packages/struct.BasicFnPackage.html | 24 +- .../packages/struct.BasicIteratorPackage.html | 24 +- .../rhai/packages/struct.BasicMapPackage.html | 24 +- .../packages/struct.BasicMathPackage.html | 24 +- .../packages/struct.BasicStringPackage.html | 24 +- .../packages/struct.BasicTimePackage.html | 24 +- .../rhai/packages/struct.BitFieldPackage.html | 24 +- casbin/rhai/packages/struct.CorePackage.html | 24 +- .../packages/struct.LanguageCorePackage.html | 24 +- casbin/rhai/packages/struct.LogicPackage.html | 24 +- .../packages/struct.MoreStringPackage.html | 24 +- .../rhai/packages/struct.StandardPackage.html | 24 +- casbin/rhai/packages/trait.Package.html | 10 +- casbin/rhai/plugin/attr.export_fn.html | 2 +- casbin/rhai/plugin/attr.export_module.html | 2 +- casbin/rhai/plugin/enum.CallableFunction.html | 84 +- casbin/rhai/plugin/enum.EvalAltResult.html | 137 +- casbin/rhai/plugin/enum.FnAccess.html | 78 +- casbin/rhai/plugin/enum.FnNamespace.html | 70 +- casbin/rhai/plugin/index.html | 4 +- .../macro.combine_with_exported_module.html | 2 +- casbin/rhai/plugin/macro.exported_module.html | 2 +- .../plugin/macro.register_exported_fn.html | 2 +- casbin/rhai/plugin/macro.set_exported_fn.html | 2 +- .../plugin/macro.set_exported_global_fn.html | 2 +- casbin/rhai/plugin/mem/fn.align_of.html | 2 +- casbin/rhai/plugin/mem/fn.align_of_val.html | 4 +- .../rhai/plugin/mem/fn.align_of_val_raw.html | 6 +- casbin/rhai/plugin/mem/fn.copy.html | 4 +- casbin/rhai/plugin/mem/fn.discriminant.html | 6 +- casbin/rhai/plugin/mem/fn.drop.html | 10 +- casbin/rhai/plugin/mem/fn.forget.html | 2 +- casbin/rhai/plugin/mem/fn.forget_unsized.html | 4 +- casbin/rhai/plugin/mem/fn.min_align_of.html | 2 +- .../rhai/plugin/mem/fn.min_align_of_val.html | 4 +- casbin/rhai/plugin/mem/fn.needs_drop.html | 10 +- casbin/rhai/plugin/mem/fn.replace.html | 4 +- casbin/rhai/plugin/mem/fn.size_of.html | 4 +- casbin/rhai/plugin/mem/fn.size_of_val.html | 6 +- .../rhai/plugin/mem/fn.size_of_val_raw.html | 8 +- casbin/rhai/plugin/mem/fn.swap.html | 2 +- casbin/rhai/plugin/mem/fn.take.html | 6 +- casbin/rhai/plugin/mem/fn.transmute.html | 9 +- casbin/rhai/plugin/mem/fn.transmute_copy.html | 2 +- casbin/rhai/plugin/mem/fn.uninitialized.html | 2 +- casbin/rhai/plugin/mem/fn.variant_count.html | 2 +- casbin/rhai/plugin/mem/fn.zeroed.html | 2 +- casbin/rhai/plugin/mem/index.html | 2 +- casbin/rhai/plugin/mem/macro.offset_of.html | 2 +- casbin/rhai/plugin/mem/struct.Assume.html | 66 +- .../rhai/plugin/mem/struct.Discriminant.html | 54 +- .../rhai/plugin/mem/struct.ManuallyDrop.html | 112 +- .../mem/trait.BikeshedIntrinsicFrom.html | 4 +- casbin/rhai/plugin/mem/union.MaybeUninit.html | 123 +- casbin/rhai/plugin/struct.Dynamic.html | 214 +- casbin/rhai/plugin/struct.Engine.html | 495 +- .../rhai/plugin/struct.ImmutableString.html | 557 +-- casbin/rhai/plugin/struct.Module.html | 275 +- .../rhai/plugin/struct.NativeCallContext.html | 79 +- casbin/rhai/plugin/struct.Position.html | 95 +- casbin/rhai/plugin/struct.TypeId.html | 70 +- casbin/rhai/plugin/trait.PluginFunction.html | 22 +- casbin/rhai/plugin/type.RhaiResult.html | 9 +- casbin/rhai/serde/fn.from_dynamic.html | 6 +- casbin/rhai/serde/fn.to_dynamic.html | 4 +- casbin/rhai/serde/index.html | 4 +- .../serde/struct.DynamicDeserializer.html | 194 +- .../rhai/serde/struct.DynamicSerializer.html | 292 +- casbin/rhai/sidebar-items.js | 2 +- casbin/rhai/struct.AST.html | 38 +- casbin/rhai/struct.Dynamic.html | 214 +- casbin/rhai/struct.Engine.html | 495 +- casbin/rhai/struct.EvalContext.html | 48 +- casbin/rhai/struct.Expression.html | 43 +- casbin/rhai/struct.FnPtr.html | 83 +- casbin/rhai/struct.ImmutableString.html | 557 +-- casbin/rhai/struct.Instant.html | 92 +- casbin/rhai/struct.Locked.html | 102 +- casbin/rhai/struct.Module.html | 275 +- casbin/rhai/struct.NativeCallContext.html | 79 +- casbin/rhai/struct.ParseError.html | 56 +- casbin/rhai/struct.Position.html | 95 +- casbin/rhai/struct.Scope.html | 157 +- casbin/rhai/struct.Shared.html | 721 ++- casbin/rhai/struct.TypeBuilder.html | 145 +- casbin/rhai/struct.VarDefInfo.html | 63 +- casbin/rhai/trait.CustomType.html | 20 +- casbin/rhai/trait.FuncArgs.html | 482 +- casbin/rhai/trait.RegisterNativeFunction.html | 4034 ++++++++--------- casbin/rhai/type.Array.html | 1065 ++++- casbin/rhai/type.Blob.html | 1065 ++++- casbin/rhai/type.INT.html | 4 +- casbin/rhai/type.Map.html | 4 +- casbin/sidebar-items.js | 2 +- casbin/struct.Assertion.html | 36 +- casbin/struct.DefaultEffectStream.html | 22 +- casbin/struct.DefaultEffector.html | 20 +- casbin/struct.DefaultModel.html | 74 +- casbin/struct.DefaultRoleManager.html | 34 +- casbin/struct.EnforceContext.html | 16 + casbin/struct.Enforcer.html | 523 ++- casbin/struct.FileAdapter.html | 106 +- casbin/struct.Filter.html | 28 +- casbin/struct.MemoryAdapter.html | 92 +- casbin/struct.NullAdapter.html | 92 +- casbin/trait.Adapter.html | 126 +- casbin/trait.CoreApi.html | 125 +- casbin/trait.Effector.html | 6 +- casbin/trait.EffectorStream.html | 8 +- casbin/trait.EnforceArgs.html | 8 +- casbin/trait.EventEmitter.html | 10 +- casbin/trait.EventKey.html | 4 +- casbin/trait.IEnforcer.html | 2 +- casbin/trait.InternalApi.html | 98 +- casbin/trait.MgmtApi.html | 396 +- casbin/trait.Model.html | 120 +- casbin/trait.RbacApi.html | 248 +- casbin/trait.RoleManager.html | 38 +- casbin/trait.TryIntoAdapter.html | 24 +- casbin/trait.TryIntoModel.html | 20 +- casbin/type.MatchingFn.html | 2 +- casbin/type.Result.html | 7 +- help.html | 2 +- implementors/core/clone/trait.Clone.js | 2 +- implementors/core/cmp/trait.Eq.js | 2 +- implementors/core/cmp/trait.PartialEq.js | 2 +- implementors/core/convert/trait.From.js | 2 +- implementors/core/default/trait.Default.js | 2 +- implementors/core/error/trait.Error.js | 2 +- implementors/core/fmt/trait.Debug.js | 2 +- implementors/core/fmt/trait.Display.js | 2 +- implementors/core/hash/trait.Hash.js | 2 +- implementors/core/marker/trait.Copy.js | 2 +- implementors/core/marker/trait.Freeze.js | 2 +- implementors/core/marker/trait.Send.js | 2 +- .../core/marker/trait.StructuralEq.js | 2 +- .../core/marker/trait.StructuralPartialEq.js | 2 +- implementors/core/marker/trait.Sync.js | 2 +- implementors/core/marker/trait.Unpin.js | 2 +- .../panic/unwind_safe/trait.RefUnwindSafe.js | 2 +- .../panic/unwind_safe/trait.UnwindSafe.js | 2 +- search-index.js | 2 +- settings.html | 2 +- src-files.js | 4 + src/casbin/adapter/file_adapter.rs.html | 2 +- src/casbin/adapter/memory_adapter.rs.html | 2 +- src/casbin/adapter/mod.rs.html | 2 +- src/casbin/adapter/null_adapter.rs.html | 2 +- src/casbin/config.rs.html | 6 +- src/casbin/convert.rs.html | 2 +- src/casbin/core_api.rs.html | 22 +- src/casbin/effector.rs.html | 2 +- src/casbin/emitter.rs.html | 2 +- src/casbin/enforcer.rs.html | 452 +- src/casbin/error.rs.html | 2 +- src/casbin/internal_api.rs.html | 2 +- src/casbin/lib.rs.html | 4 +- src/casbin/macros.rs.html | 48 +- src/casbin/management_api.rs.html | 2 +- src/casbin/model/assertion.rs.html | 2 +- src/casbin/model/default_model.rs.html | 2 +- src/casbin/model/function_map.rs.html | 2 +- src/casbin/model/mod.rs.html | 2 +- src/casbin/prelude.rs.html | 2 +- src/casbin/rbac/default_role_manager.rs.html | 12 +- src/casbin/rbac/mod.rs.html | 2 +- src/casbin/rbac/role_manager.rs.html | 2 +- src/casbin/rbac_api.rs.html | 2 +- src/casbin/util.rs.html | 2 +- static.files/main-c5bd66d33317d69f.js | 12 + static.files/noscript-5d8b3c7633ad77ba.css | 1 + static.files/rustdoc-fa3bb1812debf86c.css | 10 + static.files/search-8be46b629f5f14a8.js | 5 + static.files/settings-74424d7eec62a23e.js | 17 + static.files/src-script-3280b574d94e47b4.js | 1 + static.files/storage-fec3eaa3851e447d.js | 1 + 232 files changed, 10438 insertions(+), 7159 deletions(-) create mode 100644 casbin/enforcer/struct.EnforceContext.html create mode 100644 casbin/macro.get_or_err_with_context!.html create mode 100644 casbin/macro.get_or_err_with_context.html create mode 100644 casbin/rhai/config/hashing/struct.OnceCell.html create mode 100644 casbin/struct.EnforceContext.html create mode 100644 src-files.js create mode 100644 static.files/main-c5bd66d33317d69f.js create mode 100644 static.files/noscript-5d8b3c7633ad77ba.css create mode 100644 static.files/rustdoc-fa3bb1812debf86c.css create mode 100644 static.files/search-8be46b629f5f14a8.js create mode 100644 static.files/settings-74424d7eec62a23e.js create mode 100644 static.files/src-script-3280b574d94e47b4.js create mode 100644 static.files/storage-fec3eaa3851e447d.js diff --git a/casbin/all.html b/casbin/all.html index ffbfeb4f..2af95999 100644 --- a/casbin/all.html +++ b/casbin/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Unions

Traits

Macros

Attribute Macros

Functions

Type Definitions

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Unions

Traits

Macros

Attribute Macros

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/casbin/enforcer/struct.EnforceContext.html b/casbin/enforcer/struct.EnforceContext.html new file mode 100644 index 00000000..6e6b2ca8 --- /dev/null +++ b/casbin/enforcer/struct.EnforceContext.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../casbin/struct.EnforceContext.html...

+ + + \ No newline at end of file diff --git a/casbin/enum.EffectKind.html b/casbin/enum.EffectKind.html index 50a5e86d..d70aaccb 100644 --- a/casbin/enum.EffectKind.html +++ b/casbin/enum.EffectKind.html @@ -1,22 +1,22 @@ -EffectKind in casbin - Rust

Enum casbin::EffectKind

source ·
pub enum EffectKind {
+EffectKind in casbin - Rust

Enum casbin::EffectKind

source ·
pub enum EffectKind {
     Allow,
     Indeterminate,
     Deny,
-}

Variants§

§

Allow

§

Indeterminate

§

Deny

Trait Implementations§

source§

impl Clone for EffectKind

source§

fn clone(&self) -> EffectKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl PartialEq<EffectKind> for EffectKind

source§

fn eq(&self, other: &EffectKind) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for EffectKind

source§

impl Eq for EffectKind

source§

impl StructuralEq for EffectKind

source§

impl StructuralPartialEq for EffectKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Variants§

§

Allow

§

Indeterminate

§

Deny

Trait Implementations§

source§

impl Clone for EffectKind

source§

fn clone(&self) -> EffectKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl PartialEq<EffectKind> for EffectKind

source§

fn eq(&self, other: &EffectKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for EffectKind

source§

impl Eq for EffectKind

source§

impl StructuralEq for EffectKind

source§

impl StructuralPartialEq for EffectKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/enum.Event.html b/casbin/enum.Event.html index 63d84fe9..ed6d26d0 100644 --- a/casbin/enum.Event.html +++ b/casbin/enum.Event.html @@ -1,26 +1,26 @@ -Event in casbin - Rust

Enum casbin::Event

source ·
pub enum Event {
+Event in casbin - Rust

Enum casbin::Event

source ·
pub enum Event {
     PolicyChange,
     ClearCache,
-}

Variants§

§

PolicyChange

§

ClearCache

Trait Implementations§

source§

impl EventEmitter<Event> for Enforcer

source§

fn on(&mut self, e: Event, f: fn(_: &mut Self, _: EventData))

source§

fn off(&mut self, e: Event)

source§

fn emit(&mut self, e: Event, d: EventData)

source§

impl Hash for Event

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Event> for Event

source§

fn eq(&self, other: &Event) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Eq for Event

source§

impl StructuralEq for Event

source§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Variants§

§

PolicyChange

§

ClearCache

Trait Implementations§

source§

impl EventEmitter<Event> for Enforcer

source§

fn on(&mut self, e: Event, f: fn(_: &mut Self, _: EventData))

source§

fn off(&mut self, e: Event)

source§

fn emit(&mut self, e: Event, d: EventData)

source§

impl Hash for Event

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Event> for Event

source§

fn eq(&self, other: &Event) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Event

source§

impl StructuralEq for Event

source§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

\ No newline at end of file diff --git a/casbin/enum.EventData.html b/casbin/enum.EventData.html index 66f45187..7109ff8c 100644 --- a/casbin/enum.EventData.html +++ b/casbin/enum.EventData.html @@ -1,22 +1,22 @@ -EventData in casbin - Rust

Enum casbin::EventData

source ·
pub enum EventData {
-    AddPolicy(String, String, Vec<String>),
-    AddPolicies(String, String, Vec<Vec<String>>),
-    RemovePolicy(String, String, Vec<String>),
-    RemovePolicies(String, String, Vec<Vec<String>>),
-    RemoveFilteredPolicy(String, String, Vec<Vec<String>>),
-    SavePolicy(Vec<Vec<String>>),
+EventData in casbin - Rust

Enum casbin::EventData

source ·
pub enum EventData {
+    AddPolicy(String, String, Vec<String>),
+    AddPolicies(String, String, Vec<Vec<String>>),
+    RemovePolicy(String, String, Vec<String>),
+    RemovePolicies(String, String, Vec<Vec<String>>),
+    RemoveFilteredPolicy(String, String, Vec<Vec<String>>),
+    SavePolicy(Vec<Vec<String>>),
     ClearPolicy,
     ClearCache,
-}

Variants§

§

AddPolicy(String, String, Vec<String>)

§

AddPolicies(String, String, Vec<Vec<String>>)

§

RemovePolicy(String, String, Vec<String>)

§

RemovePolicies(String, String, Vec<Vec<String>>)

§

RemoveFilteredPolicy(String, String, Vec<Vec<String>>)

§

SavePolicy(Vec<Vec<String>>)

§

ClearPolicy

§

ClearCache

Trait Implementations§

source§

impl Clone for EventData

source§

fn clone(&self) -> EventData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Display for EventData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+}

Variants§

§

AddPolicy(String, String, Vec<String>)

§

AddPolicies(String, String, Vec<Vec<String>>)

§

RemovePolicy(String, String, Vec<String>)

§

RemovePolicies(String, String, Vec<Vec<String>>)

§

RemoveFilteredPolicy(String, String, Vec<Vec<String>>)

§

SavePolicy(Vec<Vec<String>>)

§

ClearPolicy

§

ClearCache

Trait Implementations§

source§

impl Clone for EventData

source§

fn clone(&self) -> EventData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Display for EventData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/error/enum.Error.html b/casbin/error/enum.Error.html index 236c9bcf..aaf39013 100644 --- a/casbin/error/enum.Error.html +++ b/casbin/error/enum.Error.html @@ -1,24 +1,22 @@ -Error in casbin::error - Rust

Enum casbin::error::Error

source ·
pub enum Error {
-    IoError(IoError),
+Error in casbin::error - Rust

Enum casbin::error::Error

source ·
pub enum Error {
+    IoError(Error),
     ModelError(ModelError),
     PolicyError(PolicyError),
     RbacError(RbacError),
-    RhaiError(Box<EvalAltResult>),
+    RhaiError(Box<EvalAltResult>),
     RhaiParseError(ParseError),
     RequestError(RequestError),
     AdapterError(AdapterError),
 }
Expand description

General casbin error

-

Variants§

§

IoError(IoError)

§

ModelError(ModelError)

§

PolicyError(PolicyError)

§

RbacError(RbacError)

§

RhaiError(Box<EvalAltResult>)

§

RhaiParseError(ParseError)

§

RequestError(RequestError)

§

AdapterError(AdapterError)

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AdapterError> for Error

source§

fn from(source: AdapterError) -> Self

Converts to this type from the input type.
source§

impl From<Box<EvalAltResult, Global>> for Error

source§

fn from(source: Box<EvalAltResult>) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: IoError) -> Self

Converts to this type from the input type.
source§

impl From<ModelError> for Error

source§

fn from(source: ModelError) -> Self

Converts to this type from the input type.
source§

impl From<ParseError> for Error

source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
source§

impl From<PolicyError> for Error

source§

fn from(source: PolicyError) -> Self

Converts to this type from the input type.
source§

impl From<RbacError> for Error

source§

fn from(source: RbacError) -> Self

Converts to this type from the input type.
source§

impl From<RequestError> for Error

source§

fn from(source: RequestError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

IoError(Error)

§

ModelError(ModelError)

§

PolicyError(PolicyError)

§

RbacError(RbacError)

§

RhaiError(Box<EvalAltResult>)

§

RhaiParseError(ParseError)

§

RequestError(RequestError)

§

AdapterError(AdapterError)

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AdapterError> for Error

source§

fn from(source: AdapterError) -> Self

Converts to this type from the input type.
source§

impl From<Box<EvalAltResult, Global>> for Error

source§

fn from(source: Box<EvalAltResult>) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: IoError) -> Self

Converts to this type from the input type.
source§

impl From<ModelError> for Error

source§

fn from(source: ModelError) -> Self

Converts to this type from the input type.
source§

impl From<ParseError> for Error

source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
source§

impl From<PolicyError> for Error

source§

fn from(source: PolicyError) -> Self

Converts to this type from the input type.
source§

impl From<RbacError> for Error

source§

fn from(source: RbacError) -> Self

Converts to this type from the input type.
source§

impl From<RequestError> for Error

source§

fn from(source: RequestError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/error/enum.ModelError.html b/casbin/error/enum.ModelError.html index b09f321e..595d786d 100644 --- a/casbin/error/enum.ModelError.html +++ b/casbin/error/enum.ModelError.html @@ -1,21 +1,19 @@ -ModelError in casbin::error - Rust

Enum casbin::error::ModelError

source ·
pub enum ModelError {
-    R(String),
-    P(String),
-    E(String),
-    M(String),
-    Other(String),
+ModelError in casbin::error - Rust

Enum casbin::error::ModelError

source ·
pub enum ModelError {
+    R(String),
+    P(String),
+    E(String),
+    M(String),
+    Other(String),
 }
Expand description

ModelError represents any type of errors in model configuration

-

Variants§

Trait Implementations§

source§

impl Debug for ModelError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ModelError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ModelError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ModelError> for Error

source§

fn from(source: ModelError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

Trait Implementations§

source§

impl Debug for ModelError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ModelError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ModelError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ModelError> for Error

source§

fn from(source: ModelError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/error/enum.PolicyError.html b/casbin/error/enum.PolicyError.html index 1ae4d473..8456fe6e 100644 --- a/casbin/error/enum.PolicyError.html +++ b/casbin/error/enum.PolicyError.html @@ -1,17 +1,15 @@ -PolicyError in casbin::error - Rust
pub enum PolicyError {
-    UnmatchPolicyDefinition(usize, usize),
+PolicyError in casbin::error - Rust
pub enum PolicyError {
+    UnmatchPolicyDefinition(usize, usize),
 }
Expand description

PolicyError represents any type of errors in policy

-

Variants§

§

UnmatchPolicyDefinition(usize, usize)

Trait Implementations§

source§

impl Debug for PolicyError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for PolicyError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for PolicyError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<PolicyError> for Error

source§

fn from(source: PolicyError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

UnmatchPolicyDefinition(usize, usize)

Trait Implementations§

source§

impl Debug for PolicyError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for PolicyError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for PolicyError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<PolicyError> for Error

source§

fn from(source: PolicyError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/error/enum.RbacError.html b/casbin/error/enum.RbacError.html index 4921b26f..1b99f6a7 100644 --- a/casbin/error/enum.RbacError.html +++ b/casbin/error/enum.RbacError.html @@ -1,17 +1,15 @@ -RbacError in casbin::error - Rust

Enum casbin::error::RbacError

source ·
pub enum RbacError {
-    NotFound(String),
+RbacError in casbin::error - Rust

Enum casbin::error::RbacError

source ·
pub enum RbacError {
+    NotFound(String),
 }
Expand description

RBAC error represents any type of errors in RBAC role manager

-

Variants§

§

NotFound(String)

Trait Implementations§

source§

impl Debug for RbacError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for RbacError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for RbacError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<RbacError> for Error

source§

fn from(source: RbacError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

NotFound(String)

Trait Implementations§

source§

impl Debug for RbacError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for RbacError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for RbacError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<RbacError> for Error

source§

fn from(source: RbacError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/error/enum.RequestError.html b/casbin/error/enum.RequestError.html index 4903b27c..c58d5445 100644 --- a/casbin/error/enum.RequestError.html +++ b/casbin/error/enum.RequestError.html @@ -1,17 +1,15 @@ -RequestError in casbin::error - Rust
pub enum RequestError {
-    UnmatchRequestDefinition(usize, usize),
+RequestError in casbin::error - Rust
pub enum RequestError {
+    UnmatchRequestDefinition(usize, usize),
 }
Expand description

RequestError represents any type of errors in coming request

-

Variants§

§

UnmatchRequestDefinition(usize, usize)

Trait Implementations§

source§

impl Debug for RequestError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for RequestError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for RequestError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<RequestError> for Error

source§

fn from(source: RequestError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

UnmatchRequestDefinition(usize, usize)

Trait Implementations§

source§

impl Debug for RequestError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for RequestError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for RequestError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<RequestError> for Error

source§

fn from(source: RequestError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/error/index.html b/casbin/error/index.html index b876261e..c5762341 100644 --- a/casbin/error/index.html +++ b/casbin/error/index.html @@ -1 +1 @@ -casbin::error - Rust

Module casbin::error

source ·

Structs

  • AdapterError error represents any type of errors in adapter’s execution

Enums

  • General casbin error
  • ModelError represents any type of errors in model configuration
  • PolicyError represents any type of errors in policy
  • RBAC error represents any type of errors in RBAC role manager
  • RequestError represents any type of errors in coming request
\ No newline at end of file +casbin::error - Rust

Module casbin::error

source ·

Structs

  • AdapterError error represents any type of errors in adapter’s execution

Enums

  • General casbin error
  • ModelError represents any type of errors in model configuration
  • PolicyError represents any type of errors in policy
  • RBAC error represents any type of errors in RBAC role manager
  • RequestError represents any type of errors in coming request
\ No newline at end of file diff --git a/casbin/error/struct.AdapterError.html b/casbin/error/struct.AdapterError.html index c4f22abd..940819a6 100644 --- a/casbin/error/struct.AdapterError.html +++ b/casbin/error/struct.AdapterError.html @@ -1,15 +1,13 @@ -AdapterError in casbin::error - Rust

Struct casbin::error::AdapterError

source ·
pub struct AdapterError(pub Box<dyn StdError + Send + Sync>);
Expand description

AdapterError error represents any type of errors in adapter’s execution

-

Tuple Fields§

§0: Box<dyn StdError + Send + Sync>

Trait Implementations§

source§

impl Debug for AdapterError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AdapterError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for AdapterError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AdapterError> for Error

source§

fn from(source: AdapterError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+AdapterError in casbin::error - Rust

Struct casbin::error::AdapterError

source ·
pub struct AdapterError(pub Box<dyn StdError + Send + Sync>);
Expand description

AdapterError error represents any type of errors in adapter’s execution

+

Tuple Fields§

§0: Box<dyn StdError + Send + Sync>

Trait Implementations§

source§

impl Debug for AdapterError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AdapterError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for AdapterError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AdapterError> for Error

source§

fn from(source: AdapterError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/function_map/fn.key_match.html b/casbin/function_map/fn.key_match.html index 7c99dd36..14b6219d 100644 --- a/casbin/function_map/fn.key_match.html +++ b/casbin/function_map/fn.key_match.html @@ -1 +1 @@ -key_match in casbin::function_map - Rust

Function casbin::function_map::key_match

source ·
pub fn key_match(key1: &str, key2: &str) -> bool
\ No newline at end of file +key_match in casbin::function_map - Rust

Function casbin::function_map::key_match

source ·
pub fn key_match(key1: &str, key2: &str) -> bool
\ No newline at end of file diff --git a/casbin/function_map/fn.key_match2.html b/casbin/function_map/fn.key_match2.html index 7bee65c7..73bed0fe 100644 --- a/casbin/function_map/fn.key_match2.html +++ b/casbin/function_map/fn.key_match2.html @@ -1 +1 @@ -key_match2 in casbin::function_map - Rust
pub fn key_match2(key1: &str, key2: &str) -> bool
\ No newline at end of file +key_match2 in casbin::function_map - Rust
pub fn key_match2(key1: &str, key2: &str) -> bool
\ No newline at end of file diff --git a/casbin/function_map/fn.key_match3.html b/casbin/function_map/fn.key_match3.html index 6426c42c..061fbb74 100644 --- a/casbin/function_map/fn.key_match3.html +++ b/casbin/function_map/fn.key_match3.html @@ -1 +1 @@ -key_match3 in casbin::function_map - Rust
pub fn key_match3(key1: &str, key2: &str) -> bool
\ No newline at end of file +key_match3 in casbin::function_map - Rust
pub fn key_match3(key1: &str, key2: &str) -> bool
\ No newline at end of file diff --git a/casbin/function_map/fn.regex_match.html b/casbin/function_map/fn.regex_match.html index 97e3dc22..546f011d 100644 --- a/casbin/function_map/fn.regex_match.html +++ b/casbin/function_map/fn.regex_match.html @@ -1 +1 @@ -regex_match in casbin::function_map - Rust
pub fn regex_match(key1: &str, key2: &str) -> bool
\ No newline at end of file +regex_match in casbin::function_map - Rust
pub fn regex_match(key1: &str, key2: &str) -> bool
\ No newline at end of file diff --git a/casbin/function_map/index.html b/casbin/function_map/index.html index 73680844..159115ff 100644 --- a/casbin/function_map/index.html +++ b/casbin/function_map/index.html @@ -1 +1 @@ -casbin::function_map - Rust
\ No newline at end of file +casbin::function_map - Rust
\ No newline at end of file diff --git a/casbin/function_map/struct.FunctionMap.html b/casbin/function_map/struct.FunctionMap.html index aa88abc4..360f6d4d 100644 --- a/casbin/function_map/struct.FunctionMap.html +++ b/casbin/function_map/struct.FunctionMap.html @@ -1,17 +1,17 @@ -FunctionMap in casbin::function_map - Rust
pub struct FunctionMap { /* private fields */ }

Implementations§

source§

impl FunctionMap

source

pub fn add_function( +FunctionMap in casbin::function_map - Rust
pub struct FunctionMap { /* private fields */ }

Implementations§

source§

impl FunctionMap

source

pub fn add_function( &mut self, - fname: &str, - f: fn(_: ImmutableString, _: ImmutableString) -> bool -)

source

pub fn get_functions( + fname: &str, + f: fn(_: ImmutableString, _: ImmutableString) -> bool +)

source

pub fn get_functions( &self -) -> impl Iterator<Item = (&String, &fn(_: ImmutableString, _: ImmutableString) -> bool)>

Trait Implementations§

source§

impl Default for FunctionMap

source§

fn default() -> FunctionMap

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+) -> impl Iterator<Item = (&String, &fn(_: ImmutableString, _: ImmutableString) -> bool)>

Trait Implementations§

source§

impl Default for FunctionMap

source§

fn default() -> FunctionMap

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/index.html b/casbin/index.html index 4319c581..5d748381 100644 --- a/casbin/index.html +++ b/casbin/index.html @@ -1 +1 @@ -casbin - Rust
\ No newline at end of file +casbin - Rust
\ No newline at end of file diff --git a/casbin/macro.get_or_err.html b/casbin/macro.get_or_err.html index 67ca9bb2..4f855f3b 100644 --- a/casbin/macro.get_or_err.html +++ b/casbin/macro.get_or_err.html @@ -1,3 +1,3 @@ -get_or_err in casbin - Rust

Macro casbin::get_or_err

source ·
macro_rules! get_or_err {
+get_or_err in casbin - Rust

Macro casbin::get_or_err

source ·
macro_rules! get_or_err {
     ($this:ident, $key:expr, $err:expr, $msg:expr) => { ... };
 }
\ No newline at end of file diff --git a/casbin/macro.get_or_err_with_context!.html b/casbin/macro.get_or_err_with_context!.html new file mode 100644 index 00000000..5fcc08ac --- /dev/null +++ b/casbin/macro.get_or_err_with_context!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.get_or_err_with_context.html...

+ + + \ No newline at end of file diff --git a/casbin/macro.get_or_err_with_context.html b/casbin/macro.get_or_err_with_context.html new file mode 100644 index 00000000..69bdbb5d --- /dev/null +++ b/casbin/macro.get_or_err_with_context.html @@ -0,0 +1,3 @@ +get_or_err_with_context in casbin - Rust
macro_rules! get_or_err_with_context {
+    ($this:ident, $key:expr, $ctx:expr, $err:expr, $msg:expr) => { ... };
+}
\ No newline at end of file diff --git a/casbin/macro.push_index_if_explain.html b/casbin/macro.push_index_if_explain.html index d2198221..002888e9 100644 --- a/casbin/macro.push_index_if_explain.html +++ b/casbin/macro.push_index_if_explain.html @@ -1,3 +1,3 @@ -push_index_if_explain in casbin - Rust
macro_rules! push_index_if_explain {
+push_index_if_explain in casbin - Rust
macro_rules! push_index_if_explain {
     ($this:ident) => { ... };
 }
\ No newline at end of file diff --git a/casbin/macro.register_g_function.html b/casbin/macro.register_g_function.html index 43f124cc..86483213 100644 --- a/casbin/macro.register_g_function.html +++ b/casbin/macro.register_g_function.html @@ -1,3 +1,3 @@ -register_g_function in casbin - Rust
macro_rules! register_g_function {
+register_g_function in casbin - Rust
macro_rules! register_g_function {
     ($enforcer:ident, $fname:ident, $ast:ident) => { ... };
 }
\ No newline at end of file diff --git a/casbin/prelude/index.html b/casbin/prelude/index.html index 1f0b9dc1..973e03e6 100644 --- a/casbin/prelude/index.html +++ b/casbin/prelude/index.html @@ -1 +1 @@ -casbin::prelude - Rust

Module casbin::prelude

source ·

Re-exports

\ No newline at end of file +casbin::prelude - Rust

Module casbin::prelude

source ·

Re-exports

\ No newline at end of file diff --git a/casbin/rhai/attr.export_fn.html b/casbin/rhai/attr.export_fn.html index 0f292d47..596915a6 100644 --- a/casbin/rhai/attr.export_fn.html +++ b/casbin/rhai/attr.export_fn.html @@ -1,4 +1,4 @@ -export_fn in casbin::rhai - Rust

Attribute Macro casbin::rhai::export_fn

#[export_fn]
Expand description

Attribute, when put on a Rust function, turns it into a plugin function.

+export_fn in casbin::rhai - Rust

Attribute Macro casbin::rhai::export_fn

#[export_fn]
Expand description

Attribute, when put on a Rust function, turns it into a plugin function.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/attr.export_module.html b/casbin/rhai/attr.export_module.html
index aaed55c0..e18b9526 100644
--- a/casbin/rhai/attr.export_module.html
+++ b/casbin/rhai/attr.export_module.html
@@ -1,4 +1,4 @@
-export_module in casbin::rhai - Rust

Attribute Macro casbin::rhai::export_module

#[export_module]
Expand description

Attribute, when put on a Rust module, turns it into a plugin module.

+export_module in casbin::rhai - Rust

Attribute Macro casbin::rhai::export_module

#[export_module]
Expand description

Attribute, when put on a Rust module, turns it into a plugin module.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/config/hashing/fn.get_ahash_seed.html b/casbin/rhai/config/hashing/fn.get_ahash_seed.html
index 9d905e64..55adffd7 100644
--- a/casbin/rhai/config/hashing/fn.get_ahash_seed.html
+++ b/casbin/rhai/config/hashing/fn.get_ahash_seed.html
@@ -1,4 +1,4 @@
-get_ahash_seed in casbin::rhai::config::hashing - Rust
pub fn get_ahash_seed() -> &'static Option<[u64; 4]>
Expand description

Get the current hashing Seed.

+get_ahash_seed in casbin::rhai::config::hashing - Rust
pub fn get_ahash_seed() -> &'static Option<[u64; 4]>
Expand description

Get the current hashing Seed.

If the seed is not yet defined, the RHAI_AHASH_SEED environment variable (if any) is used.

Otherwise, the hashing seed is randomized to protect against DOS attacks.

See rhai::config::hashing::set_ahash_seed for more.

diff --git a/casbin/rhai/config/hashing/fn.set_ahash_seed.html b/casbin/rhai/config/hashing/fn.set_ahash_seed.html index 073318db..9f59c4ec 100644 --- a/casbin/rhai/config/hashing/fn.set_ahash_seed.html +++ b/casbin/rhai/config/hashing/fn.set_ahash_seed.html @@ -1,6 +1,6 @@ -set_ahash_seed in casbin::rhai::config::hashing - Rust
pub fn set_ahash_seed(
-    new_seed: Option<[u64; 4]>
-) -> Result<(), Option<[u64; 4]>>
Expand description

Set the hashing seed. This is used to hash functions etc.

+set_ahash_seed in casbin::rhai::config::hashing - Rust
pub fn set_ahash_seed(
+    new_seed: Option<[u64; 4]>
+) -> Result<(), Option<[u64; 4]>>
Expand description

Set the hashing seed. This is used to hash functions etc.

This is a static global value and affects every Rhai instance. This should not be used unless you know you need it.

Warning

diff --git a/casbin/rhai/config/hashing/index.html b/casbin/rhai/config/hashing/index.html index bf49e17a..19e8e7ea 100644 --- a/casbin/rhai/config/hashing/index.html +++ b/casbin/rhai/config/hashing/index.html @@ -1,9 +1,9 @@ -casbin::rhai::config::hashing - Rust

Module casbin::rhai::config::hashing

Expand description

Fixed hashing seeds for stable hashing.

-

Set to None to disable stable hashing.

+casbin::rhai::config::hashing - Rust

Module casbin::rhai::config::hashing

Expand description

Fixed hashing seeds for stable hashing.

+

Set to None to disable stable hashing.

See rhai::config::hashing::set_ahash_seed.

Example

// Set the hashing seed to [1, 2, 3, 4]
 rhai::config::hashing::set_ahash_seed(Some([1, 2, 3, 4])).unwrap();

Alternatively, set this at compile time via the RHAI_AHASH_SEED environment variable.

Example

env RHAI_AHASH_SEED ="[236,800,954,213]"
-

Structs

Functions

\ No newline at end of file +

Structs

  • A thread-safe cell which can be written to only once.

Functions

\ No newline at end of file diff --git a/casbin/rhai/config/hashing/sidebar-items.js b/casbin/rhai/config/hashing/sidebar-items.js index d3ac5116..50c312d9 100644 --- a/casbin/rhai/config/hashing/sidebar-items.js +++ b/casbin/rhai/config/hashing/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"fn":["get_ahash_seed","set_ahash_seed"],"struct":["SusLock"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"fn":["get_ahash_seed","set_ahash_seed"],"struct":["OnceCell"]}; \ No newline at end of file diff --git a/casbin/rhai/config/hashing/struct.OnceCell.html b/casbin/rhai/config/hashing/struct.OnceCell.html new file mode 100644 index 00000000..d26ec638 --- /dev/null +++ b/casbin/rhai/config/hashing/struct.OnceCell.html @@ -0,0 +1,191 @@ +OnceCell in casbin::rhai::config::hashing - Rust
pub struct OnceCell<T>(/* private fields */);
Expand description

A thread-safe cell which can be written to only once.

+

OnceCell provides & references to the contents without RAII guards.

+

Reading a non-None value out of OnceCell establishes a +happens-before relationship with a corresponding write. For example, if +thread A initializes the cell with get_or_init(f), and thread B +subsequently reads the result of this call, B also observes all the side +effects of f.

+

Example

+
use once_cell::sync::OnceCell;
+
+static CELL: OnceCell<String> = OnceCell::new();
+assert!(CELL.get().is_none());
+
+std::thread::spawn(|| {
+    let value: &String = CELL.get_or_init(|| {
+        "Hello, World!".to_string()
+    });
+    assert_eq!(value, "Hello, World!");
+}).join().unwrap();
+
+let value: Option<&String> = CELL.get();
+assert!(value.is_some());
+assert_eq!(value.unwrap().as_str(), "Hello, World!");
+

Implementations§

§

impl<T> OnceCell<T>

pub const fn new() -> OnceCell<T>

Creates a new empty cell.

+

pub const fn with_value(value: T) -> OnceCell<T>

Creates a new initialized cell.

+

pub fn get(&self) -> Option<&T>

Gets the reference to the underlying value.

+

Returns None if the cell is empty, or being initialized. This +method never blocks.

+

pub fn wait(&self) -> &T

Gets the reference to the underlying value, blocking the current +thread until it is set.

+ +
use once_cell::sync::OnceCell;
+
+let mut cell = std::sync::Arc::new(OnceCell::new());
+let t = std::thread::spawn({
+    let cell = std::sync::Arc::clone(&cell);
+    move || cell.set(92).unwrap()
+});
+
+// Returns immediately, but might return None.
+let _value_or_none = cell.get();
+
+// Will return 92, but might block until the other thread does `.set`.
+let value: &u32 = cell.wait();
+assert_eq!(*value, 92);
+t.join().unwrap();
+

pub fn get_mut(&mut self) -> Option<&mut T>

Gets the mutable reference to the underlying value.

+

Returns None if the cell is empty.

+

This method is allowed to violate the invariant of writing to a OnceCell +at most once because it requires &mut access to self. As with all +interior mutability, &mut access permits arbitrary modification:

+ +
use once_cell::sync::OnceCell;
+
+let mut cell: OnceCell<u32> = OnceCell::new();
+cell.set(92).unwrap();
+cell = OnceCell::new();
+

pub unsafe fn get_unchecked(&self) -> &T

Get the reference to the underlying value, without checking if the +cell is initialized.

+
Safety
+

Caller must ensure that the cell is in initialized state, and that +the contents are acquired by (synchronized to) this thread.

+

pub fn set(&self, value: T) -> Result<(), T>

Sets the contents of this cell to value.

+

Returns Ok(()) if the cell was empty and Err(value) if it was +full.

+
Example
+
use once_cell::sync::OnceCell;
+
+static CELL: OnceCell<i32> = OnceCell::new();
+
+fn main() {
+    assert!(CELL.get().is_none());
+
+    std::thread::spawn(|| {
+        assert_eq!(CELL.set(92), Ok(()));
+    }).join().unwrap();
+
+    assert_eq!(CELL.set(62), Err(62));
+    assert_eq!(CELL.get(), Some(&92));
+}
+

pub fn try_insert(&self, value: T) -> Result<&T, (&T, T)>

Like set, but also returns a reference to the final cell value.

+
Example
+
use once_cell::unsync::OnceCell;
+
+let cell = OnceCell::new();
+assert!(cell.get().is_none());
+
+assert_eq!(cell.try_insert(92), Ok(&92));
+assert_eq!(cell.try_insert(62), Err((&92, 62)));
+
+assert!(cell.get().is_some());
+

pub fn get_or_init<F>(&self, f: F) -> &Twhere + F: FnOnce() -> T,

Gets the contents of the cell, initializing it with f if the cell +was empty.

+

Many threads may call get_or_init concurrently with different +initializing functions, but it is guaranteed that only one function +will be executed.

+
Panics
+

If f panics, the panic is propagated to the caller, and the cell +remains uninitialized.

+

It is an error to reentrantly initialize the cell from f. The +exact outcome is unspecified. Current implementation deadlocks, but +this may be changed to a panic in the future.

+
Example
+
use once_cell::sync::OnceCell;
+
+let cell = OnceCell::new();
+let value = cell.get_or_init(|| 92);
+assert_eq!(value, &92);
+let value = cell.get_or_init(|| unreachable!());
+assert_eq!(value, &92);
+

pub fn get_or_try_init<F, E>(&self, f: F) -> Result<&T, E>where + F: FnOnce() -> Result<T, E>,

Gets the contents of the cell, initializing it with f if +the cell was empty. If the cell was empty and f failed, an +error is returned.

+
Panics
+

If f panics, the panic is propagated to the caller, and +the cell remains uninitialized.

+

It is an error to reentrantly initialize the cell from f. +The exact outcome is unspecified. Current implementation +deadlocks, but this may be changed to a panic in the future.

+
Example
+
use once_cell::sync::OnceCell;
+
+let cell = OnceCell::new();
+assert_eq!(cell.get_or_try_init(|| Err(())), Err(()));
+assert!(cell.get().is_none());
+let value = cell.get_or_try_init(|| -> Result<i32, ()> {
+    Ok(92)
+});
+assert_eq!(value, Ok(&92));
+assert_eq!(cell.get(), Some(&92))
+

pub fn take(&mut self) -> Option<T>

Takes the value out of this OnceCell, moving it back to an uninitialized state.

+

Has no effect and returns None if the OnceCell hasn’t been initialized.

+
Examples
+
use once_cell::sync::OnceCell;
+
+let mut cell: OnceCell<String> = OnceCell::new();
+assert_eq!(cell.take(), None);
+
+let mut cell = OnceCell::new();
+cell.set("hello".to_string()).unwrap();
+assert_eq!(cell.take(), Some("hello".to_string()));
+assert_eq!(cell.get(), None);
+

This method is allowed to violate the invariant of writing to a OnceCell +at most once because it requires &mut access to self. As with all +interior mutability, &mut access permits arbitrary modification:

+ +
use once_cell::sync::OnceCell;
+
+let mut cell: OnceCell<u32> = OnceCell::new();
+cell.set(92).unwrap();
+cell = OnceCell::new();
+

pub fn into_inner(self) -> Option<T>

Consumes the OnceCell, returning the wrapped value. Returns +None if the cell was empty.

+
Examples
+
use once_cell::sync::OnceCell;
+
+let cell: OnceCell<String> = OnceCell::new();
+assert_eq!(cell.into_inner(), None);
+
+let cell = OnceCell::new();
+cell.set("hello".to_string()).unwrap();
+assert_eq!(cell.into_inner(), Some("hello".to_string()));
+

Trait Implementations§

§

impl<T> Clone for OnceCell<T>where + T: Clone,

§

fn clone(&self) -> OnceCell<T>

Returns a copy of the value. Read more
§

fn clone_from(&mut self, source: &OnceCell<T>)

Performs copy-assignment from source. Read more
§

impl<T> Debug for OnceCell<T>where + T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Default for OnceCell<T>

§

fn default() -> OnceCell<T>

Returns the “default value” for a type. Read more
§

impl<T> From<T> for OnceCell<T>

§

fn from(value: T) -> OnceCell<T>

Converts to this type from the input type.
§

impl<T> PartialEq<OnceCell<T>> for OnceCell<T>where + T: PartialEq<T>,

§

fn eq(&self, other: &OnceCell<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl<T> Eq for OnceCell<T>where + T: Eq,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for OnceCell<T>where + T: UnwindSafe + RefUnwindSafe,

§

impl<T> Send for OnceCell<T>where + T: Send,

§

impl<T> Sync for OnceCell<T>where + T: Send + Sync,

§

impl<T> Unpin for OnceCell<T>where + T: Unpin,

§

impl<T> UnwindSafe for OnceCell<T>where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/config/index.html b/casbin/rhai/config/index.html index 502063c3..80720998 100644 --- a/casbin/rhai/config/index.html +++ b/casbin/rhai/config/index.html @@ -1,2 +1,2 @@ -casbin::rhai::config - Rust

Module casbin::rhai::config

Expand description

Configuration for Rhai.

+casbin::rhai::config - Rust

Module casbin::rhai::config

Expand description

Configuration for Rhai.

Modules

  • Fixed hashing seeds for stable hashing.
\ No newline at end of file diff --git a/casbin/rhai/constant.OP_CONTAINS.html b/casbin/rhai/constant.OP_CONTAINS.html index 5efd2b80..6fc7148f 100644 --- a/casbin/rhai/constant.OP_CONTAINS.html +++ b/casbin/rhai/constant.OP_CONTAINS.html @@ -1,3 +1,3 @@ -OP_CONTAINS in casbin::rhai - Rust

Constant casbin::rhai::OP_CONTAINS

pub const OP_CONTAINS: &'static str;
Expand description

Standard containment testing function.

+OP_CONTAINS in casbin::rhai - Rust

Constant casbin::rhai::OP_CONTAINS

pub const OP_CONTAINS: &'static str;
Expand description

Standard containment testing function.

The in operator is implemented as a call to this function.

\ No newline at end of file diff --git a/casbin/rhai/constant.OP_EQUALS.html b/casbin/rhai/constant.OP_EQUALS.html index 8cd812b2..01d47df9 100644 --- a/casbin/rhai/constant.OP_EQUALS.html +++ b/casbin/rhai/constant.OP_EQUALS.html @@ -1,4 +1,4 @@ -OP_EQUALS in casbin::rhai - Rust

Constant casbin::rhai::OP_EQUALS

pub const OP_EQUALS: &'static str;
Expand description

Standard equality comparison operator.

+OP_EQUALS in casbin::rhai - Rust

Constant casbin::rhai::OP_EQUALS

pub const OP_EQUALS: &'static str;
Expand description

Standard equality comparison operator.

Some standard functions (e.g. searching an Array) implicitly call this function to compare two Dynamic values.

\ No newline at end of file diff --git a/casbin/rhai/enum.EvalAltResult.html b/casbin/rhai/enum.EvalAltResult.html index 0a4c0d83..1233c778 100644 --- a/casbin/rhai/enum.EvalAltResult.html +++ b/casbin/rhai/enum.EvalAltResult.html @@ -1,95 +1,100 @@ -EvalAltResult in casbin::rhai - Rust
pub enum EvalAltResult {
-
Show 33 variants ErrorSystem(String, Box<dyn Error + Send + Sync, Global>), +EvalAltResult in casbin::rhai - Rust
pub enum EvalAltResult {
+
Show 35 variants ErrorSystem(String, Box<dyn Error + Sync + Send, Global>), ErrorParsing(ParseErrorType, Position), - ErrorVariableExists(String, Position), - ErrorForbiddenVariable(String, Position), - ErrorVariableNotFound(String, Position), - ErrorPropertyNotFound(String, Position), + ErrorVariableExists(String, Position), + ErrorForbiddenVariable(String, Position), + ErrorVariableNotFound(String, Position), + ErrorPropertyNotFound(String, Position), ErrorIndexNotFound(Dynamic, Position), - ErrorFunctionNotFound(String, Position), - ErrorModuleNotFound(String, Position), - ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position), - ErrorInModule(String, Box<EvalAltResult, Global>, Position), + ErrorFunctionNotFound(String, Position), + ErrorModuleNotFound(String, Position), + ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position), + ErrorInModule(String, Box<EvalAltResult, Global>, Position), ErrorUnboundThis(Position), - ErrorMismatchDataType(String, String, Position), - ErrorMismatchOutputType(String, String, Position), - ErrorIndexingType(String, Position), - ErrorArrayBounds(usize, i32, Position), - ErrorStringBounds(usize, i32, Position), - ErrorBitFieldBounds(usize, i32, Position), + ErrorMismatchDataType(String, String, Position), + ErrorMismatchOutputType(String, String, Position), + ErrorIndexingType(String, Position), + ErrorArrayBounds(usize, i32, Position), + ErrorStringBounds(usize, i32, Position), + ErrorBitFieldBounds(usize, i32, Position), ErrorFor(Position), - ErrorDataRace(String, Position), - ErrorNonPureMethodCallOnConstant(String, Position), - ErrorAssignmentToConstant(String, Position), - ErrorDotExpr(String, Position), - ErrorArithmetic(String, Position), + ErrorDataRace(String, Position), + ErrorNonPureMethodCallOnConstant(String, Position), + ErrorAssignmentToConstant(String, Position), + ErrorDotExpr(String, Position), + ErrorArithmetic(String, Position), ErrorTooManyOperations(Position), + ErrorTooManyVariables(Position), ErrorTooManyModules(Position), ErrorStackOverflow(Position), - ErrorDataTooLarge(String, Position), + ErrorDataTooLarge(String, Position), ErrorTerminated(Dynamic, Position), - ErrorCustomSyntax(String, Vec<String, Global>, Position), + ErrorCustomSyntax(String, Vec<String, Global>, Position), ErrorRuntime(Dynamic, Position), - LoopBreak(bool, Dynamic, Position), + LoopBreak(bool, Dynamic, Position), Return(Dynamic, Position), + Exit(Dynamic, Position),
}
Expand description

Evaluation result.

All wrapped Position values represent the location in the script where the error occurs.

Some errors never appear when certain features are turned on. They still exist so that the application can turn features on and off without going through massive code changes to remove/add back enum variants in match statements.

Thread Safety

-

Currently, EvalAltResult is neither Send nor Sync. -Turn on the sync feature to make it Send + Sync.

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ErrorSystem(String, Box<dyn Error + Send + Sync, Global>)

System error. Wrapped values are the error message and the internal error.

+

Currently, EvalAltResult is neither Send nor Sync. +Turn on the sync feature to make it Send + Sync.

+

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ErrorSystem(String, Box<dyn Error + Sync + Send, Global>)

System error. Wrapped values are the error message and the internal error.

§

ErrorParsing(ParseErrorType, Position)

Syntax error.

-
§

ErrorVariableExists(String, Position)

Shadowing of an existing variable disallowed. Wrapped value is the variable name.

-
§

ErrorForbiddenVariable(String, Position)

Forbidden variable name. Wrapped value is the variable name.

-
§

ErrorVariableNotFound(String, Position)

Access of an unknown variable. Wrapped value is the variable name.

-
§

ErrorPropertyNotFound(String, Position)

Access of an unknown object map property. Wrapped value is the property name.

+
§

ErrorVariableExists(String, Position)

Shadowing of an existing variable disallowed. Wrapped value is the variable name.

+
§

ErrorForbiddenVariable(String, Position)

Forbidden variable name. Wrapped value is the variable name.

+
§

ErrorVariableNotFound(String, Position)

Access of an unknown variable. Wrapped value is the variable name.

+
§

ErrorPropertyNotFound(String, Position)

Access of an unknown object map property. Wrapped value is the property name.

§

ErrorIndexNotFound(Dynamic, Position)

Access of an invalid index. Wrapped value is the index name.

-
§

ErrorFunctionNotFound(String, Position)

Call to an unknown function. Wrapped value is the function signature.

-
§

ErrorModuleNotFound(String, Position)

Usage of an unknown module. Wrapped value is the module name.

-
§

ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position)

An error has occurred inside a called function. +

§

ErrorFunctionNotFound(String, Position)

Call to an unknown function. Wrapped value is the function signature.

+
§

ErrorModuleNotFound(String, Position)

Usage of an unknown module. Wrapped value is the module name.

+
§

ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position)

An error has occurred inside a called function. Wrapped values are the function name, function source, and the interior error.

-
§

ErrorInModule(String, Box<EvalAltResult, Global>, Position)

An error has occurred while loading a module. +

§

ErrorInModule(String, Box<EvalAltResult, Global>, Position)

An error has occurred while loading a module. Wrapped value are the module name and the interior error.

§

ErrorUnboundThis(Position)

Access to this that is not bound.

-
§

ErrorMismatchDataType(String, String, Position)

Data is not of the required type. +

§

ErrorMismatchDataType(String, String, Position)

Data is not of the required type. Wrapped values are the type requested and type of the actual result.

-
§

ErrorMismatchOutputType(String, String, Position)

Returned type is not the same as the required output type. +

§

ErrorMismatchOutputType(String, String, Position)

Returned type is not the same as the required output type. Wrapped values are the type requested and type of the actual result.

-
§

ErrorIndexingType(String, Position)

Trying to index into a type that has no indexer function defined. Wrapped value is the type name.

-
§

ErrorArrayBounds(usize, i32, Position)

Array access out-of-bounds. +

§

ErrorIndexingType(String, Position)

Trying to index into a type that has no indexer function defined. Wrapped value is the type name.

+
§

ErrorArrayBounds(usize, i32, Position)

Array access out-of-bounds. Wrapped values are the current number of elements in the array and the index number.

-
§

ErrorStringBounds(usize, i32, Position)

String indexing out-of-bounds. +

§

ErrorStringBounds(usize, i32, Position)

String indexing out-of-bounds. Wrapped values are the current number of characters in the string and the index number.

-
§

ErrorBitFieldBounds(usize, i32, Position)

Bit-field indexing out-of-bounds. +

§

ErrorBitFieldBounds(usize, i32, Position)

Bit-field indexing out-of-bounds. Wrapped values are the current number of bits in the bit-field and the index number.

§

ErrorFor(Position)

The for statement encounters a type that is not iterable.

-
§

ErrorDataRace(String, Position)

Data race detected when accessing a variable. Wrapped value is the variable name.

-
§

ErrorNonPureMethodCallOnConstant(String, Position)

Calling a non-pure method on a constant. Wrapped value is the function name.

-
§

ErrorAssignmentToConstant(String, Position)

Assignment to a constant variable. Wrapped value is the variable name.

-
§

ErrorDotExpr(String, Position)

Inappropriate property access. Wrapped value is the property name.

-
§

ErrorArithmetic(String, Position)

Arithmetic error encountered. Wrapped value is the error message.

+
§

ErrorDataRace(String, Position)

Data race detected when accessing a variable. Wrapped value is the variable name.

+
§

ErrorNonPureMethodCallOnConstant(String, Position)

Calling a non-pure method on a constant. Wrapped value is the function name.

+
§

ErrorAssignmentToConstant(String, Position)

Assignment to a constant variable. Wrapped value is the variable name.

+
§

ErrorDotExpr(String, Position)

Inappropriate property access. Wrapped value is the property name.

+
§

ErrorArithmetic(String, Position)

Arithmetic error encountered. Wrapped value is the error message.

§

ErrorTooManyOperations(Position)

Number of operations over maximum limit.

+
§

ErrorTooManyVariables(Position)

Number of variables over maximum limit.

§

ErrorTooManyModules(Position)

Modules over maximum limit.

§

ErrorStackOverflow(Position)

Call stack over maximum limit.

-
§

ErrorDataTooLarge(String, Position)

Data value over maximum size limit. Wrapped value is the type name.

+
§

ErrorDataTooLarge(String, Position)

Data value over maximum size limit. Wrapped value is the type name.

§

ErrorTerminated(Dynamic, Position)

The script is prematurely terminated. Wrapped value is the termination token.

-
§

ErrorCustomSyntax(String, Vec<String, Global>, Position)

Error encountered for a custom syntax. Wrapped values are the error message and +

§

ErrorCustomSyntax(String, Vec<String, Global>, Position)

Error encountered for a custom syntax. Wrapped values are the error message and custom syntax symbols stream.

Normally this should never happen, unless an AST is compiled on one Engine but evaluated on another unrelated Engine.

§

ErrorRuntime(Dynamic, Position)

Run-time error encountered. Wrapped value is the error token.

-
§

LoopBreak(bool, Dynamic, Position)

Breaking out of loops - not an error if within a loop. +

§

LoopBreak(bool, Dynamic, Position)

Breaking out of loops - not an error if within a loop. The wrapped value, if true, means breaking clean out of the loop (i.e. a break statement). The wrapped value, if false, means breaking the current context (i.e. a continue statement).

§

Return(Dynamic, Position)

Not an error: Value returned from a script via the return keyword. Wrapped value is the result value.

-

Implementations§

§

impl EvalAltResult

pub const fn is_pseudo_error(&self) -> bool

Is this a pseudo error? A pseudo error is one that does not occur naturally.

-

LoopBreak and Return are pseudo errors.

-

pub const fn is_catchable(&self) -> bool

Can this error be caught?

-

pub const fn is_system_exception(&self) -> bool

Is this error a system exception?

+
§

Exit(Dynamic, Position)

Not an error: Value returned from a script via the exit function. +Wrapped value is the exit value.

+

Implementations§

§

impl EvalAltResult

pub const fn is_pseudo_error(&self) -> bool

Is this a pseudo error? A pseudo error is one that does not occur naturally.

+

LoopBreak, Return and Exit are pseudo errors.

+

pub const fn is_catchable(&self) -> bool

Can this error be caught?

+

pub const fn is_system_exception(&self) -> bool

Is this error a system exception?

pub fn unwrap_inner(&self) -> &EvalAltResult

Unwrap this error and get the very base error.

pub const fn position(&self) -> Position

Get the position of this error.

pub fn clear_position(&mut self) -> &mut EvalAltResult

Remove the position information from this error.

@@ -97,18 +102,16 @@

Thread Safety

pub fn take_position(&mut self) -> Position

Remove the position information from this error and return it.

The position of this error is set to NONE afterwards.

pub fn set_position(&mut self, new_position: Position) -> &mut EvalAltResult

Override the position of this error.

-

Trait Implementations§

§

impl Debug for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for EvalAltResult

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ParseError> for EvalAltResult

§

fn from(err: ParseError) -> EvalAltResult

Converts to this type from the input type.
§

impl From<ParseErrorType> for EvalAltResult

§

fn from(err: ParseErrorType) -> EvalAltResult

Converts to this type from the input type.
§

impl<T> From<T> for EvalAltResultwhere - T: AsRef<str>,

§

fn from(err: T) -> EvalAltResult

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Debug for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for EvalAltResult

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ParseError> for EvalAltResult

§

fn from(err: ParseError) -> EvalAltResult

Converts to this type from the input type.
§

impl From<ParseErrorType> for EvalAltResult

§

fn from(err: ParseErrorType) -> EvalAltResult

Converts to this type from the input type.
§

impl<T> From<T> for EvalAltResultwhere + T: AsRef<str>,

§

fn from(err: T) -> EvalAltResult

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/enum.FnAccess.html b/casbin/rhai/enum.FnAccess.html index be78e8d9..4382f116 100644 --- a/casbin/rhai/enum.FnAccess.html +++ b/casbin/rhai/enum.FnAccess.html @@ -1,41 +1,49 @@ -FnAccess in casbin::rhai - Rust

Enum casbin::rhai::FnAccess

pub enum FnAccess {
+FnAccess in casbin::rhai - Rust

Enum casbin::rhai::FnAccess

pub enum FnAccess {
     Private,
     Public,
 }
Expand description

A type representing the access mode of a function.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Private

Private function.

§

Public

Public function.

-

Implementations§

§

impl FnAccess

pub const fn is_private(self) -> bool

Is this function private?

-

pub const fn is_public(self) -> bool

Is this function public?

-

Trait Implementations§

§

impl Clone for FnAccess

§

fn clone(&self) -> FnAccess

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnAccess

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for FnAccess

§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnAccess

§

fn cmp(&self, other: &FnAccess) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnAccess> for FnAccess

§

fn eq(&self, other: &FnAccess) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnAccess> for FnAccess

§

fn partial_cmp(&self, other: &FnAccess) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Copy for FnAccess

§

impl Eq for FnAccess

§

impl StructuralEq for FnAccess

§

impl StructuralPartialEq for FnAccess

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

§

impl FnAccess

pub const fn is_private(self) -> bool

Is this function private?

+

pub const fn is_public(self) -> bool

Is this function public?

+

Trait Implementations§

§

impl Clone for FnAccess

§

fn clone(&self) -> FnAccess

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnAccess

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for FnAccess

§

fn deserialize<__D>( + __deserializer: __D +) -> Result<FnAccess, <__D as Deserializer<'de>>::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for FnAccess

§

fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnAccess

§

fn cmp(&self, other: &FnAccess) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnAccess> for FnAccess

§

fn eq(&self, other: &FnAccess) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnAccess> for FnAccess

§

fn partial_cmp(&self, other: &FnAccess) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
§

impl Serialize for FnAccess

§

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 Copy for FnAccess

§

impl Eq for FnAccess

§

impl StructuralEq for FnAccess

§

impl StructuralPartialEq for FnAccess

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/casbin/rhai/enum.FnNamespace.html b/casbin/rhai/enum.FnNamespace.html index 68d7a24b..24421b17 100644 --- a/casbin/rhai/enum.FnNamespace.html +++ b/casbin/rhai/enum.FnNamespace.html @@ -1,42 +1,42 @@ -FnNamespace in casbin::rhai - Rust

Enum casbin::rhai::FnNamespace

pub enum FnNamespace {
+FnNamespace in casbin::rhai - Rust

Enum casbin::rhai::FnNamespace

pub enum FnNamespace {
     Internal,
     Global,
 }
Expand description

A type representing the namespace of a function.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Internal

Module namespace only.

Ignored under no_module.

§

Global

Expose to global namespace.

-

Implementations§

§

impl FnNamespace

pub const fn is_module_namespace(self) -> bool

Is this a module namespace?

-

pub const fn is_global_namespace(self) -> bool

Is this a global namespace?

-

Trait Implementations§

§

impl Clone for FnNamespace

§

fn clone(&self) -> FnNamespace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnNamespace

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for FnNamespace

§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnNamespace

§

fn cmp(&self, other: &FnNamespace) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnNamespace> for FnNamespace

§

fn eq(&self, other: &FnNamespace) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnNamespace> for FnNamespace

§

fn partial_cmp(&self, other: &FnNamespace) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Copy for FnNamespace

§

impl Eq for FnNamespace

§

impl StructuralEq for FnNamespace

§

impl StructuralPartialEq for FnNamespace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

§

impl FnNamespace

pub const fn is_module_namespace(self) -> bool

Is this a module namespace?

+

pub const fn is_global_namespace(self) -> bool

Is this a global namespace?

+

Trait Implementations§

§

impl Clone for FnNamespace

§

fn clone(&self) -> FnNamespace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnNamespace

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for FnNamespace

§

fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnNamespace

§

fn cmp(&self, other: &FnNamespace) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnNamespace> for FnNamespace

§

fn eq(&self, other: &FnNamespace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnNamespace> for FnNamespace

§

fn partial_cmp(&self, other: &FnNamespace) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
§

impl Copy for FnNamespace

§

impl Eq for FnNamespace

§

impl StructuralEq for FnNamespace

§

impl StructuralPartialEq for FnNamespace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/casbin/rhai/enum.LexError.html b/casbin/rhai/enum.LexError.html index a2ccaf14..ef0a5953 100644 --- a/casbin/rhai/enum.LexError.html +++ b/casbin/rhai/enum.LexError.html @@ -1,47 +1,45 @@ -LexError in casbin::rhai - Rust

Enum casbin::rhai::LexError

pub enum LexError {
-    UnexpectedInput(String),
+LexError in casbin::rhai - Rust

Enum casbin::rhai::LexError

pub enum LexError {
+    UnexpectedInput(String),
     UnterminatedString,
-    StringTooLong(usize),
-    MalformedEscapeSequence(String),
-    MalformedNumber(String),
-    MalformedChar(String),
-    MalformedIdentifier(String),
-    ImproperSymbol(String, String),
+    StringTooLong(usize),
+    MalformedEscapeSequence(String),
+    MalformedNumber(String),
+    MalformedChar(String),
+    MalformedIdentifier(String),
+    ImproperSymbol(String, String),
 }
Expand description

Error encountered when tokenizing the script text.

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedInput(String)

An unexpected symbol is encountered when tokenizing the script text.

+

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedInput(String)

An unexpected symbol is encountered when tokenizing the script text.

§

UnterminatedString

A string literal is not terminated before a new-line or EOF.

-
§

StringTooLong(usize)

An identifier or string literal is longer than the maximum allowed length.

-
§

MalformedEscapeSequence(String)

An string/character/numeric escape sequence is in an invalid format.

-
§

MalformedNumber(String)

An numeric literal is in an invalid format.

-
§

MalformedChar(String)

An character literal is in an invalid format.

-
§

MalformedIdentifier(String)

An identifier is in an invalid format.

-
§

ImproperSymbol(String, String)

Bad symbol encountered when tokenizing the script text.

+
§

StringTooLong(usize)

An identifier or string literal is longer than the maximum allowed length.

+
§

MalformedEscapeSequence(String)

An string/character/numeric escape sequence is in an invalid format.

+
§

MalformedNumber(String)

An numeric literal is in an invalid format.

+
§

MalformedChar(String)

An character literal is in an invalid format.

+
§

MalformedIdentifier(String)

An identifier is in an invalid format.

+
§

ImproperSymbol(String, String)

Bad symbol encountered when tokenizing the script text.

Implementations§

§

impl LexError

pub fn into_err(self, pos: Position) -> ParseError

Convert a LexError into a ParseError.

-

Trait Implementations§

§

impl Clone for LexError

§

fn clone(&self) -> LexError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for LexError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for LexError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for LexError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<LexError> for ParseErrorType

§

fn from(err: LexError) -> ParseErrorType

Converts to this type from the input type.
§

impl Hash for LexError

§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq<LexError> for LexError

§

fn eq(&self, other: &LexError) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl Eq for LexError

§

impl StructuralEq for LexError

§

impl StructuralPartialEq for LexError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Clone for LexError

§

fn clone(&self) -> LexError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for LexError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for LexError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for LexError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<LexError> for ParseErrorType

§

fn from(err: LexError) -> ParseErrorType

Converts to this type from the input type.
§

impl Hash for LexError

§

fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq<LexError> for LexError

§

fn eq(&self, other: &LexError) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl Eq for LexError

§

impl StructuralEq for LexError

§

impl StructuralPartialEq for LexError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

\ No newline at end of file diff --git a/casbin/rhai/enum.ParseErrorType.html b/casbin/rhai/enum.ParseErrorType.html index d4836ccc..34bddee9 100644 --- a/casbin/rhai/enum.ParseErrorType.html +++ b/casbin/rhai/enum.ParseErrorType.html @@ -1,40 +1,40 @@ -ParseErrorType in casbin::rhai - Rust
pub enum ParseErrorType {
+ParseErrorType in casbin::rhai - Rust
pub enum ParseErrorType {
 
Show 37 variants UnexpectedEOF, BadInput(LexError), - UnknownOperator(String), - MissingToken(String, String), - MissingSymbol(String), - MalformedCallExpr(String), - MalformedIndexExpr(String), - MalformedInExpr(String), - MalformedCapture(String), - DuplicatedProperty(String), + UnknownOperator(String), + MissingToken(String, String), + MissingSymbol(String), + MalformedCallExpr(String), + MalformedIndexExpr(String), + MalformedInExpr(String), + MalformedCapture(String), + DuplicatedProperty(String), DuplicatedSwitchCase, - DuplicatedVariable(String), + DuplicatedVariable(String), WrongSwitchIntegerCase, WrongSwitchDefaultCase, WrongSwitchCaseCondition, PropertyExpected, VariableExpected, - ForbiddenVariable(String), - Reserved(String), - MismatchedType(String, String), - ExprExpected(String), + ForbiddenVariable(String), + Reserved(String), + MismatchedType(String, String), + ExprExpected(String), WrongDocComment, WrongFnDefinition, - FnDuplicatedDefinition(String, usize), + FnDuplicatedDefinition(String, usize), FnMissingName, - FnMissingParams(String), - FnDuplicatedParam(String, String), - FnMissingBody(String), + FnMissingParams(String), + FnDuplicatedParam(String, String), + FnMissingBody(String), WrongExport, - AssignmentToConstant(String), - AssignmentToInvalidLHS(String), - VariableExists(String), - VariableUndefined(String), - ModuleUndefined(String), + AssignmentToConstant(String), + AssignmentToInvalidLHS(String), + VariableExists(String), + VariableUndefined(String), + ModuleUndefined(String), ExprTooDeep, - LiteralTooLarge(String, usize), + LiteralTooLarge(String, usize), LoopBreak,
}
Expand description

Error encountered when parsing a script.

Some errors never appear when certain features are turned on. @@ -42,75 +42,79 @@ massive code changes to remove/add back enum variants in match statements.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedEOF

The script ends prematurely.

§

BadInput(LexError)

Error in the script text. Wrapped value is the lex error.

-
§

UnknownOperator(String)

An unknown operator is encountered. Wrapped value is the operator.

-
§

MissingToken(String, String)

Expecting a particular token but not finding one. Wrapped values are the token and description.

-
§

MissingSymbol(String)

Expecting a particular symbol but not finding one. Wrapped value is the description.

-
§

MalformedCallExpr(String)

An expression in function call arguments () has syntax error. Wrapped value is the error +

§

UnknownOperator(String)

An unknown operator is encountered. Wrapped value is the operator.

+
§

MissingToken(String, String)

Expecting a particular token but not finding one. Wrapped values are the token and description.

+
§

MissingSymbol(String)

Expecting a particular symbol but not finding one. Wrapped value is the description.

+
§

MalformedCallExpr(String)

👎Deprecated since 1.16.0: This error variant is no longer used and will be removed in the next major version.

An expression in function call arguments () has syntax error. Wrapped value is the error description (if any).

-
§

MalformedIndexExpr(String)

An expression in indexing brackets [] has syntax error. Wrapped value is the error -description (if any).

-
§

MalformedInExpr(String)

An expression in an in expression has syntax error. Wrapped value is the error description (if any).

-
§

MalformedCapture(String)

A capturing has syntax error. Wrapped value is the error description (if any).

-
§

DuplicatedProperty(String)

A map definition has duplicated property names. Wrapped value is the property name.

-
§

DuplicatedSwitchCase

👎Deprecated since 1.9.0: This error variant is deprecated. It never occurs and will be removed in the next major version.

A switch case is duplicated.

Deprecated

-

This error variant is deprecated. It never occurs and will be removed in the next major version.

-
§

DuplicatedVariable(String)

A variable name is duplicated. Wrapped value is the variable name.

+

This error is no longer used and will be removed in the next major version.

+
§

MalformedIndexExpr(String)

An expression in indexing brackets [] has syntax error. Wrapped value is the error +description (if any).

+
§

MalformedInExpr(String)

👎Deprecated since 1.16.0: This error variant is no longer used and will be removed in the next major version.

An expression in an in expression has syntax error. Wrapped value is the error description (if any).

+

Deprecated

+

This error is no longer used and will be removed in the next major version.

+
§

MalformedCapture(String)

A capturing has syntax error. Wrapped value is the error description (if any).

+
§

DuplicatedProperty(String)

A map definition has duplicated property names. Wrapped value is the property name.

+
§

DuplicatedSwitchCase

👎Deprecated since 1.9.0: This error variant is no longer used and will be removed in the next major version.

A switch case is duplicated.

+

Deprecated

+

This error is no longer used and will be removed in the next major version.

+
§

DuplicatedVariable(String)

A variable name is duplicated. Wrapped value is the variable name.

§

WrongSwitchIntegerCase

A numeric case of a switch statement is in an appropriate place.

§

WrongSwitchDefaultCase

The default case of a switch statement is in an appropriate place.

§

WrongSwitchCaseCondition

The case condition of a switch statement is not appropriate.

§

PropertyExpected

Missing a property name for custom types and maps.

§

VariableExpected

Missing a variable name after the let, const, for or catch keywords.

-
§

ForbiddenVariable(String)

Forbidden variable name. Wrapped value is the variable name.

-
§

Reserved(String)

An identifier is a reserved symbol.

-
§

MismatchedType(String, String)

An expression is of the wrong type. +

§

ForbiddenVariable(String)

Forbidden variable name. Wrapped value is the variable name.

+
§

Reserved(String)

An identifier is a reserved symbol.

+
§

MismatchedType(String, String)

An expression is of the wrong type. Wrapped values are the type requested and type of the actual result.

-
§

ExprExpected(String)

Missing an expression. Wrapped value is the expression type.

+
§

ExprExpected(String)

Missing an expression. Wrapped value is the expression type.

§

WrongDocComment

Defining a doc-comment in an appropriate place (e.g. not at global level).

§

WrongFnDefinition

Defining a function fn in an appropriate place (e.g. inside another function).

-
§

FnDuplicatedDefinition(String, usize)

Defining a function with a name that conflicts with an existing function. +

§

FnDuplicatedDefinition(String, usize)

Defining a function with a name that conflicts with an existing function. Wrapped values are the function name and number of parameters.

§

FnMissingName

Missing a function name after the fn keyword.

-
§

FnMissingParams(String)

A function definition is missing the parameters list. Wrapped value is the function name.

-
§

FnDuplicatedParam(String, String)

A function definition has duplicated parameters. Wrapped values are the function name and +

§

FnMissingParams(String)

A function definition is missing the parameters list. Wrapped value is the function name.

+
§

FnDuplicatedParam(String, String)

A function definition has duplicated parameters. Wrapped values are the function name and parameter name.

-
§

FnMissingBody(String)

A function definition is missing the body. Wrapped value is the function name.

+
§

FnMissingBody(String)

A function definition is missing the body. Wrapped value is the function name.

§

WrongExport

Export statement not at global level.

-
§

AssignmentToConstant(String)

Assignment to an a constant variable. Wrapped value is the constant variable name.

-
§

AssignmentToInvalidLHS(String)

Assignment to an inappropriate LHS (left-hand-side) expression. +

§

AssignmentToConstant(String)

Assignment to an a constant variable. Wrapped value is the constant variable name.

+
§

AssignmentToInvalidLHS(String)

Assignment to an inappropriate LHS (left-hand-side) expression. Wrapped value is the error message (if any).

-
§

VariableExists(String)

A variable is already defined.

+
§

VariableExists(String)

A variable is already defined.

Only appears when variables shadowing is disabled.

-
§

VariableUndefined(String)

A variable is not found.

+
§

VariableUndefined(String)

A variable is not found.

Only appears when strict variables mode is enabled.

-
§

ModuleUndefined(String)

An imported module is not found.

+
§

ModuleUndefined(String)

An imported module is not found.

Only appears when strict variables mode is enabled.

§

ExprTooDeep

Expression exceeding the maximum levels of complexity.

-
§

LiteralTooLarge(String, usize)

Literal exceeding the maximum size. Wrapped values are the data type name and the maximum size.

+
§

LiteralTooLarge(String, usize)

Literal exceeding the maximum size. Wrapped values are the data type name and the maximum size.

§

LoopBreak

Break statement not inside a loop.

-

Trait Implementations§

§

impl Clone for ParseErrorType

§

fn clone(&self) -> ParseErrorType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ParseErrorType

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ParseErrorType

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<LexError> for ParseErrorType

§

fn from(err: LexError) -> ParseErrorType

Converts to this type from the input type.
§

impl From<ParseErrorType> for EvalAltResult

§

fn from(err: ParseErrorType) -> EvalAltResult

Converts to this type from the input type.
§

impl Hash for ParseErrorType

§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq<ParseErrorType> for ParseErrorType

§

fn eq(&self, other: &ParseErrorType) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl Eq for ParseErrorType

§

impl StructuralEq for ParseErrorType

§

impl StructuralPartialEq for ParseErrorType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Clone for ParseErrorType

§

fn clone(&self) -> ParseErrorType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for ParseErrorType

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for ParseErrorType

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<LexError> for ParseErrorType

§

fn from(err: LexError) -> ParseErrorType

Converts to this type from the input type.
§

impl From<ParseErrorType> for EvalAltResult

§

fn from(err: ParseErrorType) -> EvalAltResult

Converts to this type from the input type.
§

impl Hash for ParseErrorType

§

fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq<ParseErrorType> for ParseErrorType

§

fn eq(&self, other: &ParseErrorType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl Eq for ParseErrorType

§

impl StructuralEq for ParseErrorType

§

impl StructuralPartialEq for ParseErrorType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

\ No newline at end of file diff --git a/casbin/rhai/fn.eval.html b/casbin/rhai/fn.eval.html index 542bad86..f15f4e03 100644 --- a/casbin/rhai/fn.eval.html +++ b/casbin/rhai/fn.eval.html @@ -1,5 +1,5 @@ -eval in casbin::rhai - Rust

Function casbin::rhai::eval

pub fn eval<T>(script: &str) -> Result<T, Box<EvalAltResult, Global>>where
-    T: Variant + Clone,
Expand description

Evaluate a string as a script, returning the result value or an error.

+eval in casbin::rhai - Rust

Function casbin::rhai::eval

pub fn eval<T>(script: &str) -> Result<T, Box<EvalAltResult, Global>>where
+    T: Variant + Clone,
Expand description

Evaluate a string as a script, returning the result value or an error.

Example

let result: i64 = rhai::eval("40 + 2")?;
 
diff --git a/casbin/rhai/fn.eval_file.html b/casbin/rhai/fn.eval_file.html
index eb64fb5d..d80c0722 100644
--- a/casbin/rhai/fn.eval_file.html
+++ b/casbin/rhai/fn.eval_file.html
@@ -1,7 +1,7 @@
-eval_file in casbin::rhai - Rust

Function casbin::rhai::eval_file

pub fn eval_file<T>(
-    path: impl AsRef<Path>
-) -> Result<T, Box<EvalAltResult, Global>>where
-    T: Variant + Clone,
Expand description

Evaluate a script file, returning the result value or an error.

+eval_file in casbin::rhai - Rust

Function casbin::rhai::eval_file

pub fn eval_file<T>(
+    path: impl AsRef<Path>
+) -> Result<T, Box<EvalAltResult, Global>>where
+    T: Variant + Clone,
Expand description

Evaluate a script file, returning the result value or an error.

Not available under no_std or WASM.

Example

let result = rhai::eval_file::<i64>("script.rhai")?;
diff --git a/casbin/rhai/fn.format_map_as_json.html b/casbin/rhai/fn.format_map_as_json.html index a02b2b48..aa598285 100644 --- a/casbin/rhai/fn.format_map_as_json.html +++ b/casbin/rhai/fn.format_map_as_json.html @@ -1,6 +1,6 @@ -format_map_as_json in casbin::rhai - Rust
pub fn format_map_as_json(
-    map: &BTreeMap<SmartString<LazyCompact>, Dynamic, Global>
-) -> String
Expand description

Return the JSON representation of an object map.

+format_map_as_json in casbin::rhai - Rust
pub fn format_map_as_json(
+    map: &BTreeMap<SmartString<LazyCompact>, Dynamic, Global>
+) -> String
Expand description

Return the JSON representation of an object map.

Not available under no_std.

This function can be used together with Engine::parse_json to work with JSON texts without using the serde_json crate (which is heavy).

diff --git a/casbin/rhai/fn.run.html b/casbin/rhai/fn.run.html index 80685ea0..0e9500ab 100644 --- a/casbin/rhai/fn.run.html +++ b/casbin/rhai/fn.run.html @@ -1,4 +1,4 @@ -run in casbin::rhai - Rust

Function casbin::rhai::run

pub fn run(script: &str) -> Result<(), Box<EvalAltResult, Global>>
Expand description

Evaluate a string as a script.

+run in casbin::rhai - Rust

Function casbin::rhai::run

pub fn run(script: &str) -> Result<(), Box<EvalAltResult, Global>>
Expand description

Evaluate a string as a script.

Example

rhai::run("print(40 + 2);")?;
\ No newline at end of file diff --git a/casbin/rhai/fn.run_file.html b/casbin/rhai/fn.run_file.html index a58f7ee7..9cd528c9 100644 --- a/casbin/rhai/fn.run_file.html +++ b/casbin/rhai/fn.run_file.html @@ -1,6 +1,6 @@ -run_file in casbin::rhai - Rust

Function casbin::rhai::run_file

pub fn run_file(
-    path: impl AsRef<Path>
-) -> Result<(), Box<EvalAltResult, Global>>
Expand description

Evaluate a file.

+run_file in casbin::rhai - Rust

Function casbin::rhai::run_file

pub fn run_file(
+    path: impl AsRef<Path>
+) -> Result<(), Box<EvalAltResult, Global>>
Expand description

Evaluate a file.

Not available under no_std or WASM.

Example

rhai::run_file("script.rhai")?;
diff --git a/casbin/rhai/index.html b/casbin/rhai/index.html index a6221dae..a340491d 100644 --- a/casbin/rhai/index.html +++ b/casbin/rhai/index.html @@ -1,10 +1,10 @@ -casbin::rhai - Rust

Module casbin::rhai

source ·

Modules

Functions

  • Evaluate a string as a script, returning the result value or an error.
  • Evaluate a script file, returning the result value or an error.
  • Return the JSON representation of an object map.
  • Evaluate a string as a script.
  • Evaluate a file.

Type Aliases

  • Variable-sized array of Dynamic values.
  • Variable-sized array of u8 values (byte array).
  • The system integer type. +It is defined as i32 since the only_i32 feature is used.
  • A dictionary of Dynamic values with string keys.

Attribute Macros

  • Attribute, when put on a Rust function, turns it into a plugin function.
  • Attribute, when put on a Rust module, turns it into a plugin module.
\ No newline at end of file diff --git a/casbin/rhai/macro.combine_with_exported_module.html b/casbin/rhai/macro.combine_with_exported_module.html index 495e4f58..384a4195 100644 --- a/casbin/rhai/macro.combine_with_exported_module.html +++ b/casbin/rhai/macro.combine_with_exported_module.html @@ -1,4 +1,4 @@ -combine_with_exported_module in casbin::rhai - Rust
combine_with_exported_module!() { /* proc-macro */ }
Expand description

Macro to combine a plugin module into an existing module.

+combine_with_exported_module in casbin::rhai - Rust
combine_with_exported_module!() { /* proc-macro */ }
Expand description

Macro to combine a plugin module into an existing module.

Functions and variables in the plugin module overrides any existing similarly-named functions and variables in the target module.

This call is intended to be used within the [def_package!][crate::def_package] macro to define diff --git a/casbin/rhai/macro.def_package.html b/casbin/rhai/macro.def_package.html index d1adada1..d7312876 100644 --- a/casbin/rhai/macro.def_package.html +++ b/casbin/rhai/macro.def_package.html @@ -1,4 +1,4 @@ -def_package in casbin::rhai - Rust

Macro casbin::rhai::def_package

macro_rules! def_package {
+def_package in casbin::rhai - Rust

Macro casbin::rhai::def_package

macro_rules! def_package {
     ($($(#[$outer:meta])* $mod:vis $package:ident($lib:ident)
                 $( : $($(#[$base_meta:meta])* $base_pkg:ty),+ )?
                 $block:block
diff --git a/casbin/rhai/macro.exported_module.html b/casbin/rhai/macro.exported_module.html
index ee1442ab..1de481e3 100644
--- a/casbin/rhai/macro.exported_module.html
+++ b/casbin/rhai/macro.exported_module.html
@@ -1,4 +1,4 @@
-exported_module in casbin::rhai - Rust
exported_module!() { /* proc-macro */ }
Expand description

Macro to generate a Rhai Module from a plugin module defined via #[export_module].

+exported_module in casbin::rhai - Rust
exported_module!() { /* proc-macro */ }
Expand description

Macro to generate a Rhai Module from a plugin module defined via #[export_module].

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/macro.register_exported_fn.html b/casbin/rhai/macro.register_exported_fn.html
index 9610e849..86851565 100644
--- a/casbin/rhai/macro.register_exported_fn.html
+++ b/casbin/rhai/macro.register_exported_fn.html
@@ -1,4 +1,4 @@
-register_exported_fn in casbin::rhai - Rust
register_exported_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function (defined via #[export_fn]) into an Engine.

+register_exported_fn in casbin::rhai - Rust
register_exported_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function (defined via #[export_fn]) into an Engine.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/macro.set_exported_fn.html b/casbin/rhai/macro.set_exported_fn.html
index 14ee7688..cbedaea2 100644
--- a/casbin/rhai/macro.set_exported_fn.html
+++ b/casbin/rhai/macro.set_exported_fn.html
@@ -1,4 +1,4 @@
-set_exported_fn in casbin::rhai - Rust
set_exported_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function into a Rhai Module.

+set_exported_fn in casbin::rhai - Rust
set_exported_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function into a Rhai Module.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/macro.set_exported_global_fn.html b/casbin/rhai/macro.set_exported_global_fn.html
index bbf60b4f..83cb204d 100644
--- a/casbin/rhai/macro.set_exported_global_fn.html
+++ b/casbin/rhai/macro.set_exported_global_fn.html
@@ -1,4 +1,4 @@
-set_exported_global_fn in casbin::rhai - Rust
set_exported_global_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function into a Rhai Module and expose it globally.

+set_exported_global_fn in casbin::rhai - Rust
set_exported_global_fn!() { /* proc-macro */ }
Expand description

Macro to register a plugin function into a Rhai Module and expose it globally.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/packages/index.html b/casbin/rhai/packages/index.html
index 4de8befb..31d6768d 100644
--- a/casbin/rhai/packages/index.html
+++ b/casbin/rhai/packages/index.html
@@ -1,2 +1,2 @@
-casbin::rhai::packages - Rust

Module casbin::rhai::packages

Expand description

Module containing all built-in packages available to Rhai, plus facilities to define custom packages.

+casbin::rhai::packages - Rust

Module casbin::rhai::packages

Expand description

Module containing all built-in packages available to Rhai, plus facilities to define custom packages.

Structs

Traits

  • Trait that all packages must implement.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.ArithmeticPackage.html b/casbin/rhai/packages/struct.ArithmeticPackage.html index 7ec16931..fa58671d 100644 --- a/casbin/rhai/packages/struct.ArithmeticPackage.html +++ b/casbin/rhai/packages/struct.ArithmeticPackage.html @@ -1,14 +1,14 @@ -ArithmeticPackage in casbin::rhai::packages - Rust
pub struct ArithmeticPackage(_);
Expand description

Basic arithmetic package.

+ArithmeticPackage in casbin::rhai::packages - Rust
pub struct ArithmeticPackage(/* private fields */);
Expand description

Basic arithmetic package.

Implementations§

§

impl ArithmeticPackage

pub fn new() -> ArithmeticPackage

Create a new ArithmeticPackage

-

Trait Implementations§

§

impl Default for ArithmeticPackage

§

fn default() -> ArithmeticPackage

Returns the “default value” for a type. Read more
§

impl Package for ArithmeticPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for ArithmeticPackage

§

fn default() -> ArithmeticPackage

Returns the “default value” for a type. Read more
§

impl Package for ArithmeticPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicArrayPackage.html b/casbin/rhai/packages/struct.BasicArrayPackage.html index a4274c38..6f702a9e 100644 --- a/casbin/rhai/packages/struct.BasicArrayPackage.html +++ b/casbin/rhai/packages/struct.BasicArrayPackage.html @@ -1,14 +1,14 @@ -BasicArrayPackage in casbin::rhai::packages - Rust
pub struct BasicArrayPackage(_);
Expand description

Package of basic array utilities.

+BasicArrayPackage in casbin::rhai::packages - Rust
pub struct BasicArrayPackage(/* private fields */);
Expand description

Package of basic array utilities.

Implementations§

§

impl BasicArrayPackage

pub fn new() -> BasicArrayPackage

Create a new BasicArrayPackage

-

Trait Implementations§

§

impl Default for BasicArrayPackage

§

fn default() -> BasicArrayPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicArrayPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicArrayPackage

§

fn default() -> BasicArrayPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicArrayPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicBlobPackage.html b/casbin/rhai/packages/struct.BasicBlobPackage.html index 274db69b..60d7ded6 100644 --- a/casbin/rhai/packages/struct.BasicBlobPackage.html +++ b/casbin/rhai/packages/struct.BasicBlobPackage.html @@ -1,14 +1,14 @@ -BasicBlobPackage in casbin::rhai::packages - Rust
pub struct BasicBlobPackage(_);
Expand description

Package of basic BLOB utilities.

+BasicBlobPackage in casbin::rhai::packages - Rust
pub struct BasicBlobPackage(/* private fields */);
Expand description

Package of basic BLOB utilities.

Implementations§

§

impl BasicBlobPackage

pub fn new() -> BasicBlobPackage

Create a new BasicBlobPackage

-

Trait Implementations§

§

impl Default for BasicBlobPackage

§

fn default() -> BasicBlobPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicBlobPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicBlobPackage

§

fn default() -> BasicBlobPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicBlobPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicFnPackage.html b/casbin/rhai/packages/struct.BasicFnPackage.html index 899da602..a7274c86 100644 --- a/casbin/rhai/packages/struct.BasicFnPackage.html +++ b/casbin/rhai/packages/struct.BasicFnPackage.html @@ -1,14 +1,14 @@ -BasicFnPackage in casbin::rhai::packages - Rust
pub struct BasicFnPackage(_);
Expand description

Package of basic function pointer utilities.

+BasicFnPackage in casbin::rhai::packages - Rust
pub struct BasicFnPackage(/* private fields */);
Expand description

Package of basic function pointer utilities.

Implementations§

§

impl BasicFnPackage

pub fn new() -> BasicFnPackage

Create a new BasicFnPackage

-

Trait Implementations§

§

impl Default for BasicFnPackage

§

fn default() -> BasicFnPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicFnPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicFnPackage

§

fn default() -> BasicFnPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicFnPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicIteratorPackage.html b/casbin/rhai/packages/struct.BasicIteratorPackage.html index 650dbddf..69624685 100644 --- a/casbin/rhai/packages/struct.BasicIteratorPackage.html +++ b/casbin/rhai/packages/struct.BasicIteratorPackage.html @@ -1,14 +1,14 @@ -BasicIteratorPackage in casbin::rhai::packages - Rust
pub struct BasicIteratorPackage(_);
Expand description

Package of basic range iterators

+BasicIteratorPackage in casbin::rhai::packages - Rust
pub struct BasicIteratorPackage(/* private fields */);
Expand description

Package of basic range iterators

Implementations§

§

impl BasicIteratorPackage

pub fn new() -> BasicIteratorPackage

Create a new BasicIteratorPackage

-

Trait Implementations§

§

impl Default for BasicIteratorPackage

§

fn default() -> BasicIteratorPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicIteratorPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicIteratorPackage

§

fn default() -> BasicIteratorPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicIteratorPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicMapPackage.html b/casbin/rhai/packages/struct.BasicMapPackage.html index bb942eef..3db03feb 100644 --- a/casbin/rhai/packages/struct.BasicMapPackage.html +++ b/casbin/rhai/packages/struct.BasicMapPackage.html @@ -1,14 +1,14 @@ -BasicMapPackage in casbin::rhai::packages - Rust
pub struct BasicMapPackage(_);
Expand description

Package of basic object map utilities.

+BasicMapPackage in casbin::rhai::packages - Rust
pub struct BasicMapPackage(/* private fields */);
Expand description

Package of basic object map utilities.

Implementations§

§

impl BasicMapPackage

pub fn new() -> BasicMapPackage

Create a new BasicMapPackage

-

Trait Implementations§

§

impl Default for BasicMapPackage

§

fn default() -> BasicMapPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicMapPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicMapPackage

§

fn default() -> BasicMapPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicMapPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicMathPackage.html b/casbin/rhai/packages/struct.BasicMathPackage.html index 8f3c1f63..18be26a7 100644 --- a/casbin/rhai/packages/struct.BasicMathPackage.html +++ b/casbin/rhai/packages/struct.BasicMathPackage.html @@ -1,14 +1,14 @@ -BasicMathPackage in casbin::rhai::packages - Rust
pub struct BasicMathPackage(_);
Expand description

Basic mathematical package.

+BasicMathPackage in casbin::rhai::packages - Rust
pub struct BasicMathPackage(/* private fields */);
Expand description

Basic mathematical package.

Implementations§

§

impl BasicMathPackage

pub fn new() -> BasicMathPackage

Create a new BasicMathPackage

-

Trait Implementations§

§

impl Default for BasicMathPackage

§

fn default() -> BasicMathPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicMathPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicMathPackage

§

fn default() -> BasicMathPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicMathPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicStringPackage.html b/casbin/rhai/packages/struct.BasicStringPackage.html index f64f0776..3c60ab23 100644 --- a/casbin/rhai/packages/struct.BasicStringPackage.html +++ b/casbin/rhai/packages/struct.BasicStringPackage.html @@ -1,14 +1,14 @@ -BasicStringPackage in casbin::rhai::packages - Rust
pub struct BasicStringPackage(_);
Expand description

Package of basic string utilities (e.g. printing)

+BasicStringPackage in casbin::rhai::packages - Rust
pub struct BasicStringPackage(/* private fields */);
Expand description

Package of basic string utilities (e.g. printing)

Implementations§

§

impl BasicStringPackage

pub fn new() -> BasicStringPackage

Create a new BasicStringPackage

-

Trait Implementations§

§

impl Default for BasicStringPackage

§

fn default() -> BasicStringPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicStringPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicStringPackage

§

fn default() -> BasicStringPackage

Returns the “default value” for a type. Read more
§

impl Package for BasicStringPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BasicTimePackage.html b/casbin/rhai/packages/struct.BasicTimePackage.html index b8946942..5c12821c 100644 --- a/casbin/rhai/packages/struct.BasicTimePackage.html +++ b/casbin/rhai/packages/struct.BasicTimePackage.html @@ -1,14 +1,14 @@ -BasicTimePackage in casbin::rhai::packages - Rust
pub struct BasicTimePackage(_);
Expand description

Package of basic timing utilities.

+BasicTimePackage in casbin::rhai::packages - Rust
pub struct BasicTimePackage(/* private fields */);
Expand description

Package of basic timing utilities.

Implementations§

§

impl BasicTimePackage

pub fn new() -> BasicTimePackage

Create a new BasicTimePackage

-

Trait Implementations§

§

impl Default for BasicTimePackage

§

fn default() -> BasicTimePackage

Returns the “default value” for a type. Read more
§

impl Package for BasicTimePackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BasicTimePackage

§

fn default() -> BasicTimePackage

Returns the “default value” for a type. Read more
§

impl Package for BasicTimePackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.BitFieldPackage.html b/casbin/rhai/packages/struct.BitFieldPackage.html index 79c0b0e7..8ef5c9bc 100644 --- a/casbin/rhai/packages/struct.BitFieldPackage.html +++ b/casbin/rhai/packages/struct.BitFieldPackage.html @@ -1,14 +1,14 @@ -BitFieldPackage in casbin::rhai::packages - Rust
pub struct BitFieldPackage(_);
Expand description

Package of basic bit-field utilities.

+BitFieldPackage in casbin::rhai::packages - Rust
pub struct BitFieldPackage(/* private fields */);
Expand description

Package of basic bit-field utilities.

Implementations§

§

impl BitFieldPackage

pub fn new() -> BitFieldPackage

Create a new BitFieldPackage

-

Trait Implementations§

§

impl Default for BitFieldPackage

§

fn default() -> BitFieldPackage

Returns the “default value” for a type. Read more
§

impl Package for BitFieldPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for BitFieldPackage

§

fn default() -> BitFieldPackage

Returns the “default value” for a type. Read more
§

impl Package for BitFieldPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.CorePackage.html b/casbin/rhai/packages/struct.CorePackage.html index 473aa9bc..c3645c2f 100644 --- a/casbin/rhai/packages/struct.CorePackage.html +++ b/casbin/rhai/packages/struct.CorePackage.html @@ -1,4 +1,4 @@ -CorePackage in casbin::rhai::packages - Rust
pub struct CorePackage(_);
Expand description

Core package containing basic facilities.

+CorePackage in casbin::rhai::packages - Rust
pub struct CorePackage(/* private fields */);
Expand description

Core package containing basic facilities.

Contents

Implementations§

§

impl CorePackage

pub fn new() -> CorePackage

Create a new CorePackage

-

Trait Implementations§

§

impl Default for CorePackage

§

fn default() -> CorePackage

Returns the “default value” for a type. Read more
§

impl Package for CorePackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for CorePackage

§

fn default() -> CorePackage

Returns the “default value” for a type. Read more
§

impl Package for CorePackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.LanguageCorePackage.html b/casbin/rhai/packages/struct.LanguageCorePackage.html index a0b020f0..94dc0125 100644 --- a/casbin/rhai/packages/struct.LanguageCorePackage.html +++ b/casbin/rhai/packages/struct.LanguageCorePackage.html @@ -1,14 +1,14 @@ -LanguageCorePackage in casbin::rhai::packages - Rust
pub struct LanguageCorePackage(_);
Expand description

Package of core language features.

+LanguageCorePackage in casbin::rhai::packages - Rust
pub struct LanguageCorePackage(/* private fields */);
Expand description

Package of core language features.

Implementations§

§

impl LanguageCorePackage

pub fn new() -> LanguageCorePackage

Create a new LanguageCorePackage

-

Trait Implementations§

§

impl Default for LanguageCorePackage

§

fn default() -> LanguageCorePackage

Returns the “default value” for a type. Read more
§

impl Package for LanguageCorePackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for LanguageCorePackage

§

fn default() -> LanguageCorePackage

Returns the “default value” for a type. Read more
§

impl Package for LanguageCorePackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.LogicPackage.html b/casbin/rhai/packages/struct.LogicPackage.html index 1e9adf9f..816c7765 100644 --- a/casbin/rhai/packages/struct.LogicPackage.html +++ b/casbin/rhai/packages/struct.LogicPackage.html @@ -1,14 +1,14 @@ -LogicPackage in casbin::rhai::packages - Rust
pub struct LogicPackage(_);
Expand description

Package of basic logic operators.

+LogicPackage in casbin::rhai::packages - Rust
pub struct LogicPackage(/* private fields */);
Expand description

Package of basic logic operators.

Implementations§

§

impl LogicPackage

pub fn new() -> LogicPackage

Create a new LogicPackage

-

Trait Implementations§

§

impl Default for LogicPackage

§

fn default() -> LogicPackage

Returns the “default value” for a type. Read more
§

impl Package for LogicPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for LogicPackage

§

fn default() -> LogicPackage

Returns the “default value” for a type. Read more
§

impl Package for LogicPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.MoreStringPackage.html b/casbin/rhai/packages/struct.MoreStringPackage.html index 2bb845a6..447c60e8 100644 --- a/casbin/rhai/packages/struct.MoreStringPackage.html +++ b/casbin/rhai/packages/struct.MoreStringPackage.html @@ -1,14 +1,14 @@ -MoreStringPackage in casbin::rhai::packages - Rust
pub struct MoreStringPackage(_);
Expand description

Package of additional string utilities over BasicStringPackage

+MoreStringPackage in casbin::rhai::packages - Rust
pub struct MoreStringPackage(/* private fields */);
Expand description

Package of additional string utilities over BasicStringPackage

Implementations§

§

impl MoreStringPackage

pub fn new() -> MoreStringPackage

Create a new MoreStringPackage

-

Trait Implementations§

§

impl Default for MoreStringPackage

§

fn default() -> MoreStringPackage

Returns the “default value” for a type. Read more
§

impl Package for MoreStringPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for MoreStringPackage

§

fn default() -> MoreStringPackage

Returns the “default value” for a type. Read more
§

impl Package for MoreStringPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/struct.StandardPackage.html b/casbin/rhai/packages/struct.StandardPackage.html index 686bc909..2ef55702 100644 --- a/casbin/rhai/packages/struct.StandardPackage.html +++ b/casbin/rhai/packages/struct.StandardPackage.html @@ -1,4 +1,4 @@ -StandardPackage in casbin::rhai::packages - Rust
pub struct StandardPackage(_);
Expand description

Standard package containing all built-in features.

+StandardPackage in casbin::rhai::packages - Rust
pub struct StandardPackage(/* private fields */);
Expand description

Standard package containing all built-in features.

Contents

Implementations§

§

impl StandardPackage

pub fn new() -> StandardPackage

Create a new StandardPackage

-

Trait Implementations§

§

impl Default for StandardPackage

§

fn default() -> StandardPackage

Returns the “default value” for a type. Read more
§

impl Package for StandardPackage

§

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. -Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Default for StandardPackage

§

fn default() -> StandardPackage

Returns the “default value” for a type. Read more
§

impl Package for StandardPackage

§

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.
§

fn init(lib: &mut Module)

Initialize the package. +Functions should be registered into module here.
§

fn init_engine(_engine: &mut Engine)

Initialize the package with an Engine. Read more
§

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/packages/trait.Package.html b/casbin/rhai/packages/trait.Package.html index 97d906c4..b13cf364 100644 --- a/casbin/rhai/packages/trait.Package.html +++ b/casbin/rhai/packages/trait.Package.html @@ -1,18 +1,18 @@ -Package in casbin::rhai::packages - Rust

Trait casbin::rhai::packages::Package

pub trait Package {
+Package in casbin::rhai::packages - Rust

Trait casbin::rhai::packages::Package

pub trait Package {
     // Required methods
     fn init(module: &mut Module);
-    fn as_shared_module(&self) -> Arc<Module>;
+    fn as_shared_module(&self) -> Arc<Module, Global>;
 
     // Provided methods
     fn init_engine(engine: &mut Engine) { ... }
-    fn register_into_engine(&self, engine: &mut Engine) -> &Self { ... }
+    fn register_into_engine(&self, engine: &mut Engine) -> &Self { ... }
 }
Expand description

Trait that all packages must implement.

Required Methods§

fn init(module: &mut Module)

Initialize the package. Functions should be registered into module here.

-

fn as_shared_module(&self) -> Arc<Module>

Get a reference to a shared module from this package.

+

fn as_shared_module(&self) -> Arc<Module, Global>

Get a reference to a shared module from this package.

Provided Methods§

fn init_engine(engine: &mut Engine)

Initialize the package with an Engine.

Perform tasks such as registering custom operators/syntax.

-

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine.

+

fn register_into_engine(&self, engine: &mut Engine) -> &Self

Register the package with an Engine.

Example
let mut engine = Engine::new_raw();
 let package = CorePackage::new();
diff --git a/casbin/rhai/plugin/attr.export_fn.html b/casbin/rhai/plugin/attr.export_fn.html
index df1ae8b7..cf98ce3b 100644
--- a/casbin/rhai/plugin/attr.export_fn.html
+++ b/casbin/rhai/plugin/attr.export_fn.html
@@ -1,4 +1,4 @@
-export_fn in casbin::rhai::plugin - Rust

Attribute Macro casbin::rhai::plugin::export_fn

#[export_fn]
Expand description

Attribute, when put on a Rust function, turns it into a plugin function.

+export_fn in casbin::rhai::plugin - Rust

Attribute Macro casbin::rhai::plugin::export_fn

#[export_fn]
Expand description

Attribute, when put on a Rust function, turns it into a plugin function.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/plugin/attr.export_module.html b/casbin/rhai/plugin/attr.export_module.html
index 978259de..2822e7fe 100644
--- a/casbin/rhai/plugin/attr.export_module.html
+++ b/casbin/rhai/plugin/attr.export_module.html
@@ -1,4 +1,4 @@
-export_module in casbin::rhai::plugin - Rust

Attribute Macro casbin::rhai::plugin::export_module

#[export_module]
Expand description

Attribute, when put on a Rust module, turns it into a plugin module.

+export_module in casbin::rhai::plugin - Rust

Attribute Macro casbin::rhai::plugin::export_module

#[export_module]
Expand description

Attribute, when put on a Rust module, turns it into a plugin module.

Usage

use rhai::plugin::*;
 
diff --git a/casbin/rhai/plugin/enum.CallableFunction.html b/casbin/rhai/plugin/enum.CallableFunction.html
index 70870c8a..2add5725 100644
--- a/casbin/rhai/plugin/enum.CallableFunction.html
+++ b/casbin/rhai/plugin/enum.CallableFunction.html
@@ -1,63 +1,65 @@
-CallableFunction in casbin::rhai::plugin - Rust
pub enum CallableFunction {
+CallableFunction in casbin::rhai::plugin - Rust
pub enum CallableFunction {
     Pure {
-        func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Send + Sync>,
-        has_context: bool,
-        is_pure: bool,
+        func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Sync + Send, Global>,
+        has_context: bool,
+        is_pure: bool,
     },
     Method {
-        func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Send + Sync>,
-        has_context: bool,
-        is_pure: bool,
+        func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Sync + Send, Global>,
+        has_context: bool,
+        is_pure: bool,
     },
     Iterator {
-        func: Arc<dyn Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + Send + Sync>,
+        func: Arc<dyn Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + Sync + Send, Global>,
     },
     Plugin {
-        func: Arc<dyn PluginFunction + Send + Sync>,
+        func: Arc<dyn PluginFunction + Sync + Send, Global>,
     },
 }
Expand description

(internals) A type encapsulating a function callable by Rhai. Exported under the internals feature only.

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Pure

Fields

§func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Send + Sync>

Shared function pointer.

-
§has_context: bool

Does the function take a NativeCallContext parameter?

-
§is_pure: bool

This is a dummy field and is not used.

+

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Pure

Fields

§func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Sync + Send, Global>

Shared function pointer.

+
§has_context: bool

Does the function take a NativeCallContext parameter?

+
§is_pure: bool

This is a dummy field and is not used.

A pure native Rust function with all arguments passed by value.

-
§

Method

Fields

§func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Send + Sync>

Shared function pointer.

-
§has_context: bool

Does the function take a NativeCallContext parameter?

-
§is_pure: bool

Allow operating on constants?

+
§

Method

Fields

§func: Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Sync + Send, Global>

Shared function pointer.

+
§has_context: bool

Does the function take a NativeCallContext parameter?

+
§is_pure: bool

Allow operating on constants?

A native Rust object method with the first argument passed by reference, and the rest passed by value.

-
§

Iterator

Fields

§func: Arc<dyn Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + Send + Sync>

Shared function pointer.

+
§

Iterator

Fields

§func: Arc<dyn Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + Sync + Send, Global>

Shared function pointer.

An iterator function.

-
§

Plugin

Fields

§func: Arc<dyn PluginFunction + Send + Sync>

Shared function pointer.

+
§

Plugin

Fields

§func: Arc<dyn PluginFunction + Sync + Send, Global>

Shared function pointer.

A plugin function,

-

Implementations§

§

impl CallableFunction

pub fn is_pure(&self) -> bool

Is this a pure native Rust function?

-

pub fn is_method(&self) -> bool

Is this a native Rust method function?

-

pub const fn is_iter(&self) -> bool

Is this an iterator function?

-

pub const fn is_script(&self) -> bool

Is this a script-defined function?

-

pub const fn is_plugin_fn(&self) -> bool

Is this a plugin function?

-

pub const fn is_native(&self) -> bool

Is this a native Rust function?

-

pub fn has_context(&self) -> bool

Is there a NativeCallContext parameter?

+

Implementations§

§

impl CallableFunction

pub fn is_pure(&self) -> bool

Is this a pure native Rust function?

+

pub fn is_method(&self) -> bool

Is this a native Rust method function?

+

pub const fn is_iter(&self) -> bool

Is this an iterator function?

+

pub const fn is_script(&self) -> bool

Is this a script-defined function?

+

pub const fn is_plugin_fn(&self) -> bool

Is this a plugin function?

+

pub const fn is_native(&self) -> bool

Is this a native Rust function?

+

pub fn has_context(&self) -> bool

Is there a NativeCallContext parameter?

pub fn access(&self) -> FnAccess

Get the access mode.

pub fn get_native_fn( &self -) -> Option<&Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Send + Sync>>

Get a shared reference to a native Rust function.

-

pub fn get_encapsulated_environ(&self) -> Option<&EncapsulatedEnviron>

Get a reference to the shared encapsulated environment of the function definition.

+) -> Option<&Arc<dyn Fn(Option<NativeCallContext<'_>>, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult, Global>> + Sync + Send, Global>>

Get a shared reference to a native Rust function.

+

pub fn get_encapsulated_environ(&self) -> Option<&EncapsulatedEnviron>

Get a reference to the shared encapsulated environment of the function definition.

Not available under no_function or no_module.

pub fn get_iter_fn( &self -) -> Option<&(dyn Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + Send + Sync + 'static)>

Get a reference to an iterator function.

-

pub fn get_plugin_fn(&self) -> Option<&Arc<dyn PluginFunction + Send + Sync>>

Get a shared reference to a plugin function.

-

Trait Implementations§

§

impl Clone for CallableFunction

§

fn clone(&self) -> CallableFunction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CallableFunction

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for CallableFunction

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<Arc<dyn PluginFunction + Send + Sync>> for CallableFunction

§

fn from(func: Arc<dyn PluginFunction + Send + Sync>) -> CallableFunction

Converts to this type from the input type.
§

impl<T> From<T> for CallableFunctionwhere - T: PluginFunction + 'static + SendSync,

§

fn from(func: T) -> CallableFunction

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+) -> Option<&(dyn Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + Sync + Send + 'static)>

Get a reference to an iterator function.

+

pub fn get_plugin_fn( + &self +) -> Option<&Arc<dyn PluginFunction + Sync + Send, Global>>

Get a shared reference to a plugin function.

+

Trait Implementations§

§

impl Clone for CallableFunction

§

fn clone(&self) -> CallableFunction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CallableFunction

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for CallableFunction

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<Arc<dyn PluginFunction + Sync + Send, Global>> for CallableFunction

§

fn from(func: Arc<dyn PluginFunction + Sync + Send, Global>) -> CallableFunction

Converts to this type from the input type.
§

impl<T> From<T> for CallableFunctionwhere + T: PluginFunction + 'static + SendSync,

§

fn from(func: T) -> CallableFunction

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/plugin/enum.EvalAltResult.html b/casbin/rhai/plugin/enum.EvalAltResult.html index 273977c3..3df6b39c 100644 --- a/casbin/rhai/plugin/enum.EvalAltResult.html +++ b/casbin/rhai/plugin/enum.EvalAltResult.html @@ -1,95 +1,100 @@ -EvalAltResult in casbin::rhai::plugin - Rust
pub enum EvalAltResult {
-
Show 33 variants ErrorSystem(String, Box<dyn Error + Send + Sync, Global>), +EvalAltResult in casbin::rhai::plugin - Rust
pub enum EvalAltResult {
+
Show 35 variants ErrorSystem(String, Box<dyn Error + Sync + Send, Global>), ErrorParsing(ParseErrorType, Position), - ErrorVariableExists(String, Position), - ErrorForbiddenVariable(String, Position), - ErrorVariableNotFound(String, Position), - ErrorPropertyNotFound(String, Position), + ErrorVariableExists(String, Position), + ErrorForbiddenVariable(String, Position), + ErrorVariableNotFound(String, Position), + ErrorPropertyNotFound(String, Position), ErrorIndexNotFound(Dynamic, Position), - ErrorFunctionNotFound(String, Position), - ErrorModuleNotFound(String, Position), - ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position), - ErrorInModule(String, Box<EvalAltResult, Global>, Position), + ErrorFunctionNotFound(String, Position), + ErrorModuleNotFound(String, Position), + ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position), + ErrorInModule(String, Box<EvalAltResult, Global>, Position), ErrorUnboundThis(Position), - ErrorMismatchDataType(String, String, Position), - ErrorMismatchOutputType(String, String, Position), - ErrorIndexingType(String, Position), - ErrorArrayBounds(usize, i32, Position), - ErrorStringBounds(usize, i32, Position), - ErrorBitFieldBounds(usize, i32, Position), + ErrorMismatchDataType(String, String, Position), + ErrorMismatchOutputType(String, String, Position), + ErrorIndexingType(String, Position), + ErrorArrayBounds(usize, i32, Position), + ErrorStringBounds(usize, i32, Position), + ErrorBitFieldBounds(usize, i32, Position), ErrorFor(Position), - ErrorDataRace(String, Position), - ErrorNonPureMethodCallOnConstant(String, Position), - ErrorAssignmentToConstant(String, Position), - ErrorDotExpr(String, Position), - ErrorArithmetic(String, Position), + ErrorDataRace(String, Position), + ErrorNonPureMethodCallOnConstant(String, Position), + ErrorAssignmentToConstant(String, Position), + ErrorDotExpr(String, Position), + ErrorArithmetic(String, Position), ErrorTooManyOperations(Position), + ErrorTooManyVariables(Position), ErrorTooManyModules(Position), ErrorStackOverflow(Position), - ErrorDataTooLarge(String, Position), + ErrorDataTooLarge(String, Position), ErrorTerminated(Dynamic, Position), - ErrorCustomSyntax(String, Vec<String, Global>, Position), + ErrorCustomSyntax(String, Vec<String, Global>, Position), ErrorRuntime(Dynamic, Position), - LoopBreak(bool, Dynamic, Position), + LoopBreak(bool, Dynamic, Position), Return(Dynamic, Position), + Exit(Dynamic, Position),
}
Expand description

Evaluation result.

All wrapped Position values represent the location in the script where the error occurs.

Some errors never appear when certain features are turned on. They still exist so that the application can turn features on and off without going through massive code changes to remove/add back enum variants in match statements.

Thread Safety

-

Currently, EvalAltResult is neither Send nor Sync. -Turn on the sync feature to make it Send + Sync.

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ErrorSystem(String, Box<dyn Error + Send + Sync, Global>)

System error. Wrapped values are the error message and the internal error.

+

Currently, EvalAltResult is neither Send nor Sync. +Turn on the sync feature to make it Send + Sync.

+

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ErrorSystem(String, Box<dyn Error + Sync + Send, Global>)

System error. Wrapped values are the error message and the internal error.

§

ErrorParsing(ParseErrorType, Position)

Syntax error.

-
§

ErrorVariableExists(String, Position)

Shadowing of an existing variable disallowed. Wrapped value is the variable name.

-
§

ErrorForbiddenVariable(String, Position)

Forbidden variable name. Wrapped value is the variable name.

-
§

ErrorVariableNotFound(String, Position)

Access of an unknown variable. Wrapped value is the variable name.

-
§

ErrorPropertyNotFound(String, Position)

Access of an unknown object map property. Wrapped value is the property name.

+
§

ErrorVariableExists(String, Position)

Shadowing of an existing variable disallowed. Wrapped value is the variable name.

+
§

ErrorForbiddenVariable(String, Position)

Forbidden variable name. Wrapped value is the variable name.

+
§

ErrorVariableNotFound(String, Position)

Access of an unknown variable. Wrapped value is the variable name.

+
§

ErrorPropertyNotFound(String, Position)

Access of an unknown object map property. Wrapped value is the property name.

§

ErrorIndexNotFound(Dynamic, Position)

Access of an invalid index. Wrapped value is the index name.

-
§

ErrorFunctionNotFound(String, Position)

Call to an unknown function. Wrapped value is the function signature.

-
§

ErrorModuleNotFound(String, Position)

Usage of an unknown module. Wrapped value is the module name.

-
§

ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position)

An error has occurred inside a called function. +

§

ErrorFunctionNotFound(String, Position)

Call to an unknown function. Wrapped value is the function signature.

+
§

ErrorModuleNotFound(String, Position)

Usage of an unknown module. Wrapped value is the module name.

+
§

ErrorInFunctionCall(String, String, Box<EvalAltResult, Global>, Position)

An error has occurred inside a called function. Wrapped values are the function name, function source, and the interior error.

-
§

ErrorInModule(String, Box<EvalAltResult, Global>, Position)

An error has occurred while loading a module. +

§

ErrorInModule(String, Box<EvalAltResult, Global>, Position)

An error has occurred while loading a module. Wrapped value are the module name and the interior error.

§

ErrorUnboundThis(Position)

Access to this that is not bound.

-
§

ErrorMismatchDataType(String, String, Position)

Data is not of the required type. +

§

ErrorMismatchDataType(String, String, Position)

Data is not of the required type. Wrapped values are the type requested and type of the actual result.

-
§

ErrorMismatchOutputType(String, String, Position)

Returned type is not the same as the required output type. +

§

ErrorMismatchOutputType(String, String, Position)

Returned type is not the same as the required output type. Wrapped values are the type requested and type of the actual result.

-
§

ErrorIndexingType(String, Position)

Trying to index into a type that has no indexer function defined. Wrapped value is the type name.

-
§

ErrorArrayBounds(usize, i32, Position)

Array access out-of-bounds. +

§

ErrorIndexingType(String, Position)

Trying to index into a type that has no indexer function defined. Wrapped value is the type name.

+
§

ErrorArrayBounds(usize, i32, Position)

Array access out-of-bounds. Wrapped values are the current number of elements in the array and the index number.

-
§

ErrorStringBounds(usize, i32, Position)

String indexing out-of-bounds. +

§

ErrorStringBounds(usize, i32, Position)

String indexing out-of-bounds. Wrapped values are the current number of characters in the string and the index number.

-
§

ErrorBitFieldBounds(usize, i32, Position)

Bit-field indexing out-of-bounds. +

§

ErrorBitFieldBounds(usize, i32, Position)

Bit-field indexing out-of-bounds. Wrapped values are the current number of bits in the bit-field and the index number.

§

ErrorFor(Position)

The for statement encounters a type that is not iterable.

-
§

ErrorDataRace(String, Position)

Data race detected when accessing a variable. Wrapped value is the variable name.

-
§

ErrorNonPureMethodCallOnConstant(String, Position)

Calling a non-pure method on a constant. Wrapped value is the function name.

-
§

ErrorAssignmentToConstant(String, Position)

Assignment to a constant variable. Wrapped value is the variable name.

-
§

ErrorDotExpr(String, Position)

Inappropriate property access. Wrapped value is the property name.

-
§

ErrorArithmetic(String, Position)

Arithmetic error encountered. Wrapped value is the error message.

+
§

ErrorDataRace(String, Position)

Data race detected when accessing a variable. Wrapped value is the variable name.

+
§

ErrorNonPureMethodCallOnConstant(String, Position)

Calling a non-pure method on a constant. Wrapped value is the function name.

+
§

ErrorAssignmentToConstant(String, Position)

Assignment to a constant variable. Wrapped value is the variable name.

+
§

ErrorDotExpr(String, Position)

Inappropriate property access. Wrapped value is the property name.

+
§

ErrorArithmetic(String, Position)

Arithmetic error encountered. Wrapped value is the error message.

§

ErrorTooManyOperations(Position)

Number of operations over maximum limit.

+
§

ErrorTooManyVariables(Position)

Number of variables over maximum limit.

§

ErrorTooManyModules(Position)

Modules over maximum limit.

§

ErrorStackOverflow(Position)

Call stack over maximum limit.

-
§

ErrorDataTooLarge(String, Position)

Data value over maximum size limit. Wrapped value is the type name.

+
§

ErrorDataTooLarge(String, Position)

Data value over maximum size limit. Wrapped value is the type name.

§

ErrorTerminated(Dynamic, Position)

The script is prematurely terminated. Wrapped value is the termination token.

-
§

ErrorCustomSyntax(String, Vec<String, Global>, Position)

Error encountered for a custom syntax. Wrapped values are the error message and +

§

ErrorCustomSyntax(String, Vec<String, Global>, Position)

Error encountered for a custom syntax. Wrapped values are the error message and custom syntax symbols stream.

Normally this should never happen, unless an AST is compiled on one Engine but evaluated on another unrelated Engine.

§

ErrorRuntime(Dynamic, Position)

Run-time error encountered. Wrapped value is the error token.

-
§

LoopBreak(bool, Dynamic, Position)

Breaking out of loops - not an error if within a loop. +

§

LoopBreak(bool, Dynamic, Position)

Breaking out of loops - not an error if within a loop. The wrapped value, if true, means breaking clean out of the loop (i.e. a break statement). The wrapped value, if false, means breaking the current context (i.e. a continue statement).

§

Return(Dynamic, Position)

Not an error: Value returned from a script via the return keyword. Wrapped value is the result value.

-

Implementations§

§

impl EvalAltResult

pub const fn is_pseudo_error(&self) -> bool

Is this a pseudo error? A pseudo error is one that does not occur naturally.

-

LoopBreak and Return are pseudo errors.

-

pub const fn is_catchable(&self) -> bool

Can this error be caught?

-

pub const fn is_system_exception(&self) -> bool

Is this error a system exception?

+
§

Exit(Dynamic, Position)

Not an error: Value returned from a script via the exit function. +Wrapped value is the exit value.

+

Implementations§

§

impl EvalAltResult

pub const fn is_pseudo_error(&self) -> bool

Is this a pseudo error? A pseudo error is one that does not occur naturally.

+

LoopBreak, Return and Exit are pseudo errors.

+

pub const fn is_catchable(&self) -> bool

Can this error be caught?

+

pub const fn is_system_exception(&self) -> bool

Is this error a system exception?

pub fn unwrap_inner(&self) -> &EvalAltResult

Unwrap this error and get the very base error.

pub const fn position(&self) -> Position

Get the position of this error.

pub fn clear_position(&mut self) -> &mut EvalAltResult

Remove the position information from this error.

@@ -97,18 +102,16 @@

Thread Safety

pub fn take_position(&mut self) -> Position

Remove the position information from this error and return it.

The position of this error is set to NONE afterwards.

pub fn set_position(&mut self, new_position: Position) -> &mut EvalAltResult

Override the position of this error.

-

Trait Implementations§

§

impl Debug for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for EvalAltResult

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ParseError> for EvalAltResult

§

fn from(err: ParseError) -> EvalAltResult

Converts to this type from the input type.
§

impl From<ParseErrorType> for EvalAltResult

§

fn from(err: ParseErrorType) -> EvalAltResult

Converts to this type from the input type.
§

impl<T> From<T> for EvalAltResultwhere - T: AsRef<str>,

§

fn from(err: T) -> EvalAltResult

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

§

impl Debug for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for EvalAltResult

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for EvalAltResult

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<ParseError> for EvalAltResult

§

fn from(err: ParseError) -> EvalAltResult

Converts to this type from the input type.
§

impl From<ParseErrorType> for EvalAltResult

§

fn from(err: ParseErrorType) -> EvalAltResult

Converts to this type from the input type.
§

impl<T> From<T> for EvalAltResultwhere + T: AsRef<str>,

§

fn from(err: T) -> EvalAltResult

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/casbin/rhai/plugin/enum.FnAccess.html b/casbin/rhai/plugin/enum.FnAccess.html index 857ae5cc..0a053749 100644 --- a/casbin/rhai/plugin/enum.FnAccess.html +++ b/casbin/rhai/plugin/enum.FnAccess.html @@ -1,41 +1,49 @@ -FnAccess in casbin::rhai::plugin - Rust

Enum casbin::rhai::plugin::FnAccess

pub enum FnAccess {
+FnAccess in casbin::rhai::plugin - Rust

Enum casbin::rhai::plugin::FnAccess

pub enum FnAccess {
     Private,
     Public,
 }
Expand description

A type representing the access mode of a function.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Private

Private function.

§

Public

Public function.

-

Implementations§

§

impl FnAccess

pub const fn is_private(self) -> bool

Is this function private?

-

pub const fn is_public(self) -> bool

Is this function public?

-

Trait Implementations§

§

impl Clone for FnAccess

§

fn clone(&self) -> FnAccess

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnAccess

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for FnAccess

§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnAccess

§

fn cmp(&self, other: &FnAccess) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnAccess> for FnAccess

§

fn eq(&self, other: &FnAccess) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnAccess> for FnAccess

§

fn partial_cmp(&self, other: &FnAccess) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Copy for FnAccess

§

impl Eq for FnAccess

§

impl StructuralEq for FnAccess

§

impl StructuralPartialEq for FnAccess

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

§

impl FnAccess

pub const fn is_private(self) -> bool

Is this function private?

+

pub const fn is_public(self) -> bool

Is this function public?

+

Trait Implementations§

§

impl Clone for FnAccess

§

fn clone(&self) -> FnAccess

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnAccess

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for FnAccess

§

fn deserialize<__D>( + __deserializer: __D +) -> Result<FnAccess, <__D as Deserializer<'de>>::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Hash for FnAccess

§

fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnAccess

§

fn cmp(&self, other: &FnAccess) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnAccess> for FnAccess

§

fn eq(&self, other: &FnAccess) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnAccess> for FnAccess

§

fn partial_cmp(&self, other: &FnAccess) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
§

impl Serialize for FnAccess

§

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 Copy for FnAccess

§

impl Eq for FnAccess

§

impl StructuralEq for FnAccess

§

impl StructuralPartialEq for FnAccess

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/casbin/rhai/plugin/enum.FnNamespace.html b/casbin/rhai/plugin/enum.FnNamespace.html index cba2f1aa..03675ea8 100644 --- a/casbin/rhai/plugin/enum.FnNamespace.html +++ b/casbin/rhai/plugin/enum.FnNamespace.html @@ -1,42 +1,42 @@ -FnNamespace in casbin::rhai::plugin - Rust
pub enum FnNamespace {
+FnNamespace in casbin::rhai::plugin - Rust
pub enum FnNamespace {
     Internal,
     Global,
 }
Expand description

A type representing the namespace of a function.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Internal

Module namespace only.

Ignored under no_module.

§

Global

Expose to global namespace.

-

Implementations§

§

impl FnNamespace

pub const fn is_module_namespace(self) -> bool

Is this a module namespace?

-

pub const fn is_global_namespace(self) -> bool

Is this a global namespace?

-

Trait Implementations§

§

impl Clone for FnNamespace

§

fn clone(&self) -> FnNamespace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnNamespace

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for FnNamespace

§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnNamespace

§

fn cmp(&self, other: &FnNamespace) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnNamespace> for FnNamespace

§

fn eq(&self, other: &FnNamespace) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnNamespace> for FnNamespace

§

fn partial_cmp(&self, other: &FnNamespace) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Copy for FnNamespace

§

impl Eq for FnNamespace

§

impl StructuralEq for FnNamespace

§

impl StructuralPartialEq for FnNamespace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere - T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere - T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

§

impl FnNamespace

pub const fn is_module_namespace(self) -> bool

Is this a module namespace?

+

pub const fn is_global_namespace(self) -> bool

Is this a global namespace?

+

Trait Implementations§

§

impl Clone for FnNamespace

§

fn clone(&self) -> FnNamespace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for FnNamespace

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for FnNamespace

§

fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for FnNamespace

§

fn cmp(&self, other: &FnNamespace) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
§

impl PartialEq<FnNamespace> for FnNamespace

§

fn eq(&self, other: &FnNamespace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd<FnNamespace> for FnNamespace

§

fn partial_cmp(&self, other: &FnNamespace) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
§

impl Copy for FnNamespace

§

impl Eq for FnNamespace

§

impl StructuralEq for FnNamespace

§

impl StructuralPartialEq for FnNamespace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere + T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

§

impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

source§

impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/casbin/rhai/plugin/index.html b/casbin/rhai/plugin/index.html index 9993786b..e5276fb6 100644 --- a/casbin/rhai/plugin/index.html +++ b/casbin/rhai/plugin/index.html @@ -1,4 +1,4 @@ -casbin::rhai::plugin - Rust

Module casbin::rhai::plugin

Expand description

Module defining macros for developing plugins.

+casbin::rhai::plugin - Rust

Module casbin::rhai::plugin

Expand description

Module defining macros for developing plugins.

Modules

  • Basic functions for dealing with memory.

Macros

Structs

  • Dynamic type containing any value.
  • Rhai main scripting engine.
  • The system immutable string type.
  • A module which may contain variables, sub-modules, external Rust functions, and/or script-defined functions.
  • Context of a native Rust function call.
  • A location (line number + character position) in the input script.
  • A TypeId represents a globally unique identifier for a type.

Enums

  • (internals) A type encapsulating a function callable by Rhai. -Exported under the internals feature only.
  • Evaluation result.
  • A type representing the access mode of a function.
  • A type representing the namespace of a function.

Traits

Type Definitions

Attribute Macros

  • Attribute, when put on a Rust function, turns it into a plugin function.
  • Attribute, when put on a Rust module, turns it into a plugin module.
\ No newline at end of file +Exported under the internals feature only.
  • Evaluation result.
  • A type representing the access mode of a function.
  • A type representing the namespace of a function.
  • Traits

    Type Aliases

    Attribute Macros

    • Attribute, when put on a Rust function, turns it into a plugin function.
    • Attribute, when put on a Rust module, turns it into a plugin module.
    \ No newline at end of file diff --git a/casbin/rhai/plugin/macro.combine_with_exported_module.html b/casbin/rhai/plugin/macro.combine_with_exported_module.html index 4f221796..48c53590 100644 --- a/casbin/rhai/plugin/macro.combine_with_exported_module.html +++ b/casbin/rhai/plugin/macro.combine_with_exported_module.html @@ -1,4 +1,4 @@ -combine_with_exported_module in casbin::rhai::plugin - Rust
    combine_with_exported_module!() { /* proc-macro */ }
    Expand description

    Macro to combine a plugin module into an existing module.

    +combine_with_exported_module in casbin::rhai::plugin - Rust
    combine_with_exported_module!() { /* proc-macro */ }
    Expand description

    Macro to combine a plugin module into an existing module.

    Functions and variables in the plugin module overrides any existing similarly-named functions and variables in the target module.

    This call is intended to be used within the [def_package!][crate::def_package] macro to define diff --git a/casbin/rhai/plugin/macro.exported_module.html b/casbin/rhai/plugin/macro.exported_module.html index 8fc6014b..8a21b1fc 100644 --- a/casbin/rhai/plugin/macro.exported_module.html +++ b/casbin/rhai/plugin/macro.exported_module.html @@ -1,4 +1,4 @@ -exported_module in casbin::rhai::plugin - Rust

    exported_module!() { /* proc-macro */ }
    Expand description

    Macro to generate a Rhai Module from a plugin module defined via #[export_module].

    +exported_module in casbin::rhai::plugin - Rust
    exported_module!() { /* proc-macro */ }
    Expand description

    Macro to generate a Rhai Module from a plugin module defined via #[export_module].

    Usage

    use rhai::plugin::*;
     
    diff --git a/casbin/rhai/plugin/macro.register_exported_fn.html b/casbin/rhai/plugin/macro.register_exported_fn.html
    index 80ff9d3e..5cbe79e9 100644
    --- a/casbin/rhai/plugin/macro.register_exported_fn.html
    +++ b/casbin/rhai/plugin/macro.register_exported_fn.html
    @@ -1,4 +1,4 @@
    -register_exported_fn in casbin::rhai::plugin - Rust
    register_exported_fn!() { /* proc-macro */ }
    Expand description

    Macro to register a plugin function (defined via #[export_fn]) into an Engine.

    +register_exported_fn in casbin::rhai::plugin - Rust
    register_exported_fn!() { /* proc-macro */ }
    Expand description

    Macro to register a plugin function (defined via #[export_fn]) into an Engine.

    Usage

    use rhai::plugin::*;
     
    diff --git a/casbin/rhai/plugin/macro.set_exported_fn.html b/casbin/rhai/plugin/macro.set_exported_fn.html
    index 05aade3b..08e2e855 100644
    --- a/casbin/rhai/plugin/macro.set_exported_fn.html
    +++ b/casbin/rhai/plugin/macro.set_exported_fn.html
    @@ -1,4 +1,4 @@
    -set_exported_fn in casbin::rhai::plugin - Rust
    set_exported_fn!() { /* proc-macro */ }
    Expand description

    Macro to register a plugin function into a Rhai Module.

    +set_exported_fn in casbin::rhai::plugin - Rust
    set_exported_fn!() { /* proc-macro */ }
    Expand description

    Macro to register a plugin function into a Rhai Module.

    Usage

    use rhai::plugin::*;
     
    diff --git a/casbin/rhai/plugin/macro.set_exported_global_fn.html b/casbin/rhai/plugin/macro.set_exported_global_fn.html
    index f2ea2f0f..f6a8a4d4 100644
    --- a/casbin/rhai/plugin/macro.set_exported_global_fn.html
    +++ b/casbin/rhai/plugin/macro.set_exported_global_fn.html
    @@ -1,4 +1,4 @@
    -set_exported_global_fn in casbin::rhai::plugin - Rust
    set_exported_global_fn!() { /* proc-macro */ }
    Expand description

    Macro to register a plugin function into a Rhai Module and expose it globally.

    +set_exported_global_fn in casbin::rhai::plugin - Rust
    set_exported_global_fn!() { /* proc-macro */ }
    Expand description

    Macro to register a plugin function into a Rhai Module and expose it globally.

    Usage

    use rhai::plugin::*;
     
    diff --git a/casbin/rhai/plugin/mem/fn.align_of.html b/casbin/rhai/plugin/mem/fn.align_of.html
    index cd4a9e1a..f0e70e9e 100644
    --- a/casbin/rhai/plugin/mem/fn.align_of.html
    +++ b/casbin/rhai/plugin/mem/fn.align_of.html
    @@ -1,4 +1,4 @@
    -align_of in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::align_of

    1.0.0 (const: 1.24.0) · source ·
    pub const fn align_of<T>() -> usize
    Expand description

    Returns the ABI-required minimum alignment of a type in bytes.

    +align_of in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::align_of

    1.0.0 (const: 1.24.0) · source ·
    pub const fn align_of<T>() -> usize
    Expand description

    Returns the ABI-required minimum alignment of a type in bytes.

    Every reference to a value of the type T must be a multiple of this number.

    This is the alignment used for struct fields. It may be smaller than the preferred alignment.

    Examples

    diff --git a/casbin/rhai/plugin/mem/fn.align_of_val.html b/casbin/rhai/plugin/mem/fn.align_of_val.html index f8bc9738..410ffdc5 100644 --- a/casbin/rhai/plugin/mem/fn.align_of_val.html +++ b/casbin/rhai/plugin/mem/fn.align_of_val.html @@ -1,5 +1,5 @@ -align_of_val in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::align_of_val

    1.0.0 (const: unstable) · source ·
    pub fn align_of_val<T>(val: &T) -> usizewhere
    -    T: ?Sized,
    Expand description

    Returns the ABI-required minimum alignment of the type of the value that val points to in +align_of_val in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::align_of_val

    1.0.0 (const: unstable) · source ·
    pub fn align_of_val<T>(val: &T) -> usizewhere
    +    T: ?Sized,
    Expand description

    Returns the ABI-required minimum alignment of the type of the value that val points to in bytes.

    Every reference to a value of the type T must be a multiple of this number.

    Examples

    diff --git a/casbin/rhai/plugin/mem/fn.align_of_val_raw.html b/casbin/rhai/plugin/mem/fn.align_of_val_raw.html index d0871f9e..c03cf1d3 100644 --- a/casbin/rhai/plugin/mem/fn.align_of_val_raw.html +++ b/casbin/rhai/plugin/mem/fn.align_of_val_raw.html @@ -1,5 +1,5 @@ -align_of_val_raw in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::align_of_val_raw

    const: unstable · source ·
    pub unsafe fn align_of_val_raw<T>(val: *const T) -> usizewhere
    -    T: ?Sized,
    🔬This is a nightly-only experimental API. (layout_for_ptr)
    Expand description

    Returns the ABI-required minimum alignment of the type of the value that val points to in +align_of_val_raw in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::align_of_val_raw

    const: unstable · source ·
    pub unsafe fn align_of_val_raw<T>(val: *const T) -> usizewhere
    +    T: ?Sized,
    🔬This is a nightly-only experimental API. (layout_for_ptr)
    Expand description

    Returns the ABI-required minimum alignment of the type of the value that val points to in bytes.

    Every reference to a value of the type T must be a multiple of this number.

    Safety

    @@ -8,7 +8,7 @@

    Safety

  • If T is Sized, this function is always safe to call.
  • If the unsized tail of T is:
      -
    • a slice, then the length of the slice tail must be an initialized +
    • a slice, then the length of the slice tail must be an initialized integer, and the size of the entire value (dynamic tail length + statically sized prefix) must fit in isize.
    • a trait object, then the vtable part of the pointer must point diff --git a/casbin/rhai/plugin/mem/fn.copy.html b/casbin/rhai/plugin/mem/fn.copy.html index d792fd16..43004760 100644 --- a/casbin/rhai/plugin/mem/fn.copy.html +++ b/casbin/rhai/plugin/mem/fn.copy.html @@ -1,5 +1,5 @@ -copy in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::copy

      source ·
      pub const fn copy<T>(x: &T) -> Twhere
      -    T: Copy,
      🔬This is a nightly-only experimental API. (mem_copy_fn)
      Expand description

      Bitwise-copies a value.

      +copy in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::copy

      source ·
      pub const fn copy<T>(x: &T) -> Twhere
      +    T: Copy,
      🔬This is a nightly-only experimental API. (mem_copy_fn)
      Expand description

      Bitwise-copies a value.

      This function is not magic; it is literally defined as

      pub fn copy<T: Copy>(x: &T) -> T { *x }
      diff --git a/casbin/rhai/plugin/mem/fn.discriminant.html b/casbin/rhai/plugin/mem/fn.discriminant.html index 50741f8f..8ea1ca6c 100644 --- a/casbin/rhai/plugin/mem/fn.discriminant.html +++ b/casbin/rhai/plugin/mem/fn.discriminant.html @@ -1,10 +1,14 @@ -discriminant in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::discriminant

      1.21.0 (const: unstable) · source ·
      pub fn discriminant<T>(v: &T) -> Discriminant<T>
      Expand description

      Returns a value uniquely identifying the enum variant in v.

      +discriminant in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::discriminant

      1.21.0 (const: unstable) · source ·
      pub fn discriminant<T>(v: &T) -> Discriminant<T>
      Expand description

      Returns a value uniquely identifying the enum variant in v.

      If T is not an enum, calling this function will not result in undefined behavior, but the return value is unspecified.

      Stability

      The discriminant of an enum variant may change if the enum definition changes. A discriminant of some variant will not change between compilations with the same compiler. See the Reference for more information.

      +

      The value of a Discriminant<T> is independent of any lifetimes in T. As such, reading +or writing a Discriminant<Foo<'a>> as a Discriminant<Foo<'b>> (whether via transmute or +otherwise) is always sound. Note that this is not true for other kinds of generic +parameters; Discriminant<Foo<A>> and Discriminant<Foo<B>> might be incompatible.

      Examples

      This can be used to compare enums that carry data, while disregarding the actual data:

      diff --git a/casbin/rhai/plugin/mem/fn.drop.html b/casbin/rhai/plugin/mem/fn.drop.html index caafec80..3164173b 100644 --- a/casbin/rhai/plugin/mem/fn.drop.html +++ b/casbin/rhai/plugin/mem/fn.drop.html @@ -1,5 +1,5 @@ -drop in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::drop

      1.0.0 · source ·
      pub fn drop<T>(_x: T)
      Expand description

      Disposes of a value.

      -

      This does so by calling the argument’s implementation of Drop.

      +drop in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::drop

      1.0.0 · source ·
      pub fn drop<T>(_x: T)
      Expand description

      Disposes of a value.

      +

      This does so by calling the argument’s implementation of Drop.

      This effectively does nothing for types which implement Copy, e.g. integers. Such values are copied and then moved into the function, so the value persists after this function call.

      @@ -14,8 +14,8 @@

      Examples

      let v = vec![1, 2, 3];
       
       drop(v); // explicitly drop the vector
      -

      Since RefCell enforces the borrow rules at runtime, drop can -release a RefCell borrow:

      +

      Since RefCell enforces the borrow rules at runtime, drop can +release a RefCell borrow:

      use std::cell::RefCell;
       
      @@ -28,7 +28,7 @@ 

      Examples

      let borrow = x.borrow(); println!("{}", *borrow);
      -

      Integers and other types implementing Copy are unaffected by drop.

      +

      Integers and other types implementing Copy are unaffected by drop.

      #[derive(Copy, Clone)]
       struct Foo(u8);
      diff --git a/casbin/rhai/plugin/mem/fn.forget.html b/casbin/rhai/plugin/mem/fn.forget.html
      index db3d1ab4..1e79dbd0 100644
      --- a/casbin/rhai/plugin/mem/fn.forget.html
      +++ b/casbin/rhai/plugin/mem/fn.forget.html
      @@ -1,4 +1,4 @@
      -forget in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::forget

      1.0.0 (const: 1.46.0) · source ·
      pub const fn forget<T>(t: T)
      Expand description

      Takes ownership and “forgets” about the value without running its destructor.

      +forget in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::forget

      1.0.0 (const: 1.46.0) · source ·
      pub const fn forget<T>(t: T)
      Expand description

      Takes ownership and “forgets” about the value without running its destructor.

      Any resources the value manages, such as heap memory or a file handle, will linger forever in an unreachable state. However, it does not guarantee that pointers to this memory will remain valid.

      diff --git a/casbin/rhai/plugin/mem/fn.forget_unsized.html b/casbin/rhai/plugin/mem/fn.forget_unsized.html index 439ede0f..e43b67ef 100644 --- a/casbin/rhai/plugin/mem/fn.forget_unsized.html +++ b/casbin/rhai/plugin/mem/fn.forget_unsized.html @@ -1,5 +1,5 @@ -forget_unsized in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::forget_unsized

      source ·
      pub fn forget_unsized<T>(t: T)where
      -    T: ?Sized,
      🔬This is a nightly-only experimental API. (forget_unsized)
      Expand description

      Like forget, but also accepts unsized values.

      +forget_unsized in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::forget_unsized

      source ·
      pub fn forget_unsized<T>(t: T)where
      +    T: ?Sized,
      🔬This is a nightly-only experimental API. (forget_unsized)
      Expand description

      Like forget, but also accepts unsized values.

      This function is just a shim intended to be removed when the unsized_locals feature gets stabilized.

      \ No newline at end of file diff --git a/casbin/rhai/plugin/mem/fn.min_align_of.html b/casbin/rhai/plugin/mem/fn.min_align_of.html index 9cfaf3f8..17a4dc7a 100644 --- a/casbin/rhai/plugin/mem/fn.min_align_of.html +++ b/casbin/rhai/plugin/mem/fn.min_align_of.html @@ -1,4 +1,4 @@ -min_align_of in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::min_align_of

      1.0.0 · source ·
      pub fn min_align_of<T>() -> usize
      👎Deprecated since 1.2.0: use align_of instead
      Expand description

      Returns the ABI-required minimum alignment of a type in bytes.

      +min_align_of in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::min_align_of

      1.0.0 · source ·
      pub fn min_align_of<T>() -> usize
      👎Deprecated since 1.2.0: use align_of instead
      Expand description

      Returns the ABI-required minimum alignment of a type in bytes.

      Every reference to a value of the type T must be a multiple of this number.

      This is the alignment used for struct fields. It may be smaller than the preferred alignment.

      Examples

      diff --git a/casbin/rhai/plugin/mem/fn.min_align_of_val.html b/casbin/rhai/plugin/mem/fn.min_align_of_val.html index 32d0609f..24022b99 100644 --- a/casbin/rhai/plugin/mem/fn.min_align_of_val.html +++ b/casbin/rhai/plugin/mem/fn.min_align_of_val.html @@ -1,5 +1,5 @@ -min_align_of_val in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::min_align_of_val

      1.0.0 · source ·
      pub fn min_align_of_val<T>(val: &T) -> usizewhere
      -    T: ?Sized,
      👎Deprecated since 1.2.0: use align_of_val instead
      Expand description

      Returns the ABI-required minimum alignment of the type of the value that val points to in +min_align_of_val in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::min_align_of_val

      1.0.0 · source ·
      pub fn min_align_of_val<T>(val: &T) -> usizewhere
      +    T: ?Sized,
      👎Deprecated since 1.2.0: use align_of_val instead
      Expand description

      Returns the ABI-required minimum alignment of the type of the value that val points to in bytes.

      Every reference to a value of the type T must be a multiple of this number.

      Examples

      diff --git a/casbin/rhai/plugin/mem/fn.needs_drop.html b/casbin/rhai/plugin/mem/fn.needs_drop.html index d599c820..82a00725 100644 --- a/casbin/rhai/plugin/mem/fn.needs_drop.html +++ b/casbin/rhai/plugin/mem/fn.needs_drop.html @@ -1,5 +1,5 @@ -needs_drop in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::needs_drop

      1.21.0 (const: 1.36.0) · source ·
      pub const fn needs_drop<T>() -> boolwhere
      -    T: ?Sized,
      Expand description

      Returns true if dropping values of type T matters.

      +needs_drop in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::needs_drop

      1.21.0 (const: 1.36.0) · source ·
      pub const fn needs_drop<T>() -> boolwhere
      +    T: ?Sized,
      Expand description

      Returns true if dropping values of type T matters.

      This is purely an optimization hint, and may be implemented conservatively: it may return true for types that don’t actually need to be dropped. As such always returning true would be a valid implementation of @@ -10,9 +10,9 @@ trying to drop all their contents when they are destroyed. This might not make a difference in release builds (where a loop that has no side-effects is easily detected and eliminated), but is often a big win for debug builds.

      -

      Note that drop_in_place already performs this check, so if your workload -can be reduced to some small number of drop_in_place calls, using this is -unnecessary. In particular note that you can drop_in_place a slice, and that +

      Note that drop_in_place already performs this check, so if your workload +can be reduced to some small number of drop_in_place calls, using this is +unnecessary. In particular note that you can drop_in_place a slice, and that will do a single needs_drop check for all the values.

      Types like Vec therefore just drop_in_place(&mut self[..]) without using needs_drop explicitly. Types like HashMap, on the other hand, have to drop diff --git a/casbin/rhai/plugin/mem/fn.replace.html b/casbin/rhai/plugin/mem/fn.replace.html index efe920a2..c7d93109 100644 --- a/casbin/rhai/plugin/mem/fn.replace.html +++ b/casbin/rhai/plugin/mem/fn.replace.html @@ -1,4 +1,4 @@ -replace in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::replace

      1.0.0 (const: unstable) · source ·
      pub fn replace<T>(dest: &mut T, src: T) -> T
      Expand description

      Moves src into the referenced dest, returning the previous dest value.

      +replace in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::replace

      1.0.0 (const: unstable) · source ·
      pub fn replace<T>(dest: &mut T, src: T) -> T
      Expand description

      Moves src into the referenced dest, returning the previous dest value.

      Neither value is dropped.

      • If you want to replace the values of two variables, see swap.
      • @@ -27,7 +27,7 @@

        Examples

        t } }
      -

      Note that T does not necessarily implement Clone, so we can’t even clone self.buf[i] to +

      Note that T does not necessarily implement Clone, so we can’t even clone self.buf[i] to avoid the move. But replace can be used to disassociate the original value at that index from self, allowing it to be returned:

      diff --git a/casbin/rhai/plugin/mem/fn.size_of.html b/casbin/rhai/plugin/mem/fn.size_of.html index 12b52fe2..8fbaf7b6 100644 --- a/casbin/rhai/plugin/mem/fn.size_of.html +++ b/casbin/rhai/plugin/mem/fn.size_of.html @@ -1,4 +1,4 @@ -size_of in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::size_of

      1.0.0 (const: 1.24.0) · source ·
      pub const fn size_of<T>() -> usize
      Expand description

      Returns the size of a type in bytes.

      +size_of in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::size_of

      1.0.0 (const: 1.24.0) · source ·
      pub const fn size_of<T>() -> usize
      Expand description

      Returns the size of a type in bytes.

      More specifically, this is the offset in bytes between successive elements in an array with that item type including alignment padding. Thus, for any type T and length n, [T; n] has a size of n * size_of::<T>().

      @@ -24,7 +24,7 @@

      Furthermore, usize and isize have the same size.

      -

      The types *const T, &T, Box<T>, Option<&T>, and Option<Box<T>> all have +

      The types *const T, &T, Box<T>, Option<&T>, and Option<Box<T>> all have the same size. If T is Sized, all of those types have the same size as usize.

      The mutability of a pointer does not change its size. As such, &T and &mut T have the same size. Likewise for *const T and *mut T.

      diff --git a/casbin/rhai/plugin/mem/fn.size_of_val.html b/casbin/rhai/plugin/mem/fn.size_of_val.html index 52926bd9..dc976f73 100644 --- a/casbin/rhai/plugin/mem/fn.size_of_val.html +++ b/casbin/rhai/plugin/mem/fn.size_of_val.html @@ -1,7 +1,7 @@ -size_of_val in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::size_of_val

      1.0.0 (const: unstable) · source ·
      pub fn size_of_val<T>(val: &T) -> usizewhere
      -    T: ?Sized,
      Expand description

      Returns the size of the pointed-to value in bytes.

      +size_of_val in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::size_of_val

      1.0.0 (const: unstable) · source ·
      pub fn size_of_val<T>(val: &T) -> usizewhere
      +    T: ?Sized,
      Expand description

      Returns the size of the pointed-to value in bytes.

      This is usually the same as size_of::<T>(). However, when T has no -statically-known size, e.g., a slice [T] or a trait object, +statically-known size, e.g., a slice [T] or a trait object, then size_of_val can be used to get the dynamically-known size.

      Examples

      use std::mem;
      diff --git a/casbin/rhai/plugin/mem/fn.size_of_val_raw.html b/casbin/rhai/plugin/mem/fn.size_of_val_raw.html
      index 3cc004a8..0cc0dbe9 100644
      --- a/casbin/rhai/plugin/mem/fn.size_of_val_raw.html
      +++ b/casbin/rhai/plugin/mem/fn.size_of_val_raw.html
      @@ -1,7 +1,7 @@
      -size_of_val_raw in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::size_of_val_raw

      const: unstable · source ·
      pub unsafe fn size_of_val_raw<T>(val: *const T) -> usizewhere
      -    T: ?Sized,
      🔬This is a nightly-only experimental API. (layout_for_ptr)
      Expand description

      Returns the size of the pointed-to value in bytes.

      +size_of_val_raw in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::size_of_val_raw

      const: unstable · source ·
      pub unsafe fn size_of_val_raw<T>(val: *const T) -> usizewhere
      +    T: ?Sized,
      🔬This is a nightly-only experimental API. (layout_for_ptr)
      Expand description

      Returns the size of the pointed-to value in bytes.

      This is usually the same as size_of::<T>(). However, when T has no -statically-known size, e.g., a slice [T] or a trait object, +statically-known size, e.g., a slice [T] or a trait object, then size_of_val_raw can be used to get the dynamically-known size.

      Safety

      This function is only safe to call if the following conditions hold:

      @@ -9,7 +9,7 @@

      Safety

    • If T is Sized, this function is always safe to call.
    • If the unsized tail of T is:
        -
      • a slice, then the length of the slice tail must be an initialized +
      • a slice, then the length of the slice tail must be an initialized integer, and the size of the entire value (dynamic tail length + statically sized prefix) must fit in isize.
      • a trait object, then the vtable part of the pointer must point diff --git a/casbin/rhai/plugin/mem/fn.swap.html b/casbin/rhai/plugin/mem/fn.swap.html index c2b1b2d4..3ac51682 100644 --- a/casbin/rhai/plugin/mem/fn.swap.html +++ b/casbin/rhai/plugin/mem/fn.swap.html @@ -1,4 +1,4 @@ -swap in casbin::rhai::plugin::mem - Rust

        Function casbin::rhai::plugin::mem::swap

        1.0.0 (const: unstable) · source ·
        pub fn swap<T>(x: &mut T, y: &mut T)
        Expand description

        Swaps the values at two mutable locations, without deinitializing either one.

        +swap in casbin::rhai::plugin::mem - Rust

        Function casbin::rhai::plugin::mem::swap

        1.0.0 (const: unstable) · source ·
        pub fn swap<T>(x: &mut T, y: &mut T)
        Expand description

        Swaps the values at two mutable locations, without deinitializing either one.

        • If you want to swap with a default or dummy value, see take.
        • If you want to swap with a passed value, returning the old value, see replace.
        • diff --git a/casbin/rhai/plugin/mem/fn.take.html b/casbin/rhai/plugin/mem/fn.take.html index 834868dd..9cab2256 100644 --- a/casbin/rhai/plugin/mem/fn.take.html +++ b/casbin/rhai/plugin/mem/fn.take.html @@ -1,5 +1,5 @@ -take in casbin::rhai::plugin::mem - Rust

          Function casbin::rhai::plugin::mem::take

          1.40.0 · source ·
          pub fn take<T>(dest: &mut T) -> Twhere
          -    T: Default,
          Expand description

          Replaces dest with the default value of T, returning the previous dest value.

          +take in casbin::rhai::plugin::mem - Rust

          Function casbin::rhai::plugin::mem::take

          1.40.0 · source ·
          pub fn take<T>(dest: &mut T) -> Twhere
          +    T: Default,
          Expand description

          Replaces dest with the default value of T, returning the previous dest value.

          • If you want to replace the values of two variables, see swap.
          • If you want to replace with a passed value instead of the default value, see replace.
          • @@ -27,7 +27,7 @@

            Examples

            buf } }
    • -

      Note that T does not necessarily implement Clone, so it can’t even clone and reset +

      Note that T does not necessarily implement Clone, so it can’t even clone and reset self.buf. But take can be used to disassociate the original value of self.buf from self, allowing it to be returned:

      diff --git a/casbin/rhai/plugin/mem/fn.transmute.html b/casbin/rhai/plugin/mem/fn.transmute.html index 28953a9f..11035015 100644 --- a/casbin/rhai/plugin/mem/fn.transmute.html +++ b/casbin/rhai/plugin/mem/fn.transmute.html @@ -1,4 +1,4 @@ -transmute in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::transmute

      1.0.0 (const: 1.56.0) · source ·
      pub const unsafe extern "rust-intrinsic" fn transmute<Src, Dst>(
      +transmute in casbin::rhai::plugin::mem - Rust

      Function casbin::rhai::plugin::mem::transmute

      1.0.0 (const: 1.56.0) · source ·
      pub const unsafe extern "rust-intrinsic" fn transmute<Src, Dst>(
           src: Src
       ) -> Dst
      Expand description

      Reinterprets the bits of a value of one type as another type.

      Both types must have the same size. Compilation will fail if this is not guaranteed.

      @@ -14,7 +14,10 @@ passed to transmute is valid at both types Src and Dst. Failing to uphold this condition may lead to unexpected and unstable compilation results. This makes transmute incredibly unsafe. transmute should be the absolute last resort.

      -

      Transmuting pointers to integers in a const context is undefined behavior. +

      Transmuting pointers to integers in a const context is undefined behavior, +unless the pointer was originally created from an integer. +(That includes this function specifically, integer-to-pointer casts, and helpers like invalid, +but also semantically-equivalent conversions such as punning through repr(C) union fields.) Any attempt to use the resulting value for integer operations will abort const-evaluation. (And even outside const, such transmutation is touching on many unspecified aspects of the Rust memory model and should be avoided. See below for alternatives.)

      @@ -89,7 +92,7 @@

      Alternatives

    • If the code just wants to store data of arbitrary type in some buffer and needs to pick a type for that buffer, it can use MaybeUninit.
    • If the code actually wants to work on the address the pointer points to, it can use as -casts or ptr.addr().
    • +casts or ptr.addr().

    Turning a *mut T into an &mut T:

    diff --git a/casbin/rhai/plugin/mem/fn.transmute_copy.html b/casbin/rhai/plugin/mem/fn.transmute_copy.html index 59a3e853..e73b50bc 100644 --- a/casbin/rhai/plugin/mem/fn.transmute_copy.html +++ b/casbin/rhai/plugin/mem/fn.transmute_copy.html @@ -1,4 +1,4 @@ -transmute_copy in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::transmute_copy

    1.0.0 (const: unstable) · source ·
    pub unsafe fn transmute_copy<Src, Dst>(src: &Src) -> Dst
    Expand description

    Interprets src as having type &Dst, and then reads src without moving +transmute_copy in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::transmute_copy

    1.0.0 (const: 1.74.0) · source ·
    pub const unsafe fn transmute_copy<Src, Dst>(src: &Src) -> Dst
    Expand description

    Interprets src as having type &Dst, and then reads src without moving the contained value.

    This function will unsafely assume the pointer src is valid for size_of::<Dst> bytes by transmuting &Src to &Dst and then reading the &Dst (except that this is done diff --git a/casbin/rhai/plugin/mem/fn.uninitialized.html b/casbin/rhai/plugin/mem/fn.uninitialized.html index b0c92a66..cfd370c0 100644 --- a/casbin/rhai/plugin/mem/fn.uninitialized.html +++ b/casbin/rhai/plugin/mem/fn.uninitialized.html @@ -1,4 +1,4 @@ -uninitialized in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::uninitialized

    1.0.0 · source ·
    pub unsafe fn uninitialized<T>() -> T
    👎Deprecated since 1.39.0: use mem::MaybeUninit instead
    Expand description

    Bypasses Rust’s normal memory-initialization checks by pretending to +uninitialized in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::uninitialized

    1.0.0 · source ·
    pub unsafe fn uninitialized<T>() -> T
    👎Deprecated since 1.39.0: use mem::MaybeUninit instead
    Expand description

    Bypasses Rust’s normal memory-initialization checks by pretending to produce a value of type T, while doing nothing at all.

    This function is deprecated. Use MaybeUninit<T> instead. It also might be slower than using MaybeUninit<T> due to mitigations that were put in place to diff --git a/casbin/rhai/plugin/mem/fn.variant_count.html b/casbin/rhai/plugin/mem/fn.variant_count.html index 6a3b7c6f..ab0015ab 100644 --- a/casbin/rhai/plugin/mem/fn.variant_count.html +++ b/casbin/rhai/plugin/mem/fn.variant_count.html @@ -1,4 +1,4 @@ -variant_count in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::variant_count

    const: unstable · source ·
    pub fn variant_count<T>() -> usize
    🔬This is a nightly-only experimental API. (variant_count)
    Expand description

    Returns the number of variants in the enum type T.

    +variant_count in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::variant_count

    const: unstable · source ·
    pub fn variant_count<T>() -> usize
    🔬This is a nightly-only experimental API. (variant_count)
    Expand description

    Returns the number of variants in the enum type T.

    If T is not an enum, calling this function will not result in undefined behavior, but the return value is unspecified. Equally, if T is an enum with more variants than usize::MAX the return value is unspecified. Uninhabited variants will be counted.

    diff --git a/casbin/rhai/plugin/mem/fn.zeroed.html b/casbin/rhai/plugin/mem/fn.zeroed.html index 11a21da6..26491b2c 100644 --- a/casbin/rhai/plugin/mem/fn.zeroed.html +++ b/casbin/rhai/plugin/mem/fn.zeroed.html @@ -1,4 +1,4 @@ -zeroed in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::zeroed

    1.0.0 · source ·
    pub unsafe fn zeroed<T>() -> T
    Expand description

    Returns the value of type T represented by the all-zero byte-pattern.

    +zeroed in casbin::rhai::plugin::mem - Rust

    Function casbin::rhai::plugin::mem::zeroed

    1.0.0 · source ·
    pub unsafe fn zeroed<T>() -> T
    Expand description

    Returns the value of type T represented by the all-zero byte-pattern.

    This means that, for example, the padding byte in (u8, u16) is not necessarily zeroed.

    There is no guarantee that an all-zero byte-pattern represents a valid value diff --git a/casbin/rhai/plugin/mem/index.html b/casbin/rhai/plugin/mem/index.html index 13f92032..72905dc2 100644 --- a/casbin/rhai/plugin/mem/index.html +++ b/casbin/rhai/plugin/mem/index.html @@ -1,4 +1,4 @@ -casbin::rhai::plugin::mem - Rust

    Module casbin::rhai::plugin::mem

    1.0.0 · source ·
    Expand description

    Basic functions for dealing with memory.

    +casbin::rhai::plugin::mem - Rust

    Module casbin::rhai::plugin::mem

    1.0.0 · source ·
    Expand description

    Basic functions for dealing with memory.

    This module contains functions for querying the size and alignment of types, initializing and manipulating memory.

    Macros

    • offset_ofExperimental
      Expands to the offset in bytes of a field from the beginning of the given type.

    Structs

    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/plugin/mem/struct.Discriminant.html b/casbin/rhai/plugin/mem/struct.Discriminant.html index 8f32fa45..3542a14c 100644 --- a/casbin/rhai/plugin/mem/struct.Discriminant.html +++ b/casbin/rhai/plugin/mem/struct.Discriminant.html @@ -1,29 +1,29 @@ -Discriminant in casbin::rhai::plugin::mem - Rust

    Struct casbin::rhai::plugin::mem::Discriminant

    1.21.0 · source ·
    pub struct Discriminant<T>(_);
    Expand description

    Opaque type representing the discriminant of an enum.

    +Discriminant in casbin::rhai::plugin::mem - Rust

    Struct casbin::rhai::plugin::mem::Discriminant

    1.21.0 · source ·
    pub struct Discriminant<T>(/* private fields */);
    Expand description

    Opaque type representing the discriminant of an enum.

    See the discriminant function in this module for more information.

    -

    Trait Implementations§

    source§

    impl<T> Clone for Discriminant<T>

    source§

    fn clone(&self) -> Discriminant<T>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl<T> Debug for Discriminant<T>

    source§

    fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Hash for Discriminant<T>

    source§

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl<T> PartialEq<Discriminant<T>> for Discriminant<T>

    source§

    fn eq(&self, rhs: &Discriminant<T>) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl<T> Copy for Discriminant<T>

    source§

    impl<T> Eq for Discriminant<T>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    source§

    impl<T> Clone for Discriminant<T>

    source§

    fn clone(&self) -> Discriminant<T>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl<T> Debug for Discriminant<T>

    source§

    fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Hash for Discriminant<T>

    source§

    fn hash<H>(&self, state: &mut H)where + H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl<T> PartialEq<Discriminant<T>> for Discriminant<T>

    source§

    fn eq(&self, rhs: &Discriminant<T>) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl<T> Copy for Discriminant<T>

    source§

    impl<T> Eq for Discriminant<T>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    \ No newline at end of file diff --git a/casbin/rhai/plugin/mem/struct.ManuallyDrop.html b/casbin/rhai/plugin/mem/struct.ManuallyDrop.html index af0d7e19..a60d76cd 100644 --- a/casbin/rhai/plugin/mem/struct.ManuallyDrop.html +++ b/casbin/rhai/plugin/mem/struct.ManuallyDrop.html @@ -1,5 +1,5 @@ -ManuallyDrop in casbin::rhai::plugin::mem - Rust

    Struct casbin::rhai::plugin::mem::ManuallyDrop

    1.20.0 · source ·
    #[repr(transparent)]
    pub struct ManuallyDrop<T>where - T: ?Sized,{ /* private fields */ }
    Expand description

    A wrapper to inhibit compiler from automatically calling T’s destructor. +ManuallyDrop in casbin::rhai::plugin::mem - Rust

    Struct casbin::rhai::plugin::mem::ManuallyDrop

    1.20.0 · source ·
    #[repr(transparent)]
    pub struct ManuallyDrop<T>where + T: ?Sized,{ /* private fields */ }
    Expand description

    A wrapper to inhibit compiler from automatically calling T’s destructor. This wrapper is 0-cost.

    ManuallyDrop<T> is guaranteed to have the same layout as T, and is subject to the same layout optimizations as T. As a consequence, it has no effect @@ -29,20 +29,20 @@

    context: Context, }

  • -

    Implementations§

    source§

    impl<T> ManuallyDrop<T>

    const: 1.32.0 · source

    pub const fn new(value: T) -> ManuallyDrop<T>

    Wrap a value to be manually dropped.

    +

    Implementations§

    source§

    impl<T> ManuallyDrop<T>

    const: 1.32.0 · source

    pub const fn new(value: T) -> ManuallyDrop<T>

    Wrap a value to be manually dropped.

    Examples
    use std::mem::ManuallyDrop;
     let mut x = ManuallyDrop::new(String::from("Hello World!"));
     x.truncate(5); // You can still safely operate on the value
     assert_eq!(*x, "Hello");
     // But `Drop` will not be run here
    -
    const: 1.32.0 · source

    pub const fn into_inner(slot: ManuallyDrop<T>) -> T

    Extracts the value from the ManuallyDrop container.

    +
    const: 1.32.0 · source

    pub const fn into_inner(slot: ManuallyDrop<T>) -> T

    Extracts the value from the ManuallyDrop container.

    This allows the value to be dropped again.

    Examples
    use std::mem::ManuallyDrop;
     let x = ManuallyDrop::new(Box::new(()));
     let _: Box<()> = ManuallyDrop::into_inner(x); // This drops the `Box`.
    -
    1.42.0 · source

    pub unsafe fn take(slot: &mut ManuallyDrop<T>) -> T

    Takes the value from the ManuallyDrop<T> container out.

    +
    1.42.0 · source

    pub unsafe fn take(slot: &mut ManuallyDrop<T>) -> T

    Takes the value from the ManuallyDrop<T> container out.

    This method is primarily intended for moving out values in drop. Instead of using ManuallyDrop::drop to manually drop the value, you can use this method to take the value and use it however desired.

    @@ -52,11 +52,11 @@
    Safety

    This function semantically moves out the contained value without preventing further usage, leaving the state of this container unchanged. It is your responsibility to ensure that this ManuallyDrop is not used again.

    -
    source§

    impl<T> ManuallyDrop<T>where - T: ?Sized,

    source

    pub unsafe fn drop(slot: &mut ManuallyDrop<T>)

    Manually drops the contained value. This is exactly equivalent to calling -ptr::drop_in_place with a pointer to the contained value. As such, unless +

    source§

    impl<T> ManuallyDrop<T>where + T: ?Sized,

    source

    pub unsafe fn drop(slot: &mut ManuallyDrop<T>)

    Manually drops the contained value. This is exactly equivalent to calling +ptr::drop_in_place with a pointer to the contained value. As such, unless the contained value is a packed struct, the destructor will be called in-place -without moving the value, and thus can be used to safely drop pinned data.

    +without moving the value, and thus can be used to safely drop pinned data.

    If you have ownership of the value, you can use ManuallyDrop::into_inner instead.

    Safety

    This function runs the destructor of the contained value. Other than changes made by @@ -67,49 +67,53 @@

    Safety
    a value multiple times, can cause Undefined Behavior (depending on what drop does). This is normally prevented by the type system, but users of ManuallyDrop must uphold those guarantees without assistance from the compiler.

    -

    Trait Implementations§

    source§

    impl<T> Clone for ManuallyDrop<T>where - T: Clone + ?Sized,

    source§

    fn clone(&self) -> ManuallyDrop<T>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl<T> Debug for ManuallyDrop<T>where - T: Debug + ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Default for ManuallyDrop<T>where - T: Default + ?Sized,

    source§

    fn default() -> ManuallyDrop<T>

    Returns the “default value” for a type. Read more
    source§

    impl<T> Deref for ManuallyDrop<T>where - T: ?Sized,

    §

    type Target = T

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &T

    Dereferences the value.
    source§

    impl<T> DerefMut for ManuallyDrop<T>where - T: ?Sized,

    source§

    fn deref_mut(&mut self) -> &mut T

    Mutably dereferences the value.
    source§

    impl<T> Hash for ManuallyDrop<T>where - T: Hash + ?Sized,

    source§

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    source§

    impl<T> Ord for ManuallyDrop<T>where - T: Ord + ?Sized,

    source§

    fn cmp(&self, other: &ManuallyDrop<T>) -> Ordering

    This method returns an Ordering between self and other. Read more
    source§

    impl<T> PartialEq<ManuallyDrop<T>> for ManuallyDrop<T>where - T: PartialEq<T> + ?Sized,

    source§

    fn eq(&self, other: &ManuallyDrop<T>) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl<T> PartialOrd<ManuallyDrop<T>> for ManuallyDrop<T>where - T: PartialOrd<T> + ?Sized,

    source§

    fn partial_cmp(&self, other: &ManuallyDrop<T>) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl<T> Copy for ManuallyDrop<T>where - T: Copy + ?Sized,

    source§

    impl<T> Eq for ManuallyDrop<T>where - T: Eq + ?Sized,

    source§

    impl<T> StructuralEq for ManuallyDrop<T>where - T: ?Sized,

    source§

    impl<T> StructuralPartialEq for ManuallyDrop<T>where - T: ?Sized,

    Auto Trait Implementations§

    §

    impl<T: ?Sized> RefUnwindSafe for ManuallyDrop<T>where - T: RefUnwindSafe,

    §

    impl<T: ?Sized> Send for ManuallyDrop<T>where - T: Send,

    §

    impl<T: ?Sized> Sync for ManuallyDrop<T>where - T: Sync,

    §

    impl<T: ?Sized> Unpin for ManuallyDrop<T>where - T: Unpin,

    §

    impl<T: ?Sized> UnwindSafe for ManuallyDrop<T>where - T: UnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl<T> AsBytes for ManuallyDrop<T>where + T: AsBytes + ?Sized,

    §

    fn as_bytes(&self) -> &[u8]

    Gets the bytes of this value. Read more
    §

    fn write_to(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to bytes. Read more
    §

    fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the prefix of bytes. Read more
    §

    fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the suffix of bytes. Read more
    source§

    impl<T> Clone for ManuallyDrop<T>where + T: Clone + ?Sized,

    source§

    fn clone(&self) -> ManuallyDrop<T>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl<T> Debug for ManuallyDrop<T>where + T: Debug + ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Default for ManuallyDrop<T>where + T: Default + ?Sized,

    source§

    fn default() -> ManuallyDrop<T>

    Returns the “default value” for a type. Read more
    source§

    impl<T> Deref for ManuallyDrop<T>where + T: ?Sized,

    §

    type Target = T

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &T

    Dereferences the value.
    source§

    impl<T> DerefMut for ManuallyDrop<T>where + T: ?Sized,

    source§

    fn deref_mut(&mut self) -> &mut T

    Mutably dereferences the value.
    §

    impl<T> FromZeroes for ManuallyDrop<T>where + T: FromZeroes + ?Sized,

    §

    fn zero(&mut self)

    Overwrites self with zeroes. Read more
    source§

    impl<T> Hash for ManuallyDrop<T>where + T: Hash + ?Sized,

    source§

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    source§

    impl<T> Ord for ManuallyDrop<T>where + T: Ord + ?Sized,

    source§

    fn cmp(&self, other: &ManuallyDrop<T>) -> Ordering

    This method returns an Ordering between self and other. Read more
    source§

    impl<T> PartialEq<ManuallyDrop<T>> for ManuallyDrop<T>where + T: PartialEq<T> + ?Sized,

    source§

    fn eq(&self, other: &ManuallyDrop<T>) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl<T> PartialOrd<ManuallyDrop<T>> for ManuallyDrop<T>where + T: PartialOrd<T> + ?Sized,

    source§

    fn partial_cmp(&self, other: &ManuallyDrop<T>) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl<T> Copy for ManuallyDrop<T>where + T: Copy + ?Sized,

    source§

    impl<T> Eq for ManuallyDrop<T>where + T: Eq + ?Sized,

    §

    impl<T> FromBytes for ManuallyDrop<T>where + T: FromBytes + ?Sized,

    source§

    impl<T> StructuralEq for ManuallyDrop<T>where + T: ?Sized,

    source§

    impl<T> StructuralPartialEq for ManuallyDrop<T>where + T: ?Sized,

    §

    impl<T> Unaligned for ManuallyDrop<T>where + T: Unaligned + ?Sized,

    Auto Trait Implementations§

    §

    impl<T: ?Sized> RefUnwindSafe for ManuallyDrop<T>where + T: RefUnwindSafe,

    §

    impl<T: ?Sized> Send for ManuallyDrop<T>where + T: Send,

    §

    impl<T: ?Sized> Sync for ManuallyDrop<T>where + T: Sync,

    §

    impl<T: ?Sized> Unpin for ManuallyDrop<T>where + T: Unpin,

    §

    impl<T: ?Sized> UnwindSafe for ManuallyDrop<T>where + T: UnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

    \ No newline at end of file diff --git a/casbin/rhai/plugin/mem/trait.BikeshedIntrinsicFrom.html b/casbin/rhai/plugin/mem/trait.BikeshedIntrinsicFrom.html index 103d74ab..6913342a 100644 --- a/casbin/rhai/plugin/mem/trait.BikeshedIntrinsicFrom.html +++ b/casbin/rhai/plugin/mem/trait.BikeshedIntrinsicFrom.html @@ -1,5 +1,5 @@ -BikeshedIntrinsicFrom in casbin::rhai::plugin::mem - Rust
    pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = core::::mem::transmutability::BikeshedIntrinsicFrom::{constant#0}>where
    -    Src: ?Sized,{ }
    🔬This is a nightly-only experimental API. (transmutability)
    Expand description

    Are values of a type transmutable into values of another type?

    +BikeshedIntrinsicFrom in casbin::rhai::plugin::mem - Rust
    pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = core::::mem::transmutability::BikeshedIntrinsicFrom::{constant#0}>where
    +    Src: ?Sized,{ }
    🔬This is a nightly-only experimental API. (transmutability)
    Expand description

    Are values of a type transmutable into values of another type?

    This trait is implemented on-the-fly by the compiler for types Src and Self when the bits of any value of type Self are safely transmutable into a value of type Dst, in a given Context, notwithstanding whatever safety checks you have asked the compiler to Assume are satisfied.

    diff --git a/casbin/rhai/plugin/mem/union.MaybeUninit.html b/casbin/rhai/plugin/mem/union.MaybeUninit.html index d84f44c7..8c476b09 100644 --- a/casbin/rhai/plugin/mem/union.MaybeUninit.html +++ b/casbin/rhai/plugin/mem/union.MaybeUninit.html @@ -1,4 +1,4 @@ -MaybeUninit in casbin::rhai::plugin::mem - Rust

    Initializing a struct field-by-field

    -

    You can use MaybeUninit<T>, and the std::ptr::addr_of_mut macro, to initialize structs field by field:

    +

    You can use MaybeUninit<T>, and the std::ptr::addr_of_mut macro, to initialize structs field by field:

    use std::mem::MaybeUninit;
     use std::ptr::addr_of_mut;
    @@ -188,7 +188,7 @@ 

    Layout

    remain #[repr(transparent)]. That said, MaybeUninit<T> will always guarantee that it has the same size, alignment, and ABI as T; it’s just that the way MaybeUninit implements that guarantee may evolve.

    -

    Implementations§

    source§

    impl<T> MaybeUninit<T>

    const: 1.36.0 · source

    pub const fn new(val: T) -> MaybeUninit<T>

    Creates a new MaybeUninit<T> initialized with the given value. +

    Implementations§

    source§

    impl<T> MaybeUninit<T>

    const: 1.36.0 · source

    pub const fn new(val: T) -> MaybeUninit<T>

    Creates a new MaybeUninit<T> initialized with the given value. It is safe to call assume_init on the return value of this function.

    Note that dropping a MaybeUninit<T> will never call T’s drop code. It is your responsibility to make sure T gets dropped if it got initialized.

    @@ -196,7 +196,7 @@
    Example
    use std::mem::MaybeUninit;
     
     let v: MaybeUninit<Vec<u8>> = MaybeUninit::new(vec![42]);
    -
    const: 1.36.0 · source

    pub const fn uninit() -> MaybeUninit<T>

    Creates a new MaybeUninit<T> in an uninitialized state.

    +
    const: 1.36.0 · source

    pub const fn uninit() -> MaybeUninit<T>

    Creates a new MaybeUninit<T> in an uninitialized state.

    Note that dropping a MaybeUninit<T> will never call T’s drop code. It is your responsibility to make sure T gets dropped if it got initialized.

    See the type-level documentation for some examples.

    @@ -204,7 +204,7 @@
    Example
    use std::mem::MaybeUninit;
     
     let v: MaybeUninit<String> = MaybeUninit::uninit();
    -
    const: unstable · source

    pub fn uninit_array<const N: usize>() -> [MaybeUninit<T>; N]

    🔬This is a nightly-only experimental API. (maybe_uninit_uninit_array)

    Create a new array of MaybeUninit<T> items, in an uninitialized state.

    +
    const: unstable · source

    pub fn uninit_array<const N: usize>() -> [MaybeUninit<T>; N]

    🔬This is a nightly-only experimental API. (maybe_uninit_uninit_array)

    Create a new array of MaybeUninit<T> items, in an uninitialized state.

    Note: in a future Rust version this method may become unnecessary when Rust allows inline const expressions. @@ -228,7 +228,7 @@

    Examples
    let mut buf: [MaybeUninit<u8>; 32] = MaybeUninit::uninit_array(); let data = read(&mut buf);
    -
    const: unstable · source

    pub fn zeroed() -> MaybeUninit<T>

    Creates a new MaybeUninit<T> in an uninitialized state, with the memory being +

    const: unstable · source

    pub fn zeroed() -> MaybeUninit<T>

    Creates a new MaybeUninit<T> in an uninitialized state, with the memory being filled with 0 bytes. It depends on T whether that already makes for proper initialization. For example, MaybeUninit<usize>::zeroed() is initialized, but MaybeUninit<&'static i32>::zeroed() is not because references must not @@ -255,7 +255,7 @@

    Example
    let x = unsafe { x.assume_init() }; // Inside a pair, we create a `NotZero` that does not have a valid discriminant. // This is undefined behavior. ⚠️
    -
    1.55.0 (const: unstable) · source

    pub fn write(&mut self, val: T) -> &mut T

    Sets the value of the MaybeUninit<T>.

    +
    1.55.0 (const: unstable) · source

    pub fn write(&mut self, val: T) -> &mut T

    Sets the value of the MaybeUninit<T>.

    This overwrites any previous value without dropping it, so be careful not to use this twice unless you want to skip running the destructor. For your convenience, this also returns a mutable reference to the @@ -321,7 +321,7 @@

    Examples
    unsafe { Pin::new_unchecked(ref_) } } }
    -
    const: 1.59.0 · source

    pub const fn as_ptr(&self) -> *const T

    Gets a pointer to the contained value. Reading from this pointer or turning it +

    const: 1.59.0 · source

    pub const fn as_ptr(&self) -> *const T

    Gets a pointer to the contained value. Reading from this pointer or turning it into a reference is undefined behavior unless the MaybeUninit<T> is initialized. Writing to memory that this pointer (non-transitively) points to is undefined behavior (except inside an UnsafeCell<T>).

    @@ -344,7 +344,7 @@
    Examples
    // We have created a reference to an uninitialized vector! This is undefined behavior. ⚠️

    (Notice that the rules around references to uninitialized data are not finalized yet, but until they are, it is advisable to avoid them.)

    -
    const: unstable · source

    pub fn as_mut_ptr(&mut self) -> *mut T

    Gets a mutable pointer to the contained value. Reading from this pointer or turning it +

    const: unstable · source

    pub fn as_mut_ptr(&mut self) -> *mut T

    Gets a mutable pointer to the contained value. Reading from this pointer or turning it into a reference is undefined behavior unless the MaybeUninit<T> is initialized.

    Examples

    Correct usage of this method:

    @@ -367,7 +367,7 @@
    Examples
    // We have created a reference to an uninitialized vector! This is undefined behavior. ⚠️

    (Notice that the rules around references to uninitialized data are not finalized yet, but until they are, it is advisable to avoid them.)

    -
    const: 1.59.0 · source

    pub const unsafe fn assume_init(self) -> T

    Extracts the value from the MaybeUninit<T> container. This is a great way +

    const: 1.59.0 · source

    pub const unsafe fn assume_init(self) -> T

    Extracts the value from the MaybeUninit<T> container. This is a great way to ensure that the data will get dropped, because the resulting T is subject to the usual drop handling.

    Safety
    @@ -398,7 +398,7 @@
    Examples
    let x = MaybeUninit::<Vec<u32>>::uninit(); let x_init = unsafe { x.assume_init() }; // `x` had not been initialized yet, so this last line caused undefined behavior. ⚠️
    -
    1.60.0 (const: unstable) · source

    pub unsafe fn assume_init_read(&self) -> T

    Reads the value from the MaybeUninit<T> container. The resulting T is subject +

    1.60.0 (const: unstable) · source

    pub unsafe fn assume_init_read(&self) -> T

    Reads the value from the MaybeUninit<T> container. The resulting T is subject to the usual drop handling.

    Whenever possible, it is preferable to use assume_init instead, which prevents duplicating the content of the MaybeUninit<T>.

    @@ -407,9 +407,9 @@
    Safety
    state. Calling this when the content is not yet fully initialized causes undefined behavior. The type-level documentation contains more information about this initialization invariant.

    -

    Moreover, similar to the ptr::read function, this function creates a +

    Moreover, similar to the ptr::read function, this function creates a bitwise copy of the contents, regardless whether the contained type -implements the Copy trait or not. When using multiple copies of the +implements the Copy trait or not. When using multiple copies of the data (by calling assume_init_read multiple times, or first calling assume_init_read and then assume_init), it is your responsibility to ensure that data may indeed be duplicated.

    @@ -441,7 +441,7 @@
    Examples
    let x2 = unsafe { x.assume_init_read() }; // We now created two copies of the same vector, leading to a double-free ⚠️ when // they both get dropped!
    -
    1.60.0 · source

    pub unsafe fn assume_init_drop(&mut self)

    Drops the contained value in place.

    +
    1.60.0 · source

    pub unsafe fn assume_init_drop(&mut self)

    Drops the contained value in place.

    If you have ownership of the MaybeUninit, you can also use assume_init as an alternative.

    Safety
    @@ -456,7 +456,7 @@
    Safety
    requirement the compiler knows about it is that the data pointer must be non-null. Dropping such a Vec<T> however will cause undefined behaviour.

    -
    1.55.0 (const: 1.59.0) · source

    pub const unsafe fn assume_init_ref(&self) -> &T

    Gets a shared reference to the contained value.

    +
    1.55.0 (const: 1.59.0) · source

    pub const unsafe fn assume_init_ref(&self) -> &T

    Gets a shared reference to the contained value.

    This can be useful when we want to access a MaybeUninit that has been initialized but don’t have ownership of the MaybeUninit (preventing the use of .assume_init()).

    @@ -493,7 +493,7 @@
    // ^^^^^^^^^^^^^^^ // Reference to an uninitialized `Cell<bool>`: UB! }
    -
    1.55.0 (const: unstable) · source

    pub unsafe fn assume_init_mut(&mut self) -> &mut T

    Gets a mutable (unique) reference to the contained value.

    +
    1.55.0 (const: unstable) · source

    pub unsafe fn assume_init_mut(&mut self) -> &mut T

    Gets a mutable (unique) reference to the contained value.

    This can be useful when we want to access a MaybeUninit that has been initialized but don’t have ownership of the MaybeUninit (preventing the use of .assume_init()).

    @@ -574,9 +574,9 @@
    const: unstable · source

    pub unsafe fn array_assume_init<const N: usize>( - array: [MaybeUninit<T>; N] -) -> [T; N]

    🔬This is a nightly-only experimental API. (maybe_uninit_array_assume_init)

    Extracts the values from an array of MaybeUninit containers.

    +
    const: unstable · source

    pub unsafe fn array_assume_init<const N: usize>( + array: [MaybeUninit<T>; N] +) -> [T; N]

    🔬This is a nightly-only experimental API. (maybe_uninit_array_assume_init)

    Extracts the values from an array of MaybeUninit containers.

    Safety

    It is up to the caller to guarantee that all elements of the array are in an initialized state.

    @@ -596,24 +596,24 @@
    Examples
    }; assert_eq!(array, [0, 1, 2]);
    -
    const: unstable · source

    pub unsafe fn slice_assume_init_ref(slice: &[MaybeUninit<T>]) -> &[T]

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Assuming all the elements are initialized, get a slice to them.

    +
    const: unstable · source

    pub unsafe fn slice_assume_init_ref(slice: &[MaybeUninit<T>]) -> &[T]

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Assuming all the elements are initialized, get a slice to them.

    Safety

    It is up to the caller to guarantee that the MaybeUninit<T> elements really are in an initialized state. Calling this when the content is not yet fully initialized causes undefined behavior.

    See assume_init_ref for more details and examples.

    -
    const: unstable · source

    pub unsafe fn slice_assume_init_mut(slice: &mut [MaybeUninit<T>]) -> &mut [T]

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Assuming all the elements are initialized, get a mutable slice to them.

    +
    const: unstable · source

    pub unsafe fn slice_assume_init_mut(slice: &mut [MaybeUninit<T>]) -> &mut [T]

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Assuming all the elements are initialized, get a mutable slice to them.

    Safety

    It is up to the caller to guarantee that the MaybeUninit<T> elements really are in an initialized state. Calling this when the content is not yet fully initialized causes undefined behavior.

    See assume_init_mut for more details and examples.

    -
    const: unstable · source

    pub fn slice_as_ptr(this: &[MaybeUninit<T>]) -> *const T

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Gets a pointer to the first element of the array.

    -
    const: unstable · source

    pub fn slice_as_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Gets a mutable pointer to the first element of the array.

    -
    source

    pub fn write_slice<'a>(this: &'a mut [MaybeUninit<T>], src: &[T]) -> &'a mut [T]where - T: Copy,

    🔬This is a nightly-only experimental API. (maybe_uninit_write_slice)

    Copies the elements from src to this, returning a mutable reference to the now initialized contents of this.

    +
    const: unstable · source

    pub fn slice_as_ptr(this: &[MaybeUninit<T>]) -> *const T

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Gets a pointer to the first element of the array.

    +
    const: unstable · source

    pub fn slice_as_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T

    🔬This is a nightly-only experimental API. (maybe_uninit_slice)

    Gets a mutable pointer to the first element of the array.

    +
    source

    pub fn write_slice<'a>(this: &'a mut [MaybeUninit<T>], src: &[T]) -> &'a mut [T]where + T: Copy,

    🔬This is a nightly-only experimental API. (maybe_uninit_write_slice)

    Copies the elements from src to this, returning a mutable reference to the now initialized contents of this.

    If T does not implement Copy, use write_slice_cloned

    -

    This is similar to slice::copy_from_slice.

    +

    This is similar to slice::copy_from_slice.

    Panics

    This function will panic if the two slices have different lengths.

    Examples
    @@ -642,14 +642,14 @@
    Examples
    } assert_eq!(vec, src);
    -
    source

    pub fn write_slice_cloned<'a>( +

    source

    pub fn write_slice_cloned<'a>( this: &'a mut [MaybeUninit<T>], - src: &[T] -) -> &'a mut [T]where - T: Clone,

    🔬This is a nightly-only experimental API. (maybe_uninit_write_slice)

    Clones the elements from src to this, returning a mutable reference to the now initialized contents of this. + src: &[T] +) -> &'a mut [T]where + T: Clone,

    🔬This is a nightly-only experimental API. (maybe_uninit_write_slice)

    Clones the elements from src to this, returning a mutable reference to the now initialized contents of this. Any already initialized elements will not be dropped.

    If T implements Copy, use write_slice

    -

    This is similar to slice::clone_from_slice but does not drop existing elements.

    +

    This is similar to slice::clone_from_slice but does not drop existing elements.

    Panics

    This function will panic if the two slices have different lengths, or if the implementation of Clone panics.

    If there is a panic, the already cloned elements will be dropped.

    @@ -679,7 +679,7 @@
    Examples
    } assert_eq!(vec, src);
    -
    source

    pub fn as_bytes(&self) -> &[MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this MaybeUninit as a slice of potentially uninitialized bytes.

    +
    source

    pub fn as_bytes(&self) -> &[MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this MaybeUninit as a slice of potentially uninitialized bytes.

    Note that even if the contents of a MaybeUninit have been initialized, the value may still contain padding bytes which are left uninitialized.

    Examples
    @@ -691,7 +691,7 @@
    Examples
    let uninit_bytes = uninit.as_bytes(); let bytes = unsafe { MaybeUninit::slice_assume_init_ref(uninit_bytes) }; assert_eq!(bytes, val.to_ne_bytes());
    -
    source

    pub fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this MaybeUninit as a mutable slice of potentially uninitialized +

    source

    pub fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this MaybeUninit as a mutable slice of potentially uninitialized bytes.

    Note that even if the contents of a MaybeUninit have been initialized, the value may still contain padding bytes which are left uninitialized.

    @@ -709,7 +709,7 @@
    Examples
    } let val2 = unsafe { uninit.assume_init() }; assert_eq!(val2, 0x123456cd);
    -
    source

    pub fn slice_as_bytes(this: &[MaybeUninit<T>]) -> &[MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this slice of MaybeUninit as a slice of potentially uninitialized +

    source

    pub fn slice_as_bytes(this: &[MaybeUninit<T>]) -> &[MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this slice of MaybeUninit as a slice of potentially uninitialized bytes.

    Note that even if the contents of a MaybeUninit have been initialized, the value may still contain padding bytes which are left uninitialized.

    @@ -723,7 +723,7 @@
    Examples
    let val1 = u16::from_ne_bytes(bytes[0..2].try_into().unwrap()); let val2 = u16::from_ne_bytes(bytes[2..4].try_into().unwrap()); assert_eq!(&[val1, val2], &[0x1234u16, 0x5678u16]);
    -
    source

    pub fn slice_as_bytes_mut(this: &mut [MaybeUninit<T>]) -> &mut [MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this mutable slice of MaybeUninit as a mutable slice of +

    source

    pub fn slice_as_bytes_mut(this: &mut [MaybeUninit<T>]) -> &mut [MaybeUninit<u8>]

    🔬This is a nightly-only experimental API. (maybe_uninit_as_bytes)

    Returns the contents of this mutable slice of MaybeUninit as a mutable slice of potentially uninitialized bytes.

    Note that even if the contents of a MaybeUninit have been initialized, the value may still contain padding bytes which are left uninitialized.

    @@ -740,27 +740,42 @@
    Examples
    } else { assert_eq!(vals, &[0x1234u16, 0x5678u16]); }
    -
    source§

    impl<T, const N: usize> MaybeUninit<[T; N]>

    source

    pub const fn transpose(self) -> [MaybeUninit<T>; N]

    🔬This is a nightly-only experimental API. (maybe_uninit_uninit_array_transpose)

    Transposes a MaybeUninit<[T; N]> into a [MaybeUninit<T>; N].

    +
    source§

    impl<T, const N: usize> MaybeUninit<[T; N]>

    source

    pub const fn transpose(self) -> [MaybeUninit<T>; N]

    🔬This is a nightly-only experimental API. (maybe_uninit_uninit_array_transpose)

    Transposes a MaybeUninit<[T; N]> into a [MaybeUninit<T>; N].

    Examples
    #![feature(maybe_uninit_uninit_array_transpose)]
     
     let data: [MaybeUninit<u8>; 1000] = MaybeUninit::uninit().transpose();
    -

    Trait Implementations§

    source§

    impl<T> Clone for MaybeUninit<T>where - T: Copy,

    source§

    fn clone(&self) -> MaybeUninit<T>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    1.41.0 · source§

    impl<T> Debug for MaybeUninit<T>

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Copy for MaybeUninit<T>where - T: Copy,

    Auto Trait Implementations§

    §

    impl<T> RefUnwindSafe for MaybeUninit<T>where - T: RefUnwindSafe,

    §

    impl<T> Send for MaybeUninit<T>where - T: Send,

    §

    impl<T> Sync for MaybeUninit<T>where - T: Sync,

    §

    impl<T> Unpin for MaybeUninit<T>where - T: Unpin,

    §

    impl<T> UnwindSafe for MaybeUninit<T>where - T: UnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    source§

    impl<T> Clone for MaybeUninit<T>where + T: Copy,

    source§

    fn clone(&self) -> MaybeUninit<T>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    1.41.0 · source§

    impl<T> Debug for MaybeUninit<T>

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<T> FromBytes for MaybeUninit<T>where + T: FromBytes,

    §

    fn ref_from(bytes: &[u8]) -> Option<&Self>where + Self: Sized,

    Interprets the given bytes as a &Self without copying. Read more
    §

    fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>where + Self: Sized,

    Interprets the prefix of the given bytes as a &Self without copying. Read more
    §

    fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>where + Self: Sized,

    Interprets the suffix of the given bytes as a &Self without copying. Read more
    §

    fn slice_from(bytes: &[u8]) -> Option<&[Self]>where + Self: Sized,

    Interprets the given bytes as a &[Self] without copying. Read more
    §

    fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where + Self: Sized,

    Interprets the prefix of the given bytes as a &[Self] with length +equal to count without copying. Read more
    §

    fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where + Self: Sized,

    Interprets the suffix of the given bytes as a &[Self] with length +equal to count without copying. Read more
    §

    fn read_from(bytes: &[u8]) -> Option<Self>where + Self: Sized,

    Reads a copy of Self from bytes. Read more
    §

    fn read_from_prefix(bytes: &[u8]) -> Option<Self>where + Self: Sized,

    Reads a copy of Self from the prefix of bytes. Read more
    §

    fn read_from_suffix(bytes: &[u8]) -> Option<Self>where + Self: Sized,

    Reads a copy of Self from the suffix of bytes. Read more
    §

    impl<T> FromZeroes for MaybeUninit<T>where + T: FromZeroes,

    §

    fn zero(&mut self)

    Overwrites self with zeroes. Read more
    §

    fn new_zeroed() -> Selfwhere + Self: Sized,

    Creates an instance of Self from zeroed bytes. Read more
    source§

    impl<T> Copy for MaybeUninit<T>where + T: Copy,

    §

    impl<T> Unaligned for MaybeUninit<T>where + T: Unaligned,

    Auto Trait Implementations§

    §

    impl<T> RefUnwindSafe for MaybeUninit<T>where + T: RefUnwindSafe,

    §

    impl<T> Send for MaybeUninit<T>where + T: Send,

    §

    impl<T> Sync for MaybeUninit<T>where + T: Sync,

    §

    impl<T> Unpin for MaybeUninit<T>where + T: Unpin,

    §

    impl<T> UnwindSafe for MaybeUninit<T>where + T: UnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.Dynamic.html b/casbin/rhai/plugin/struct.Dynamic.html index 1921eb6d..cc80e4cf 100644 --- a/casbin/rhai/plugin/struct.Dynamic.html +++ b/casbin/rhai/plugin/struct.Dynamic.html @@ -1,21 +1,23 @@ -Dynamic in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Dynamic

    pub struct Dynamic(_);
    Expand description

    Dynamic type containing any value.

    -

    Implementations§

    §

    impl Dynamic

    pub fn as_string(self) -> Result<String, &'static str>

    👎Deprecated since 1.1.0: use into_string instead

    Convert the Dynamic into a String and return it. +Dynamic in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Dynamic

    pub struct Dynamic(/* private fields */);
    Expand description

    Dynamic type containing any value.

    +

    Implementations§

    §

    impl Dynamic

    pub fn as_string(self) -> Result<String, &'static str>

    👎Deprecated since 1.1.0: use into_string instead

    Convert the Dynamic into a String and return it. If there are other references to the same string, a cloned copy is returned. Returns the name of the actual type if the cast fails.

    Deprecated
    -

    This method is deprecated. Use into_string instead.

    +

    This method is deprecated. +Use into_string instead.

    This method will be removed in the next major version.

    -

    pub fn as_immutable_string(self) -> Result<ImmutableString, &'static str>

    👎Deprecated since 1.1.0: use into_immutable_string instead

    Convert the Dynamic into an ImmutableString and return it. +

    pub fn as_immutable_string(self) -> Result<ImmutableString, &'static str>

    👎Deprecated since 1.1.0: use into_immutable_string instead

    Convert the Dynamic into an ImmutableString and return it. Returns the name of the actual type if the cast fails.

    Deprecated
    -

    This method is deprecated. Use into_immutable_string instead.

    +

    This method is deprecated. +Use into_immutable_string instead.

    This method will be removed in the next major version.

    -
    §

    impl Dynamic

    pub const fn tag(&self) -> i32

    Get the arbitrary data attached to this Dynamic.

    -

    pub fn set_tag(&mut self, value: i32) -> &mut Dynamic

    Attach arbitrary data to this Dynamic.

    -

    pub const fn is_variant(&self) -> bool

    Does this Dynamic hold a variant data type instead of one of the supported system +

    §

    impl Dynamic

    pub const fn tag(&self) -> i32

    Get the arbitrary data attached to this Dynamic.

    +

    pub fn set_tag(&mut self, value: i32) -> &mut Dynamic

    Attach arbitrary data to this Dynamic.

    +

    pub const fn is_variant(&self) -> bool

    Does this Dynamic hold a variant data type instead of one of the supported system primitive types?

    -

    pub fn is<T>(&self) -> boolwhere - T: Any + Clone,

    Is the value held by this Dynamic a particular type?

    +

    pub fn is<T>(&self) -> boolwhere + T: Any + Clone,

    Is the value held by this Dynamic a particular type?

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    @@ -23,35 +25,35 @@
    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -

    pub fn type_name(&self) -> &'static str

    Get the name of the type of the value held by this Dynamic.

    +

    pub fn type_name(&self) -> &'static str

    Get the name of the type of the value held by this Dynamic.

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -
    §

    impl Dynamic

    pub const UNIT: Dynamic = Self(Union::Unit((), DEFAULT_TAG_VALUE, ReadWrite))

    A Dynamic containing a ().

    -

    pub const TRUE: Dynamic = Self::from_bool(true)

    A Dynamic containing a true.

    -

    pub const FALSE: Dynamic = Self::from_bool(false)

    A Dynamic containing a false.

    -

    pub const ZERO: Dynamic = Self::from_int(0)

    A Dynamic containing the integer zero.

    -

    pub const ONE: Dynamic = Self::from_int(1)

    A Dynamic containing the integer 1.

    -

    pub const TWO: Dynamic = Self::from_int(2)

    A Dynamic containing the integer 2.

    -

    pub const THREE: Dynamic = Self::from_int(3)

    A Dynamic containing the integer 3.

    -

    pub const TEN: Dynamic = Self::from_int(10)

    A Dynamic containing the integer 10.

    -

    pub const HUNDRED: Dynamic = Self::from_int(100)

    A Dynamic containing the integer 100.

    -

    pub const THOUSAND: Dynamic = Self::from_int(1000)

    A Dynamic containing the integer 1,000.

    -

    pub const MILLION: Dynamic = Self::from_int(1000000)

    A Dynamic containing the integer 1,000,000.

    -

    pub const NEGATIVE_ONE: Dynamic = Self::from_int(-1)

    A Dynamic containing the integer -1.

    -

    pub const NEGATIVE_TWO: Dynamic = Self::from_int(-2)

    A Dynamic containing the integer -2.

    -

    pub const fn from_bool(value: bool) -> Dynamic

    Create a new Dynamic from a bool.

    -

    pub const fn from_int(value: i32) -> Dynamic

    Create a new Dynamic from an INT.

    -

    pub const fn from_char(value: char) -> Dynamic

    Create a new Dynamic from a char.

    -

    pub fn from_array(array: Vec<Dynamic, Global>) -> Dynamic

    Create a Dynamic from an Array.

    -

    pub fn from_blob(blob: Vec<u8, Global>) -> Dynamic

    Create a Dynamic from a Blob.

    +
    §

    impl Dynamic

    pub const UNIT: Dynamic = _

    A Dynamic containing a ().

    +

    pub const TRUE: Dynamic = _

    A Dynamic containing a true.

    +

    pub const FALSE: Dynamic = _

    A Dynamic containing a false.

    +

    pub const ZERO: Dynamic = _

    A Dynamic containing the integer zero.

    +

    pub const ONE: Dynamic = _

    A Dynamic containing the integer 1.

    +

    pub const TWO: Dynamic = _

    A Dynamic containing the integer 2.

    +

    pub const THREE: Dynamic = _

    A Dynamic containing the integer 3.

    +

    pub const TEN: Dynamic = _

    A Dynamic containing the integer 10.

    +

    pub const HUNDRED: Dynamic = _

    A Dynamic containing the integer 100.

    +

    pub const THOUSAND: Dynamic = _

    A Dynamic containing the integer 1,000.

    +

    pub const MILLION: Dynamic = _

    A Dynamic containing the integer 1,000,000.

    +

    pub const NEGATIVE_ONE: Dynamic = _

    A Dynamic containing the integer -1.

    +

    pub const NEGATIVE_TWO: Dynamic = _

    A Dynamic containing the integer -2.

    +

    pub const fn from_bool(value: bool) -> Dynamic

    Create a new Dynamic from a bool.

    +

    pub const fn from_int(value: i32) -> Dynamic

    Create a new Dynamic from an INT.

    +

    pub const fn from_char(value: char) -> Dynamic

    Create a new Dynamic from a char.

    +

    pub fn from_array(array: Vec<Dynamic, Global>) -> Dynamic

    Create a Dynamic from an Array.

    +

    pub fn from_blob(blob: Vec<u8, Global>) -> Dynamic

    Create a Dynamic from a Blob.

    pub fn from_map( - map: BTreeMap<SmartString<LazyCompact>, Dynamic, Global> + map: BTreeMap<SmartString<LazyCompact>, Dynamic, Global> ) -> Dynamic

    Create a Dynamic from a Map.

    pub fn from_timestamp(value: Instant) -> Dynamic

    Create a new Dynamic from an Instant.

    Not available under no-std or no_time.

    pub fn into_read_only(self) -> Dynamic

    Make this Dynamic read-only (i.e. a constant).

    -

    pub fn is_read_only(&self) -> bool

    Is this Dynamic read-only?

    +

    pub fn is_read_only(&self) -> bool

    Is this Dynamic read-only?

    Constant Dynamic values are read-only.

    Usage

    If a &mut Dynamic to such a constant is passed to a Rust function, the function @@ -63,16 +65,16 @@

    Shared Values

    If a Dynamic holds a shared value, then it is read-only only if the shared value itself is read-only.

    pub fn from<T>(value: T) -> Dynamicwhere - T: Variant + Clone,

    Create a Dynamic from any type. A Dynamic value is simply returned as is.

    + T: Variant + Clone,

    Create a Dynamic from any type. A Dynamic value is simply returned as is.

    Arrays

    Beware that you need to pass in an Array type for it to be recognized as -an Array. A Vec<T> does not get automatically converted to an +an Array. A Vec<T> does not get automatically converted to an Array, but will be a custom type instead (stored as a trait object).

    -

    Use array.into() or array.into_iter() to convert a Vec<T> into a Dynamic as +

    Use array.into() or array.into_iter() to convert a Vec<T> into a Dynamic as an Array value. See the examples for details.

    Hash Maps
    -

    Similarly, passing in a HashMap<String, T> or -BTreeMap<String, T> will not get a Map but a +

    Similarly, passing in a HashMap<String, T> or +BTreeMap<String, T> will not get a Map but a custom type.

    Again, use map.into() to get a Dynamic with a Map value. See the examples for details.

    @@ -111,11 +113,11 @@
    Examples
    let result: Dynamic = map.into(); assert_eq!(result.type_name(), "map");

    pub fn take(&mut self) -> Dynamic

    Return this Dynamic, replacing it with Dynamic::UNIT.

    -

    pub fn try_cast<T>(self) -> Option<T>where - T: Any,

    Convert the Dynamic value into specific type.

    +

    pub fn try_cast<T>(self) -> Option<T>where + T: Any,

    Convert the Dynamic value into specific type.

    Casting to a Dynamic just returns as is, but if it contains a shared value, it is cloned into a Dynamic with a normal value.

    -

    Returns None if types mismatched.

    +

    Returns None if types mismatched.

    Panics or Deadlocks

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    @@ -127,7 +129,7 @@
    Example
    assert_eq!(x.try_cast::<u32>().expect("x should be u32"), 42);

    pub fn cast<T>(self) -> Twhere - T: Any + Clone,

    Convert the Dynamic value into a specific type.

    + T: Any + Clone,

    Convert the Dynamic value into a specific type.

    Casting to a Dynamic just returns as is, but if it contains a shared value, it is cloned into a Dynamic with a normal value.

    Panics or Deadlocks
    @@ -142,10 +144,10 @@
    Example
    assert_eq!(x.cast::<u32>(), 42);

    pub fn clone_cast<T>(&self) -> Twhere - T: Any + Clone,

    Clone the Dynamic value and convert it into a specific type.

    + T: Any + Clone,

    Clone the Dynamic value and convert it into a specific type.

    Casting to a Dynamic just returns as is, but if it contains a shared value, it is cloned into a Dynamic with a normal value.

    -

    Returns None if types mismatched.

    +

    Returns None if types mismatched.

    Panics or Deadlocks

    Panics if the cast fails (e.g. the type of the actual value is not the same as the specified type).

    @@ -166,103 +168,103 @@
    Example

    If the Dynamic is not a shared value, it returns itself.

    If the Dynamic is a shared value, it returns the shared value if there are no outstanding references, or a cloned copy.

    -

    pub fn read_lock<T>(&self) -> Option<DynamicReadLock<'_, T>>where - T: Any + Clone,

    Get a reference of a specific type to the Dynamic. +

    pub fn read_lock<T>(&self) -> Option<DynamicReadLock<'_, T>>where + T: Any + Clone,

    Get a reference of a specific type to the Dynamic. Casting to Dynamic just returns a reference to it.

    -

    Returns None if the cast fails.

    +

    Returns None if the cast fails.

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -

    pub fn write_lock<T>(&mut self) -> Option<DynamicWriteLock<'_, T>>where - T: Any + Clone,

    Get a mutable reference of a specific type to the Dynamic. +

    pub fn write_lock<T>(&mut self) -> Option<DynamicWriteLock<'_, T>>where + T: Any + Clone,

    Get a mutable reference of a specific type to the Dynamic. Casting to Dynamic just returns a mutable reference to it.

    -

    Returns None if the cast fails.

    +

    Returns None if the cast fails.

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -

    pub fn is_unit(&self) -> bool

    Return true if the Dynamic holds a ().

    -

    pub fn is_int(&self) -> bool

    Return true if the Dynamic holds the system integer type INT.

    -

    pub fn is_bool(&self) -> bool

    Return true if the Dynamic holds a bool.

    -

    pub fn is_char(&self) -> bool

    Return true if the Dynamic holds a char.

    -

    pub fn is_string(&self) -> bool

    Return true if the Dynamic holds an ImmutableString.

    -

    pub fn is_array(&self) -> bool

    Return true if the Dynamic holds an Array.

    +

    pub fn is_unit(&self) -> bool

    Return true if the Dynamic holds a ().

    +

    pub fn is_int(&self) -> bool

    Return true if the Dynamic holds the system integer type INT.

    +

    pub fn is_bool(&self) -> bool

    Return true if the Dynamic holds a bool.

    +

    pub fn is_char(&self) -> bool

    Return true if the Dynamic holds a char.

    +

    pub fn is_string(&self) -> bool

    Return true if the Dynamic holds an ImmutableString.

    +

    pub fn is_array(&self) -> bool

    Return true if the Dynamic holds an Array.

    Not available under no_index.

    -

    pub fn is_blob(&self) -> bool

    Return true if the Dynamic holds a Blob.

    +

    pub fn is_blob(&self) -> bool

    Return true if the Dynamic holds a Blob.

    Not available under no_index.

    -

    pub fn is_map(&self) -> bool

    Return true if the Dynamic holds a Map.

    +

    pub fn is_map(&self) -> bool

    Return true if the Dynamic holds a Map.

    Not available under no_object.

    -

    pub fn is_timestamp(&self) -> bool

    Return true if the Dynamic holds a timestamp.

    +

    pub fn is_timestamp(&self) -> bool

    Return true if the Dynamic holds a timestamp.

    Not available under no_time.

    -

    pub fn as_unit(&self) -> Result<(), &'static str>

    Cast the Dynamic as a unit (). +

    pub fn as_unit(&self) -> Result<(), &'static str>

    Cast the Dynamic as a unit (). Returns the name of the actual type if the cast fails.

    -

    pub fn as_int(&self) -> Result<i32, &'static str>

    Cast the Dynamic as the system integer type INT. +

    pub fn as_int(&self) -> Result<i32, &'static str>

    Cast the Dynamic as the system integer type INT. Returns the name of the actual type if the cast fails.

    -

    pub fn as_bool(&self) -> Result<bool, &'static str>

    Cast the Dynamic as a bool. +

    pub fn as_bool(&self) -> Result<bool, &'static str>

    Cast the Dynamic as a bool. Returns the name of the actual type if the cast fails.

    -

    pub fn as_char(&self) -> Result<char, &'static str>

    Cast the Dynamic as a char. +

    pub fn as_char(&self) -> Result<char, &'static str>

    Cast the Dynamic as a char. Returns the name of the actual type if the cast fails.

    -

    pub fn into_string(self) -> Result<String, &'static str>

    Convert the Dynamic into a String. +

    pub fn into_string(self) -> Result<String, &'static str>

    Convert the Dynamic into a String. If there are other references to the same string, a cloned copy is returned. Returns the name of the actual type if the cast fails.

    -

    pub fn into_immutable_string(self) -> Result<ImmutableString, &'static str>

    Convert the Dynamic into an ImmutableString. +

    pub fn into_immutable_string(self) -> Result<ImmutableString, &'static str>

    Convert the Dynamic into an ImmutableString. Returns the name of the actual type if the cast fails.

    -

    pub fn into_array(self) -> Result<Vec<Dynamic, Global>, &'static str>

    Convert the Dynamic into an Array. +

    pub fn into_array(self) -> Result<Vec<Dynamic, Global>, &'static str>

    Convert the Dynamic into an Array. Returns the name of the actual type if the cast fails.

    Not available under no_index.

    -

    pub fn into_typed_array<T>(self) -> Result<Vec<T, Global>, &'static str>where - T: Variant + Clone,

    Convert the Dynamic into a Vec. +

    pub fn into_typed_array<T>(self) -> Result<Vec<T, Global>, &'static str>where + T: Variant + Clone,

    Convert the Dynamic into a Vec. Returns the name of the actual type if any cast fails.

    Not available under no_index.

    -

    pub fn into_blob(self) -> Result<Vec<u8, Global>, &'static str>

    Convert the Dynamic into a Blob. +

    pub fn into_blob(self) -> Result<Vec<u8, Global>, &'static str>

    Convert the Dynamic into a Blob. Returns the name of the actual type if the cast fails.

    Not available under no_index.

    -

    pub fn deep_scan(&mut self, filter: impl FnMut(&mut Dynamic))

    Recursively scan for Dynamic values within this Dynamic (e.g. items in an array or map), +

    pub fn deep_scan(&mut self, filter: impl FnMut(&mut Dynamic))

    Recursively scan for Dynamic values within this Dynamic (e.g. items in an array or map), calling a filter function on each.

    Shared values are NOT scanned.

    -

    Trait Implementations§

    §

    impl Clone for Dynamic

    §

    fn clone(&self) -> Dynamic

    Clone the Dynamic value.

    +

    Trait Implementations§

    §

    impl Clone for Dynamic

    §

    fn clone(&self) -> Dynamic

    Clone the Dynamic value.

    WARNING

    The cloned copy is marked read-write even if the original is read-only.

    -
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Dynamic

    §

    fn default() -> Dynamic

    Returns the “default value” for a type. Read more
    §

    impl<'de> Deserialize<'de> for Dynamic

    §

    fn deserialize<D>( +

    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Dynamic

    §

    fn default() -> Dynamic

    Returns the “default value” for a type. Read more
    §

    impl<'de> Deserialize<'de> for Dynamic

    §

    fn deserialize<D>( deserializer: D -) -> Result<Dynamic, <D as Deserializer<'de>>::Error>where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Extend<Dynamic> for FnPtr

    §

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = Dynamic>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<T> From<&[T]> for Dynamicwhere - T: Variant + Clone,

    §

    fn from(value: &[T]) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<()> for Dynamic

    §

    fn from(value: ()) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<BTreeMap<K, T, Global>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>, - T: Variant + Clone,

    §

    fn from(value: BTreeMap<K, T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<BTreeSet<K, Global>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: BTreeSet<K, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<FnPtr> for Dynamic

    §

    fn from(value: FnPtr) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<HashMap<K, T, RandomState>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>, - T: Variant + Clone,

    §

    fn from(value: HashMap<K, T, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<HashSet<K, RandomState>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: HashSet<K, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Instant> for Dynamic

    §

    fn from(value: Instant) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Range<i32>> for Dynamic

    §

    fn from(value: Range<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<RangeInclusive<i32>> for Dynamic

    §

    fn from(value: RangeInclusive<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<S> From<S> for Dynamicwhere - S: Into<ImmutableString>,

    §

    fn from(value: S) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> From<Vec<T, Global>> for Dynamicwhere - T: Variant + Clone,

    §

    fn from(value: Vec<T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<bool> for Dynamic

    §

    fn from(value: bool) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<char> for Dynamic

    §

    fn from(value: char) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<i32> for Dynamic

    §

    fn from(value: i32) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> FromIterator<T> for Dynamicwhere - T: Variant + Clone,

    §

    fn from_iter<X>(iter: X) -> Dynamicwhere - X: IntoIterator<Item = T>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for Dynamic

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str(value: &str) -> Result<Dynamic, <Dynamic as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for Dynamic

    §

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Hash the Dynamic value.

    +) -> Result<Dynamic, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,
    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Extend<Dynamic> for FnPtr

    §

    fn extend<T>(&mut self, iter: T)where + T: IntoIterator<Item = Dynamic>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<T> From<&[T]> for Dynamicwhere + T: Variant + Clone,

    §

    fn from(value: &[T]) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<()> for Dynamic

    §

    fn from(value: ()) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<BTreeMap<K, T, Global>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>, + T: Variant + Clone,

    §

    fn from(value: BTreeMap<K, T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<BTreeSet<K, Global>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: BTreeSet<K, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<FnPtr> for Dynamic

    §

    fn from(value: FnPtr) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<HashMap<K, T, RandomState>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>, + T: Variant + Clone,

    §

    fn from(value: HashMap<K, T, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<HashSet<K, RandomState>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: HashSet<K, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Instant> for Dynamic

    §

    fn from(value: Instant) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Range<i32>> for Dynamic

    §

    fn from(value: Range<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<RangeInclusive<i32>> for Dynamic

    §

    fn from(value: RangeInclusive<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<S> From<S> for Dynamicwhere + S: Into<ImmutableString>,

    §

    fn from(value: S) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> From<Vec<T, Global>> for Dynamicwhere + T: Variant + Clone,

    §

    fn from(value: Vec<T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<bool> for Dynamic

    §

    fn from(value: bool) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<char> for Dynamic

    §

    fn from(value: char) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<i32> for Dynamic

    §

    fn from(value: i32) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> FromIterator<T> for Dynamicwhere + T: Variant + Clone,

    §

    fn from_iter<X>(iter: X) -> Dynamicwhere + X: IntoIterator<Item = T>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for Dynamic

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str(value: &str) -> Result<Dynamic, <Dynamic as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for Dynamic

    §

    fn hash<H>(&self, state: &mut H)where + H: Hasher,

    Hash the Dynamic value.

    Panics

    Panics if the Dynamic value contains an unrecognized trait object.

    -
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl<'de> IntoDeserializer<'de, Box<EvalAltResult, Global>> for &'de Dynamic

    §

    type Deserializer = DynamicDeserializer<'de>

    The type of the deserializer being converted into.
    §

    fn into_deserializer( +

    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl<'de> IntoDeserializer<'de, Box<EvalAltResult, Global>> for &'de Dynamic

    §

    type Deserializer = DynamicDeserializer<'de>

    The type of the deserializer being converted into.
    §

    fn into_deserializer( self -) -> <&'de Dynamic as IntoDeserializer<'de, Box<EvalAltResult, Global>>>::Deserializer

    Convert this value into a deserializer.
    §

    impl Serialize for Dynamic

    §

    fn serialize<S>( +) -> <&'de Dynamic as IntoDeserializer<'de, Box<EvalAltResult, Global>>>::Deserializer

    Convert this value into a deserializer.
    §

    impl Serialize for Dynamic

    §

    fn serialize<S>( &self, ser: S -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,
    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.Engine.html b/casbin/rhai/plugin/struct.Engine.html index fa8d8417..30d9bfbe 100644 --- a/casbin/rhai/plugin/struct.Engine.html +++ b/casbin/rhai/plugin/struct.Engine.html @@ -1,8 +1,8 @@ -Engine in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Engine

    pub struct Engine { /* private fields */ }
    Expand description

    Rhai main scripting engine.

    +Engine in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Engine

    pub struct Engine { /* private fields */ }
    Expand description

    Rhai main scripting engine.

    Thread Safety

    Engine is re-entrant.

    -

    Currently, Engine is neither Send nor Sync. -Use the sync feature to make it Send + Sync.

    +

    Currently, Engine is neither Send nor Sync. +Use the sync feature to make it Send + Sync.

    Example

    use rhai::Engine;
     
    @@ -11,8 +11,8 @@ 

    Example

    let result = engine.eval::<i64>("40 + 2")?; println!("Answer: {result}"); // prints 42
    -

    Implementations§

    §

    impl Engine

    pub fn eval<T>(&self, script: &str) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string as a script, returning the result value or an error.

    +

    Implementations§

    §

    impl Engine

    pub fn eval<T>(&self, script: &str) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string as a script, returning the result value or an error.

    Example
    use rhai::Engine;
     
    @@ -21,10 +21,10 @@ 
    Example
    assert_eq!(engine.eval::<i64>("40 + 2")?, 42);

    pub fn eval_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string as a script with own scope, returning the result value or an error.

    + scope: &mut Scope<'_>, + script: &str +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string as a script with own scope, returning the result value or an error.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within the scope are propagated throughout the script including functions.

    @@ -45,9 +45,9 @@
    Example
    assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 44);

    pub fn eval_expression<T>( &self, - script: &str -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string containing an expression, returning the result value or an error.

    + script: &str +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string containing an expression, returning the result value or an error.

    Example
    use rhai::Engine;
     
    @@ -56,10 +56,10 @@ 
    Example
    assert_eq!(engine.eval_expression::<i64>("40 + 2")?, 42);

    pub fn eval_expression_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string containing an expression with own scope, returning the result value or an error.

    + scope: &mut Scope<'_>, + script: &str +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string containing an expression with own scope, returning the result value or an error.

    Example
    use rhai::{Engine, Scope};
     
    @@ -70,8 +70,8 @@ 
    Example
    scope.push("x", 40_i64); assert_eq!(engine.eval_expression_with_scope::<i64>(&mut scope, "x + 2")?, 42);
    -

    pub fn eval_ast<T>(&self, ast: &AST) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate an AST, returning the result value or an error.

    +

    pub fn eval_ast<T>(&self, ast: &AST) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate an AST, returning the result value or an error.

    Example
    use rhai::Engine;
     
    @@ -84,10 +84,10 @@ 
    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);

    pub fn eval_ast_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, + scope: &mut Scope<'_>, ast: &AST -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate an AST with own scope, returning the result value or an error.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate an AST with own scope, returning the result value or an error.

    Example
    use rhai::{Engine, Scope};
     
    @@ -106,7 +106,7 @@ 
    Example
    // The variable in the scope is modified assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 44);
    -
    §

    impl Engine

    pub fn run(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script.

    +
    §

    impl Engine

    pub fn run(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script.

    Example
    use rhai::Engine;
     
    @@ -115,9 +115,9 @@ 
    Example
    engine.run("print(40 + 2);")?;

    pub fn run_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script with own scope.

    + scope: &mut Scope<'_>, + script: &str +) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script with own scope.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within the scope are propagated throughout the script including functions.

    @@ -135,7 +135,7 @@
    Example
    // The variable in the scope is modified assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 42);
    -

    pub fn run_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST.

    +

    pub fn run_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST.

    Example
    use rhai::Engine;
     
    @@ -148,9 +148,9 @@ 
    Example
    engine.run_ast(&ast)?;

    pub fn run_ast_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, + scope: &mut Scope<'_>, ast: &AST -) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST with own scope.

    +) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST with own scope.

    Example
    use rhai::{Engine, Scope};
     
    @@ -168,7 +168,7 @@ 
    Example
    // The variable in the scope is modified assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 42);
    -
    §

    impl Engine

    pub fn compile(&self, script: impl AsRef<str>) -> Result<AST, ParseError>

    Compile a string into an AST, which can be used later for evaluation.

    +
    §

    impl Engine

    pub fn compile(&self, script: impl AsRef<str>) -> Result<AST, ParseError>

    Compile a string into an AST, which can be used later for evaluation.

    Example
    use rhai::Engine;
     
    @@ -182,9 +182,9 @@ 
    Example
    }

    pub fn compile_with_scope( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: impl AsRef<str> -) -> Result<AST, ParseError>

    Compile a string into an AST using own scope, which can be used later for evaluation.

    + scope: &Scope<'_>, + script: impl AsRef<str> +) -> Result<AST, ParseError>

    Compile a string into an AST using own scope, which can be used later for evaluation.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within the scope are propagated throughout the script including functions. This allows functions @@ -211,10 +211,10 @@

    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);

    pub fn compile_scripts_with_scope<S>( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - scripts: impl AsRef<[S]> -) -> Result<AST, ParseError>where - S: AsRef<str>,

    When passed a list of strings, first join the strings into one large script, and then + scope: &Scope<'_>, + scripts: impl AsRef<[S]> +) -> Result<AST, ParseError>where + S: AsRef<str>,

    When passed a list of strings, first join the strings into one large script, and then compile them into an AST using own scope, which can be used later for evaluation.

    The scope is useful for passing constants into the script for optimization when using [OptimizationLevel::Full][crate::OptimizationLevel::Full].

    @@ -249,8 +249,8 @@
    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);

    pub fn compile_expression( &self, - script: impl AsRef<str> -) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST, + script: impl AsRef<str> +) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST, which can be used later for evaluation.

    Example
    use rhai::Engine;
    @@ -265,9 +265,9 @@ 
    Example
    }

    pub fn compile_expression_with_scope( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: impl AsRef<str> -) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST using own scope, + scope: &Scope<'_>, + script: impl AsRef<str> +) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST using own scope, which can be used later for evaluation.

    Example
    use rhai::{Engine, Scope, OptimizationLevel};
    @@ -291,9 +291,9 @@ 
    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);
    §

    impl Engine

    pub fn parse_json( &self, - json: impl AsRef<str>, - has_null: bool -) -> Result<BTreeMap<SmartString<LazyCompact>, Dynamic, Global>, Box<EvalAltResult, Global>>

    Parse a JSON string into an object map.

    + json: impl AsRef<str>, + has_null: bool +) -> Result<BTreeMap<SmartString<LazyCompact>, Dynamic, Global>, Box<EvalAltResult, Global>>

    Parse a JSON string into an object map.

    This is a light-weight alternative to using, say, serde_json to deserialize the JSON.

    Not available under no_object.

    @@ -331,8 +331,8 @@
    Example
    assert_eq!(c["z"].as_char().expect("z should be char"), '$');
    §

    impl Engine

    pub fn compile_file( &self, - path: PathBuf -) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST, which can be used later for evaluation.

    + path: PathBuf +) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST, which can be used later for evaluation.

    Not available under no_std or WASM.

    Example
    use rhai::Engine;
    @@ -348,9 +348,9 @@ 
    Example
    }

    pub fn compile_file_with_scope( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST using own scope, which can be used later for evaluation.

    + scope: &Scope<'_>, + path: PathBuf +) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST using own scope, which can be used later for evaluation.

    Not available under no_std or WASM.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within @@ -372,9 +372,9 @@

    Example
    let result = engine.eval_ast::<i64>(&ast)?;

    pub fn eval_file<T>( &self, - path: PathBuf -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a script file, returning the result value or an error.

    + path: PathBuf +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a script file, returning the result value or an error.

    Not available under no_std or WASM.

    Example
    use rhai::Engine;
    @@ -385,10 +385,10 @@ 
    Example
    let result = engine.eval_file::<i64>("script.rhai".into())?;

    pub fn eval_file_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a script file with own scope, returning the result value or an error.

    + scope: &mut Scope<'_>, + path: PathBuf +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a script file with own scope, returning the result value or an error.

    Not available under no_std or WASM.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within @@ -405,7 +405,7 @@

    Example
    // Notice that a PathBuf is required which can easily be constructed from a string. let result = engine.eval_file_with_scope::<i64>(&mut scope, "script.rhai".into())?;
    -

    pub fn run_file(&self, path: PathBuf) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file.

    +

    pub fn run_file(&self, path: PathBuf) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file.

    Not available under no_std or WASM.

    Example
    use rhai::Engine;
    @@ -416,9 +416,9 @@ 
    Example
    engine.run_file("script.rhai".into())?;

    pub fn run_file_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file with own scope.

    + scope: &mut Scope<'_>, + path: PathBuf +) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file with own scope.

    Not available under no_std or WASM.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within @@ -435,14 +435,14 @@

    Example
    // Notice that a PathBuf is required which can easily be constructed from a string. engine.run_file_with_scope(&mut scope, "script.rhai".into())?;
    -
    §

    impl Engine

    pub fn register_fn<A, const N: usize, const C: bool, R, const L: bool, F>( +

    §

    impl Engine

    pub fn register_fn<A, const N: usize, const C: bool, R, const L: bool, F>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, func: F ) -> &mut Enginewhere A: 'static, - R: Variant + Clone, - F: RegisterNativeFunction<A, N, C, R, L>,

    Register a custom function with the Engine.

    + R: Variant + Clone, + F: RegisterNativeFunction<A, N, C, R, L> + SendSync + 'static,

    Register a custom function with the Engine.

    Example
    use rhai::Engine;
     
    @@ -463,11 +463,11 @@ 
    Example
    assert_eq!(engine.eval::<i64>("sub(44, 2)")?, 42);

    pub fn register_raw_fn<T>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - arg_types: impl AsRef<[TypeId]>, - func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + arg_types: impl AsRef<[TypeId]>, + func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone,

    Register a function of the Engine.

    + T: Variant + Clone,

    Register a function of the Engine.

    WARNING - Low Level API

    This function is very low level. It takes a list of TypeId’s indicating the actual types of the parameters.

    @@ -479,8 +479,8 @@
    Arguments
    Notice that this will consume the argument, replacing it with ().

    To access the first mutable parameter, use args.get_mut(0).unwrap()

    pub fn register_type<T>(&mut self) -> &mut Enginewhere - T: Variant + Clone,

    Register a custom type for use with the Engine. -The type must implement Clone.

    + T: Variant + Clone,

    Register a custom type for use with the Engine. +The type must implement Clone.

    Example
    #[derive(Debug, Clone, Eq, PartialEq)]
     struct TestStruct {
    @@ -511,9 +511,9 @@ 
    Example
    engine.eval::<TestStruct>("let x = new_ts(); x.update(41); x")?, TestStruct { field: 42 } );
    -

    pub fn register_type_with_name<T>(&mut self, name: &str) -> &mut Enginewhere - T: Variant + Clone,

    Register a custom type for use with the Engine, with a pretty-print name -for the type_of function. The type must implement Clone.

    +

    pub fn register_type_with_name<T>(&mut self, name: &str) -> &mut Enginewhere + T: Variant + Clone,

    Register a custom type for use with the Engine, with a pretty-print name +for the type_of function. The type must implement Clone.

    Example
    #[derive(Clone)]
     struct TestStruct {
    @@ -549,27 +549,27 @@ 
    Example
    );

    pub fn register_type_with_name_raw( &mut self, - type_path: impl Into<SmartString<LazyCompact>>, - name: impl Into<SmartString<LazyCompact>> + type_path: impl Into<SmartString<LazyCompact>>, + name: impl Into<SmartString<LazyCompact>> ) -> &mut Engine

    Register a custom type for use with the Engine, with a pretty-print name -for the type_of function. The type must implement Clone.

    +for the type_of function. The type must implement Clone.

    WARNING - Low Level API

    This function is low level.

    pub fn register_iterator<T>(&mut self) -> &mut Enginewhere - T: Variant + Clone + IntoIterator, - <T as IntoIterator>::Item: Variant + Clone,

    Register a type iterator for an iterable type with the Engine. + T: Variant + Clone + IntoIterator, + <T as IntoIterator>::Item: Variant + Clone,

    Register a type iterator for an iterable type with the Engine. This is an advanced API.

    pub fn register_iterator_result<T, X>(&mut self) -> &mut Enginewhere - T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, - X: Variant + Clone,

    Register a fallible type iterator for an iterable type with the Engine. + T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, + X: Variant + Clone,

    Register a fallible type iterator for an iterable type with the Engine. This is an advanced API.

    -

    pub fn register_get<T, const C: bool, V, const L: bool>( +

    pub fn register_get<T, const C: bool, V, const L: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C, V, L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    Register a getter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,

    Register a getter function for a member of a registered type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under no_object.

    Example
    @@ -600,13 +600,13 @@
    Example
    .register_get("xyz", TestStruct::get_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a.xyz")?, 1);
    -

    pub fn register_set<T, const C: bool, V, const L: bool>( +

    pub fn register_set<T, const C: bool, V, const L: bool>( &mut self, - name: impl AsRef<str>, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), L> + SendSync + 'static + name: impl AsRef<str>, + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    Register a setter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,

    Register a setter function for a member of a registered type with the Engine.

    Not available under no_object.

    Example
    #[derive(Debug, Clone, Eq, PartialEq)]
    @@ -639,14 +639,14 @@ 
    Example
    engine.eval::<TestStruct>("let a = new_ts(); a.xyz = 42; a")?, TestStruct { field: 42 } );
    -

    pub fn register_get_set<T, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( +

    pub fn register_get_set<T, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C1, V, L1> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C2, (), L2> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C2, (), L2> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    Short-hand for registering both getter and setter functions + T: Variant + Clone, + V: Variant + Clone,

    Short-hand for registering both getter and setter functions of a registered type with the Engine.

    All function signatures must start with &mut self and not &self.

    Not available under no_object.

    @@ -682,17 +682,17 @@
    Example
    .register_get_set("xyz", TestStruct::get_field, TestStruct::set_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a.xyz = 42; a.xyz")?, 42);
    -

    pub fn register_indexer_get<T, X, const C: bool, V, const L: bool>( +

    pub fn register_indexer_get<T, X, const C: bool, V, const L: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C, V, L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    Register an index getter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,

    Register an index getter for a custom type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under both no_index and no_object.

    Panics
    -

    Panics if the type is Array, Map, String, +

    Panics if the type is Array, Map, String, ImmutableString, &str or INT. Indexers for arrays, object maps, strings and integers cannot be registered.

    Example
    @@ -724,16 +724,16 @@
    Example
    .register_indexer_get(TestStruct::get_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a[2]")?, 3);
    -

    pub fn register_indexer_set<T, X, const C: bool, V, const L: bool>( +

    pub fn register_indexer_set<T, X, const C: bool, V, const L: bool>( &mut self, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), L> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    Register an index setter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,

    Register an index setter for a custom type with the Engine.

    Not available under both no_index and no_object.

    Panics
    -

    Panics if the type is Array, Map, String, +

    Panics if the type is Array, Map, String, ImmutableString, &str or INT. Indexers for arrays, object maps, strings and integers cannot be registered.

    Example
    @@ -766,17 +766,17 @@
    Example
    let result = engine.eval::<TestStruct>("let a = new_ts(); a[2] = 42; a")?; assert_eq!(result.fields[2], 42);
    -

    pub fn register_indexer_get_set<T, X, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( +

    pub fn register_indexer_get_set<T, X, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C1, V, L1> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C2, (), L2> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C2, (), L2> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    Short-hand for registering both index getter and setter functions for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,

    Short-hand for registering both index getter and setter functions for a custom type with the Engine.

    Not available under both no_index and no_object.

    Panics
    -

    Panics if the type is Array, Map, String, +

    Panics if the type is Array, Map, String, ImmutableString, &str or INT. Indexers for arrays, object maps, strings and integers cannot be registered.

    Example
    @@ -811,60 +811,47 @@
    Example
    .register_indexer_get_set(TestStruct::get_field, TestStruct::set_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a[2] = 42; a[2]")?, 42);
    -

    pub fn register_global_module(&mut self, module: Arc<Module>) -> &mut Engine

    Register a shared Module into the global namespace of Engine.

    +

    pub fn register_global_module( + &mut self, + module: Arc<Module, Global> +) -> &mut Engine

    Register a shared Module into the global namespace of Engine.

    All functions and type iterators are automatically available to scripts without namespace qualifications.

    Sub-modules and variables are ignored.

    When searching for functions, modules loaded later are preferred. In other words, loaded modules are searched in reverse order.

    -
    §

    impl Engine

    pub const fn allow_if_expression(&self) -> bool

    Is if-expression allowed? +

    §

    impl Engine

    pub const fn allow_if_expression(&self) -> bool

    Is if-expression allowed? Default is true.

    -

    pub fn set_allow_if_expression(&mut self, enable: bool) -> &mut Engine

    Set whether if-expression is allowed.

    -

    pub const fn allow_switch_expression(&self) -> bool

    Is switch expression allowed? +

    pub fn set_allow_if_expression(&mut self, enable: bool) -> &mut Engine

    Set whether if-expression is allowed.

    +

    pub const fn allow_switch_expression(&self) -> bool

    Is switch expression allowed? Default is true.

    -

    pub fn set_allow_switch_expression(&mut self, enable: bool) -> &mut Engine

    Set whether switch expression is allowed.

    -

    pub const fn allow_loop_expressions(&self) -> bool

    Are loop expressions allowed? +

    pub fn set_allow_switch_expression(&mut self, enable: bool) -> &mut Engine

    Set whether switch expression is allowed.

    +

    pub const fn allow_loop_expressions(&self) -> bool

    Are loop expressions allowed? Default is true.

    -

    pub fn set_allow_loop_expressions(&mut self, enable: bool) -> &mut Engine

    Set whether loop expressions are allowed.

    -

    pub const fn allow_statement_expression(&self) -> bool

    Is statement-expression allowed? +

    pub fn set_allow_loop_expressions(&mut self, enable: bool) -> &mut Engine

    Set whether loop expressions are allowed.

    +

    pub const fn allow_statement_expression(&self) -> bool

    Is statement-expression allowed? Default is true.

    -

    pub fn set_allow_statement_expression(&mut self, enable: bool) -> &mut Engine

    Set whether statement-expression is allowed.

    -

    pub const fn allow_looping(&self) -> bool

    Is looping allowed? +

    pub fn set_allow_statement_expression(&mut self, enable: bool) -> &mut Engine

    Set whether statement-expression is allowed.

    +

    pub const fn allow_looping(&self) -> bool

    Is looping allowed? Default is true.

    -

    pub fn set_allow_looping(&mut self, enable: bool) -> &mut Engine

    Set whether looping is allowed.

    -

    pub const fn allow_shadowing(&self) -> bool

    Is variables shadowing allowed? +

    pub fn set_allow_looping(&mut self, enable: bool) -> &mut Engine

    Set whether looping is allowed.

    +

    pub const fn allow_shadowing(&self) -> bool

    Is variables shadowing allowed? Default is true.

    -

    pub fn set_allow_shadowing(&mut self, enable: bool) -> &mut Engine

    Set whether variables shadowing is allowed.

    -

    pub const fn strict_variables(&self) -> bool

    Is strict variables mode enabled? +

    pub fn set_allow_shadowing(&mut self, enable: bool) -> &mut Engine

    Set whether variables shadowing is allowed.

    +

    pub const fn strict_variables(&self) -> bool

    Is strict variables mode enabled? Default is false.

    -

    pub fn set_strict_variables(&mut self, enable: bool) -> &mut Engine

    Set whether strict variables mode is enabled.

    -

    pub const fn fail_on_invalid_map_property(&self) -> bool

    Raise error if an object map property does not exist? +

    pub fn set_strict_variables(&mut self, enable: bool) -> &mut Engine

    Set whether strict variables mode is enabled.

    +

    pub const fn fail_on_invalid_map_property(&self) -> bool

    Raise error if an object map property does not exist? Default is false.

    Not available under no_object.

    -

    pub fn set_fail_on_invalid_map_property(&mut self, enable: bool) -> &mut Engine

    Set whether to raise error if an object map property does not exist.

    +

    pub fn set_fail_on_invalid_map_property(&mut self, enable: bool) -> &mut Engine

    Set whether to raise error if an object map property does not exist.

    Not available under no_object.

    -

    pub const fn fast_operators(&self) -> bool

    Is fast operators mode enabled? +

    pub const fn fast_operators(&self) -> bool

    Is fast operators mode enabled? Default is false.

    -

    pub fn set_fast_operators(&mut self, enable: bool) -> &mut Engine

    Set whether fast operators mode is enabled.

    -
    §

    impl Engine

    pub const fn max_call_levels(&self) -> usize

    The maximum levels of function calls allowed for a script.

    -

    Always returns usize::MAX.

    -

    pub const fn max_operations(&self) -> u64

    The maximum number of operations allowed for a script to run (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_modules(&self) -> usize

    The maximum number of imported modules allowed for a script.

    -

    Always returns usize::MAX.

    -

    pub const fn max_expr_depth(&self) -> usize

    The depth limit for expressions (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_function_expr_depth(&self) -> usize

    The depth limit for expressions in functions (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_string_size(&self) -> usize

    The maximum length of strings (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_array_size(&self) -> usize

    The maximum length of arrays (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_map_size(&self) -> usize

    The maximum size of object maps (0 for unlimited).

    -

    Always returns zero.

    -
    §

    impl Engine

    pub fn on_var( +

    pub fn set_fast_operators(&mut self, enable: bool) -> &mut Engine

    Set whether fast operators mode is enabled.

    +
    §

    impl Engine

    pub fn on_var( &mut self, - callback: impl Fn(&str, usize, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<Option<Dynamic>, Box<EvalAltResult, Global>> + SendSync + 'static + callback: impl Fn(&str, usize, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<Option<Dynamic>, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Provide a callback that will be invoked before each variable access.

    WARNING - Unstable API

    This API is volatile and may change in the future.

    @@ -904,7 +891,7 @@
    Example

    pub fn on_def_var( &mut self, - callback: impl Fn(bool, VarDefInfo<'_>, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<bool, Box<EvalAltResult, Global>> + SendSync + 'static + callback: impl Fn(bool, VarDefInfo<'_>, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<bool, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Provide a callback that will be invoked before the definition of each variable .

    WARNING - Unstable API

    This API is volatile and may change in the future.

    @@ -931,7 +918,7 @@
    Example
    // Register a variable definition filter. engine.on_def_var(|_, info, _| { // Disallow defining MYSTIC_NUMBER as a constant - if info.name == "MYSTIC_NUMBER" && info.is_const { + if info.name() == "MYSTIC_NUMBER" && info.is_const() { Ok(false) } else { Ok(true) @@ -946,8 +933,8 @@
    Example

    pub fn on_print( &mut self, - callback: impl Fn(&str) + SendSync + 'static -) -> &mut Engine

    Override default action of print (print to stdout using println!)

    + callback: impl Fn(&str) + SendSync + 'static +) -> &mut Engine

    Override default action of print (print to stdout using println!)

    Example
    use rhai::Engine;
     
    @@ -964,8 +951,8 @@ 
    Example
    assert_eq!(*result.read().unwrap(), "42");

    pub fn on_debug( &mut self, - callback: impl Fn(&str, Option<&str>, Position) + SendSync + 'static -) -> &mut Engine

    Override default action of debug (print to stdout using println!)

    + callback: impl Fn(&str, Option<&str>, Position) + SendSync + 'static +) -> &mut Engine

    Override default action of debug (print to stdout using println!)

    Callback Function Signature

    The callback function signature passed takes the following form:

    Fn(text: &str, source: Option<&str>, pos: Position)

    @@ -996,26 +983,26 @@
    Example
    assert_eq!(*result.read().unwrap(), r#"world @ 1:18 > "hello""#); #[cfg(feature = "no_position")] assert_eq!(*result.read().unwrap(), r#"world @ none > "hello""#);
    -
    §

    impl Engine

    pub fn map_type_name<'a>(&'a self, name: &'a str) -> &'a str

    Pretty-print a type name.

    +
    §

    impl Engine

    pub fn map_type_name<'a>(&'a self, name: &'a str) -> &'a str

    Pretty-print a type name.

    If a type is registered via register_type_with_name, the type name provided for the registration will be used.

    Panics

    Panics if the type name is &mut.

    pub fn compact_script( &self, - script: impl AsRef<str> -) -> Result<String, ParseError>

    Compact a script to eliminate insignificant whitespaces and comments.

    + script: impl AsRef<str> +) -> Result<String, ParseError>

    Compact a script to eliminate insignificant whitespaces and comments.

    This is useful to prepare a script for further compressing.

    The output script is semantically identical to the input script, except smaller in size.

    Unlike other uglifiers and minifiers, this method does not rename variables nor perform any optimization on the input script.

    -
    §

    impl Engine

    §

    impl Engine

    pub fn register_custom_syntax<S>( &mut self, - symbols: impl AsRef<[S]>, - scope_may_be_changed: bool, - func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static -) -> Result<&mut Engine, ParseError>where - S: AsRef<str> + Into<SmartString<LazyCompact>>,

    Register a custom syntax with the Engine.

    + symbols: impl AsRef<[S]>, + scope_may_be_changed: bool, + func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static +) -> Result<&mut Engine, ParseError>where + S: AsRef<str> + Into<SmartString<LazyCompact>>,

    Register a custom syntax with the Engine.

    Not available under no_custom_syntax.

    pub fn register_custom_syntax_with_state_raw( &mut self, - key: impl Into<SmartString<LazyCompact>>, - parse: impl Fn(&[ImmutableString], &str, &mut Dynamic) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, - scope_may_be_changed: bool, - func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>], &Dynamic) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static + key: impl Into<SmartString<LazyCompact>>, + parse: impl Fn(&[ImmutableString], &str, &mut Dynamic) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, + scope_may_be_changed: bool, + func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>], &Dynamic) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    Register a custom syntax with the Engine with custom user-defined state.

    Not available under no_custom_syntax.

    WARNING - Low Level API
    @@ -1071,127 +1058,138 @@
    Return value
  • Ok(Some(symbol)): the next symbol to match, which can also be $expr$, $ident$ or $block$.
  • Err(ParseError): error that is reflected back to the Engine, normally ParseError(ParseErrorType::BadInput(LexError::ImproperSymbol(message)), Position::NONE) to indicate a syntax error, but it can be any ParseError.
  • -
    §

    impl Engine

    pub fn build_type<T>(&mut self) -> &mut Enginewhere +

    §

    impl Engine

    pub fn build_type<T>(&mut self) -> &mut Enginewhere T: CustomType,

    Build the API of a custom type for use with the Engine.

    The custom type must implement CustomType.

    -
    §

    impl Engine

    pub fn consume_file( +

    §

    impl Engine

    pub fn consume_file( &self, - path: PathBuf -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file instead

    Evaluate a file, but throw away the result and only return error (if any). + path: PathBuf +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file instead

    Evaluate a file, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Not available under no_std or WASM.

    Deprecated
    -

    This method is deprecated. Use run_file instead.

    +

    This method is deprecated. +Use run_file instead.

    This method will be removed in the next major version.

    pub fn consume_file_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file_with_scope instead

    Evaluate a file with own scope, but throw away the result and only return error (if any). + scope: &mut Scope<'_>, + path: PathBuf +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file_with_scope instead

    Evaluate a file with own scope, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Not available under no_std or WASM.

    Deprecated
    -

    This method is deprecated. Use run_file_with_scope instead.

    +

    This method is deprecated. +Use run_file_with_scope instead.

    This method will be removed in the next major version.

    -

    pub fn consume(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run instead

    Evaluate a string, but throw away the result and only return error (if any). +

    pub fn consume(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run instead

    Evaluate a string, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run instead.

    +

    This method is deprecated. +Use run instead.

    This method will be removed in the next major version.

    pub fn consume_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_with_scope instead

    Evaluate a string with own scope, but throw away the result and only return error (if any). + scope: &mut Scope<'_>, + script: &str +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_with_scope instead

    Evaluate a string with own scope, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run_with_scope instead.

    +

    This method is deprecated. +Use run_with_scope instead.

    This method will be removed in the next major version.

    -

    pub fn consume_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast instead

    Evaluate an AST, but throw away the result and only return error (if any). +

    pub fn consume_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast instead

    Evaluate an AST, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run_ast instead.

    +

    This method is deprecated. +Use run_ast instead.

    This method will be removed in the next major version.

    pub fn consume_ast_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, + scope: &mut Scope<'_>, ast: &AST -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast_with_scope instead

    Evaluate an AST with own scope, but throw away the result and only return error (if any). +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast_with_scope instead

    Evaluate an AST with own scope, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run_ast_with_scope instead.

    +

    This method is deprecated. +Use run_ast_with_scope instead.

    This method will be removed in the next major version.

    -

    pub fn register_result_fn<A, const N: usize, const C: bool, R>( +

    pub fn register_result_fn<A, const N: usize, const C: bool, R>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - func: impl RegisterNativeFunction<A, N, C, R, true> + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + func: impl RegisterNativeFunction<A, N, C, R, true> + SendSync + 'static ) -> &mut Enginewhere A: 'static, - R: Variant + Clone,

    👎Deprecated since 1.9.1: use register_fn instead

    Register a custom fallible function with the Engine.

    + R: Variant + Clone,
    👎Deprecated since 1.9.1: use register_fn instead

    Register a custom fallible function with the Engine.

    Deprecated
    -

    This method is deprecated. Use register_fn instead.

    +

    This method is deprecated. +Use register_fn instead.

    This method will be removed in the next major version.

    -

    pub fn register_get_result<T, const C: bool, V>( +

    pub fn register_get_result<T, const C: bool, V>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C, V, true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_get instead

    Register a getter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_get instead

    Register a getter function for a member of a registered type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under no_object.

    Deprecated
    -

    This method is deprecated. Use register_get instead.

    +

    This method is deprecated. +Use register_get instead.

    This method will be removed in the next major version.

    -

    pub fn register_set_result<T, V, const C: bool, S>( +

    pub fn register_set_result<T, V, const C: bool, S>( &mut self, - name: impl AsRef<str>, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), true> + SendSync + 'static + name: impl AsRef<str>, + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_set instead

    Register a setter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_set instead

    Register a setter function for a member of a registered type with the Engine.

    Not available under no_object.

    Deprecated
    -

    This method is deprecated. Use register_set instead.

    +

    This method is deprecated. +Use register_set instead.

    This method will be removed in the next major version.

    -

    pub fn register_indexer_get_result<T, X, V, const C: bool>( +

    pub fn register_indexer_get_result<T, X, V, const C: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C, V, true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_indexer_get instead

    Register an index getter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_indexer_get instead

    Register an index getter for a custom type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under both no_index and no_object.

    Deprecated
    -

    This method is deprecated. Use register_indexer_get instead.

    +

    This method is deprecated. +Use register_indexer_get instead.

    This method will be removed in the next major version.

    -

    pub fn register_indexer_set_result<T, X, V, const C: bool>( +

    pub fn register_indexer_set_result<T, X, V, const C: bool>( &mut self, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), true> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_indexer_set instead

    Register an index setter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_indexer_set instead

    Register an index setter for a custom type with the Engine.

    Not available under both no_index and no_object.

    Deprecated
    -

    This method is deprecated. Use register_indexer_set instead.

    +

    This method is deprecated. +Use register_indexer_set instead.

    This method will be removed in the next major version.

    pub fn register_custom_syntax_raw( &mut self, - key: impl Into<SmartString<LazyCompact>>, - parse: impl Fn(&[ImmutableString], &str) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, - scope_may_be_changed: bool, - func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static + key: impl Into<SmartString<LazyCompact>>, + parse: impl Fn(&[ImmutableString], &str) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, + scope_may_be_changed: bool, + func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    👎Deprecated since 1.11.0: use register_custom_syntax_with_state_raw instead

    Register a custom syntax with the Engine.

    Not available under no_custom_syntax.

    Deprecated

    This method is deprecated. Use register_custom_syntax_with_state_raw instead.

    This method will be removed in the next major version.

    -
    §

    impl Engine

    pub fn disable_symbol( +

    §

    impl Engine

    pub fn disable_symbol( &mut self, - symbol: impl Into<SmartString<LazyCompact>> + symbol: impl Into<SmartString<LazyCompact>> ) -> &mut Engine

    Disable a particular keyword or operator in the language.

    Examples

    The following will raise an error during parsing because the if keyword is disabled and is @@ -1215,7 +1213,7 @@

    Examples
    engine.compile("let x = 42; x += 1;")?; // ^ unknown operator
    -

    pub fn is_symbol_disabled(&self, symbol: &str) -> bool

    Is a particular keyword or operator disabled?

    +

    pub fn is_symbol_disabled(&self, symbol: &str) -> bool

    Is a particular keyword or operator disabled?

    Examples
    use rhai::Engine;
     
    @@ -1226,9 +1224,9 @@ 
    Examples
    assert!(engine.is_symbol_disabled("if"));

    pub fn register_custom_operator( &mut self, - keyword: impl AsRef<str>, - precedence: u8 -) -> Result<&mut Engine, String>

    Register a custom operator with a precedence into the language.

    + keyword: impl AsRef<str>, + precedence: u8 +) -> Result<&mut Engine, String>

    Register a custom operator with a precedence into the language.

    Not available under no_custom_syntax.

    The operator can be a valid identifier, a reserved symbol, a disabled operator or a disabled keyword.

    The precedence cannot be zero.

    @@ -1250,47 +1248,22 @@
    Example
    );

    pub const fn default_tag(&self) -> &Dynamic

    Get the default value of the custom state for each evaluation run.

    pub fn default_tag_mut(&mut self) -> &mut Dynamic

    Get a mutable reference to the default value of the custom state for each evaluation run.

    -

    pub fn set_default_tag(&mut self, value: impl Into<Dynamic>) -> &mut Engine

    Set the default value of the custom state for each evaluation run.

    -
    §

    impl Engine

    pub const RAW: Engine = Self{ - global_modules: StaticVec::new_const(), - - interned_strings: None, - - disabled_symbols: None, - - custom_keywords: None, - - custom_syntax: None, - - def_var_filter: None, - - resolve_var: None, - - token_mapper: None, - - print: None, - - debug: None, - - options: LangOptions::new(), - - def_tag: Dynamic::UNIT, - - optimization_level: (),}

    An empty raw Engine.

    +

    pub fn set_default_tag(&mut self, value: impl Into<Dynamic>) -> &mut Engine

    Set the default value of the custom state for each evaluation run.

    +
    §

    impl Engine

    pub const RAW: Engine = _

    An empty raw Engine.

    pub fn new() -> Engine

    Create a new Engine.

    pub const fn new_raw() -> Engine

    Create a new Engine with minimal built-in functions. It returns a copy of Engine::RAW.

    This is useful for creating a custom scripting engine with only the functions you need.

    Use register_global_module to add packages of functions.

    pub fn const_empty_string(&self) -> ImmutableString

    Get an empty ImmutableString which refers to a shared instance.

    -

    Trait Implementations§

    §

    impl Debug for Engine

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Engine

    §

    fn default() -> Engine

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Engine

    §

    impl Send for Engine

    §

    impl Sync for Engine

    §

    impl Unpin for Engine

    §

    impl !UnwindSafe for Engine

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl Debug for Engine

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Engine

    §

    fn default() -> Engine

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Engine

    §

    impl Send for Engine

    §

    impl Sync for Engine

    §

    impl Unpin for Engine

    §

    impl !UnwindSafe for Engine

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.ImmutableString.html b/casbin/rhai/plugin/struct.ImmutableString.html index 4057c6f1..2ae8d203 100644 --- a/casbin/rhai/plugin/struct.ImmutableString.html +++ b/casbin/rhai/plugin/struct.ImmutableString.html @@ -1,4 +1,4 @@ -ImmutableString in casbin::rhai::plugin - Rust
    pub struct ImmutableString(_);
    Expand description

    The system immutable string type.

    +ImmutableString in casbin::rhai::plugin - Rust
    pub struct ImmutableString(/* private fields */);
    Expand description

    The system immutable string type.

    An ImmutableString wraps an Rc<SmartString> (or Arc<SmartString> under the sync feature) so that it can be simply shared and not cloned.

    Example

    @@ -26,9 +26,9 @@

    Example

    assert_ne!(s2.as_str(), s.as_str()); assert_eq!(s, "hello, world!");

    Implementations§

    §

    impl ImmutableString

    pub fn new() -> ImmutableString

    Create a new ImmutableString.

    -

    pub fn into_owned(self) -> String

    Consume the ImmutableString and convert it into a String.

    +

    pub fn into_owned(self) -> String

    Consume the ImmutableString and convert it into a String.

    If there are other references to the same string, a cloned copy is returned.

    -

    pub fn ptr_eq(&self, other: &ImmutableString) -> bool

    Returns true if the two ImmutableString’s point to the same allocation.

    +

    pub fn ptr_eq(&self, other: &ImmutableString) -> bool

    Returns true if the two ImmutableString’s point to the same allocation.

    Example
    use rhai::ImmutableString;
     
    @@ -43,19 +43,19 @@ 
    Example
    assert!(s1.ptr_eq(&s2)); assert!(!s1.ptr_eq(&s3)); assert!(!s2.ptr_eq(&s3));
    -

    Methods from Deref<Target = SmartString<LazyCompact>>§

    pub fn len(&self) -> usize

    Return the length in bytes of the string.

    +

    Methods from Deref<Target = SmartString<LazyCompact>>§

    pub fn len(&self) -> usize

    Return the length in bytes of the string.

    Note that this may differ from the length in chars.

    -

    pub fn is_empty(&self) -> bool

    Test whether the string is empty.

    -

    pub fn is_inline(&self) -> bool

    Test whether the string is currently inlined.

    -

    pub fn as_str(&self) -> &str

    Get a reference to the string as a string slice.

    -

    pub fn capacity(&self) -> usize

    Return the currently allocated capacity of the string.

    -

    Note that if this is a boxed string, it returns String::capacity(), +

    pub fn is_empty(&self) -> bool

    Test whether the string is empty.

    +

    pub fn is_inline(&self) -> bool

    Test whether the string is currently inlined.

    +

    pub fn as_str(&self) -> &str

    Get a reference to the string as a string slice.

    +

    pub fn capacity(&self) -> usize

    Return the currently allocated capacity of the string.

    +

    Note that if this is a boxed string, it returns String::capacity(), but an inline string always returns [MAX_INLINE].

    Note also that if a boxed string is converted into an inline string, its capacity is deallocated, and if the inline string is promoted to a boxed string in the future, it will be reallocated with a default capacity.

    -

    Methods from Deref<Target = str>§

    1.0.0 · source

    pub fn len(&self) -> usize

    Returns the length of self.

    -

    This length is in bytes, not chars or graphemes. In other words, +

    Methods from Deref<Target = str>§

    1.0.0 · source

    pub fn len(&self) -> usize

    Returns the length of self.

    +

    This length is in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.

    Examples
    let len = "foo".len();
    @@ -63,14 +63,14 @@ 
    Examples
    assert_eq!("ƒoo".len(), 4); // fancy f! assert_eq!("ƒoo".chars().count(), 3);
    -
    1.0.0 · source

    pub fn is_empty(&self) -> bool

    Returns true if self has a length of zero bytes.

    +
    1.0.0 · source

    pub fn is_empty(&self) -> bool

    Returns true if self has a length of zero bytes.

    Examples
    let s = "";
     assert!(s.is_empty());
     
     let s = "not empty";
     assert!(!s.is_empty());
    -
    1.9.0 · source

    pub fn is_char_boundary(&self, index: usize) -> bool

    Checks that index-th byte is the first byte in a UTF-8 code point +

    1.9.0 · source

    pub fn is_char_boundary(&self, index: usize) -> bool

    Checks that index-th byte is the first byte in a UTF-8 code point sequence or the end of the string.

    The start and end of the string (when index == self.len()) are considered to be boundaries.

    @@ -87,7 +87,7 @@
    Examples
    // third byte of `老` assert!(!s.is_char_boundary(8));
    -
    source

    pub fn floor_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not exceeding index where is_char_boundary(x) is true.

    +
    source

    pub fn floor_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not exceeding index where is_char_boundary(x) is true.

    This method can help you truncate a string so that it’s still valid UTF-8, but doesn’t exceed a given number of bytes. Note that this is done purely at the character level and can still visually split graphemes, even though the underlying characters aren’t @@ -102,11 +102,10 @@

    Examples
    let closest = s.floor_char_boundary(13); assert_eq!(closest, 10); assert_eq!(&s[..closest], "❤️🧡");
    -
    source

    pub fn ceil_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not below index where is_char_boundary(x) is true.

    -

    This method is the natural complement to floor_char_boundary. See that method +

    source

    pub fn ceil_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not below index where is_char_boundary(x) is true.

    +

    If index is greater than the length of the string, this returns the length of the string.

    +

    This method is the natural complement to floor_char_boundary. See that method for more details.

    -
    Panics
    -

    Panics if index > self.len().

    Examples
    #![feature(round_char_boundary)]
     let s = "❤️🧡💛💚💙💜";
    @@ -116,12 +115,12 @@ 
    Examples
    let closest = s.ceil_char_boundary(13); assert_eq!(closest, 14); assert_eq!(&s[..closest], "❤️🧡💛");
    -
    1.0.0 · source

    pub fn as_bytes(&self) -> &[u8]

    Converts a string slice to a byte slice. To convert the byte slice back -into a string slice, use the from_utf8 function.

    +
    1.0.0 · source

    pub fn as_bytes(&self) -> &[u8]

    Converts a string slice to a byte slice. To convert the byte slice back +into a string slice, use the from_utf8 function.

    Examples
    let bytes = "bors".as_bytes();
     assert_eq!(b"bors", bytes);
    -
    1.20.0 · source

    pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]

    Converts a mutable string slice to a mutable byte slice.

    +
    1.20.0 · source

    pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]

    Converts a mutable string slice to a mutable byte slice.

    Safety

    The caller must ensure that the content of the slice is valid UTF-8 before the borrow ends and the underlying str is used.

    @@ -147,25 +146,25 @@
    Examples
    } assert_eq!("🍔∈🌏", s);
    -
    1.0.0 · source

    pub fn as_ptr(&self) -> *const u8

    Converts a string slice to a raw pointer.

    +
    1.0.0 · source

    pub fn as_ptr(&self) -> *const u8

    Converts a string slice to a raw pointer.

    As string slices are a slice of bytes, the raw pointer points to a -u8. This pointer will be pointing to the first byte of the string +u8. This pointer will be pointing to the first byte of the string slice.

    The caller must ensure that the returned pointer is never written to. -If you need to mutate the contents of the string slice, use as_mut_ptr.

    +If you need to mutate the contents of the string slice, use as_mut_ptr.

    Examples
    let s = "Hello";
     let ptr = s.as_ptr();
    -
    1.36.0 · source

    pub fn as_mut_ptr(&mut self) -> *mut u8

    Converts a mutable string slice to a raw pointer.

    +
    1.36.0 · source

    pub fn as_mut_ptr(&mut self) -> *mut u8

    Converts a mutable string slice to a raw pointer.

    As string slices are a slice of bytes, the raw pointer points to a -u8. This pointer will be pointing to the first byte of the string +u8. This pointer will be pointing to the first byte of the string slice.

    It is your responsibility to make sure that the string slice only gets modified in a way that it remains valid UTF-8.

    -
    1.20.0 · source

    pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>where - I: SliceIndex<str>,

    Returns a subslice of str.

    +
    1.20.0 · source

    pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>where + I: SliceIndex<str>,

    Returns a subslice of str.

    This is the non-panicking alternative to indexing the str. Returns -None whenever equivalent indexing operation would panic.

    +None whenever equivalent indexing operation would panic.

    Examples
    let v = String::from("🗻∈🌏");
     
    @@ -177,13 +176,13 @@ 
    Examples
    // out of bounds assert!(v.get(..42).is_none());
    -
    1.20.0 · source

    pub fn get_mut<I>( +

    1.20.0 · source

    pub fn get_mut<I>( &mut self, i: I -) -> Option<&mut <I as SliceIndex<str>>::Output>where - I: SliceIndex<str>,

    Returns a mutable subslice of str.

    +) -> Option<&mut <I as SliceIndex<str>>::Output>where + I: SliceIndex<str>,

    Returns a mutable subslice of str.

    This is the non-panicking alternative to indexing the str. Returns -None whenever equivalent indexing operation would panic.

    +None whenever equivalent indexing operation would panic.

    Examples
    let mut v = String::from("hello");
     // correct length
    @@ -202,8 +201,8 @@ 
    Examples
    assert_eq!(Some("HE"), s); } assert_eq!("HEllo", v);
    -
    1.20.0 · source

    pub unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Outputwhere - I: SliceIndex<str>,

    Returns an unchecked subslice of str.

    +
    1.20.0 · source

    pub unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Outputwhere + I: SliceIndex<str>,

    Returns an unchecked subslice of str.

    This is the unchecked alternative to indexing the str.

    Safety

    Callers of this function are responsible that these preconditions are @@ -222,11 +221,11 @@

    Examples
    assert_eq!("∈", v.get_unchecked(4..7)); assert_eq!("🌏", v.get_unchecked(7..11)); }
    -
    1.20.0 · source

    pub unsafe fn get_unchecked_mut<I>( +

    1.20.0 · source

    pub unsafe fn get_unchecked_mut<I>( &mut self, i: I -) -> &mut <I as SliceIndex<str>>::Outputwhere - I: SliceIndex<str>,

    Returns a mutable, unchecked subslice of str.

    +) -> &mut <I as SliceIndex<str>>::Outputwhere + I: SliceIndex<str>,

    Returns a mutable, unchecked subslice of str.

    This is the unchecked alternative to indexing the str.

    Safety

    Callers of this function are responsible that these preconditions are @@ -245,14 +244,14 @@

    Examples
    assert_eq!("∈", v.get_unchecked_mut(4..7)); assert_eq!("🌏", v.get_unchecked_mut(7..11)); }
    -
    1.0.0 · source

    pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

    👎Deprecated since 1.29.0: use get_unchecked(begin..end) instead

    Creates a string slice from another string slice, bypassing safety +

    1.0.0 · source

    pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

    👎Deprecated since 1.29.0: use get_unchecked(begin..end) instead

    Creates a string slice from another string slice, bypassing safety checks.

    This is generally not recommended, use with caution! For a safe -alternative see str and Index.

    +alternative see str and Index.

    This new slice goes from begin to end, including begin but excluding end.

    To get a mutable string slice instead, see the -slice_mut_unchecked method.

    +slice_mut_unchecked method.

    Safety

    Callers of this function are responsible that three preconditions are satisfied:

    @@ -273,18 +272,18 @@
    Examples
    unsafe { assert_eq!("world", s.slice_unchecked(7, 12)); }
    -
    1.5.0 · source

    pub unsafe fn slice_mut_unchecked( +

    1.5.0 · source

    pub unsafe fn slice_mut_unchecked( &mut self, - begin: usize, - end: usize -) -> &mut str

    👎Deprecated since 1.29.0: use get_unchecked_mut(begin..end) instead

    Creates a string slice from another string slice, bypassing safety + begin: usize, + end: usize +) -> &mut str

    👎Deprecated since 1.29.0: use get_unchecked_mut(begin..end) instead

    Creates a string slice from another string slice, bypassing safety checks. This is generally not recommended, use with caution! For a safe -alternative see str and IndexMut.

    +alternative see str and IndexMut.

    This new slice goes from begin to end, including begin but excluding end.

    To get an immutable string slice instead, see the -slice_unchecked method.

    +slice_unchecked method.

    Safety

    Callers of this function are responsible that three preconditions are satisfied:

    @@ -293,14 +292,14 @@
    Safety
  • begin and end must be byte positions within the string slice.
  • begin and end must lie on UTF-8 sequence boundaries.
  • -
    1.4.0 · source

    pub fn split_at(&self, mid: usize) -> (&str, &str)

    Divide one string slice into two at an index.

    +
    1.4.0 · source

    pub fn split_at(&self, mid: usize) -> (&str, &str)

    Divide one string slice into two at an index.

    The argument, mid, should be a byte offset from the start of the string. It must also be on the boundary of a UTF-8 code point.

    The two slices returned go from the start of the string slice to mid, and from mid to the end of the string slice.

    -

    To get mutable string slices instead, see the split_at_mut +

    To get mutable string slices instead, see the split_at_mut method.

    -
    Panics
    +
    Panics

    Panics if mid is not on a UTF-8 code point boundary, or if it is past the end of the last code point of the string slice.

    Examples
    @@ -310,13 +309,13 @@
    Examples
    assert_eq!("Per", first); assert_eq!(" Martin-Löf", last);
    -
    1.4.0 · source

    pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str)

    Divide one mutable string slice into two at an index.

    +
    1.4.0 · source

    pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str)

    Divide one mutable string slice into two at an index.

    The argument, mid, should be a byte offset from the start of the string. It must also be on the boundary of a UTF-8 code point.

    The two slices returned go from the start of the string slice to mid, and from mid to the end of the string slice.

    -

    To get immutable string slices instead, see the split_at method.

    -
    Panics
    +

    To get immutable string slices instead, see the split_at method.

    +
    Panics

    Panics if mid is not on a UTF-8 code point boundary, or if it is past the end of the last code point of the string slice.

    Examples
    @@ -328,10 +327,10 @@
    Examples
    assert_eq!(" Martin-Löf", last); } assert_eq!("PER Martin-Löf", s);
    -
    1.0.0 · source

    pub fn chars(&self) -> Chars<'_>

    Returns an iterator over the chars of a string slice.

    +
    1.0.0 · source

    pub fn chars(&self) -> Chars<'_>

    Returns an iterator over the chars of a string slice.

    As a string slice consists of valid UTF-8, we can iterate through a -string slice by char. This method returns such an iterator.

    -

    It’s important to remember that char represents a Unicode Scalar +string slice by char. This method returns such an iterator.

    +

    It’s important to remember that char represents a Unicode Scalar Value, and might not match your idea of what a ‘character’ is. Iteration over grapheme clusters may be what you actually want. This functionality is not provided by Rust’s standard library, check crates.io instead.

    @@ -354,7 +353,7 @@
    Examples
    assert_eq!(Some('e'), chars.next()); assert_eq!(None, chars.next());
    -

    Remember, chars might not match your intuition about characters:

    +

    Remember, chars might not match your intuition about characters:

    let y = "y̆";
     
    @@ -364,12 +363,12 @@ 
    Examples
    assert_eq!(Some('\u{0306}'), chars.next()); assert_eq!(None, chars.next());
    -
    1.0.0 · source

    pub fn char_indices(&self) -> CharIndices<'_>

    Returns an iterator over the chars of a string slice, and their +

    1.0.0 · source

    pub fn char_indices(&self) -> CharIndices<'_>

    Returns an iterator over the chars of a string slice, and their positions.

    As a string slice consists of valid UTF-8, we can iterate through a -string slice by char. This method returns an iterator of both -these chars, as well as their byte positions.

    -

    The iterator yields tuples. The position is first, the char is +string slice by char. This method returns an iterator of both +these chars, as well as their byte positions.

    +

    The iterator yields tuples. The position is first, the char is second.

    Examples

    Basic usage:

    @@ -390,7 +389,7 @@
    Examples
    assert_eq!(Some((6, 'e')), char_indices.next()); assert_eq!(None, char_indices.next());
    -

    Remember, chars might not match your intuition about characters:

    +

    Remember, chars might not match your intuition about characters:

    let yes = "y̆es";
     
    @@ -404,7 +403,7 @@ 
    Examples
    assert_eq!(Some((4, 's')), char_indices.next()); assert_eq!(None, char_indices.next());
    -
    1.0.0 · source

    pub fn bytes(&self) -> Bytes<'_>

    An iterator over the bytes of a string slice.

    +
    1.0.0 · source

    pub fn bytes(&self) -> Bytes<'_>

    An iterator over the bytes of a string slice.

    As a string slice consists of a sequence of bytes, we can iterate through a string slice by byte. This method returns such an iterator.

    Examples
    @@ -416,12 +415,12 @@
    Examples
    assert_eq!(Some(b's'), bytes.next()); assert_eq!(None, bytes.next());
    -
    1.1.0 · source

    pub fn split_whitespace(&self) -> SplitWhitespace<'_>

    Splits a string slice by whitespace.

    +
    1.1.0 · source

    pub fn split_whitespace(&self) -> SplitWhitespace<'_>

    Splits a string slice by whitespace.

    The iterator returned will return string slices that are sub-slices of the original string slice, separated by any amount of whitespace.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space. If you only want to split on ASCII whitespace -instead, use split_ascii_whitespace.

    +instead, use split_ascii_whitespace.

    Examples

    Basic usage:

    @@ -446,10 +445,10 @@
    Examples
    assert_eq!("".split_whitespace().next(), None);
     assert_eq!("   ".split_whitespace().next(), None);
    -
    1.34.0 · source

    pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

    Splits a string slice by ASCII whitespace.

    +
    1.34.0 · source

    pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

    Splits a string slice by ASCII whitespace.

    The iterator returned will return string slices that are sub-slices of the original string slice, separated by any amount of ASCII whitespace.

    -

    To split by Unicode Whitespace instead, use split_whitespace.

    +

    To split by Unicode Whitespace instead, use split_whitespace.

    Examples

    Basic usage:

    @@ -474,26 +473,30 @@
    Examples
    assert_eq!("".split_ascii_whitespace().next(), None);
     assert_eq!("   ".split_ascii_whitespace().next(), None);
    -
    1.0.0 · source

    pub fn lines(&self) -> Lines<'_>

    An iterator over the lines of a string, as string slices.

    +
    1.0.0 · source

    pub fn lines(&self) -> Lines<'_>

    An iterator over the lines of a string, as string slices.

    Lines are split at line endings that are either newlines (\n) or sequences of a carriage return followed by a line feed (\r\n).

    Line terminators are not included in the lines returned by the iterator.

    +

    Note that any carriage return (\r) not immediately followed by a +line feed (\n) does not split a line. These carriage returns are +thereby included in the produced lines.

    The final line ending is optional. A string that ends with a final line ending will return the same lines as an otherwise identical string without a final line ending.

    Examples

    Basic usage:

    -
    let text = "foo\r\nbar\n\nbaz\n";
    +
    let text = "foo\r\nbar\n\nbaz\r";
     let mut lines = text.lines();
     
     assert_eq!(Some("foo"), lines.next());
     assert_eq!(Some("bar"), lines.next());
     assert_eq!(Some(""), lines.next());
    -assert_eq!(Some("baz"), lines.next());
    +// Trailing carriage return is included in the last line
    +assert_eq!(Some("baz\r"), lines.next());
     
     assert_eq!(None, lines.next());
    -

    The final line ending isn’t required:

    +

    The final line does not require any ending:

    let text = "foo\nbar\n\r\nbaz";
     let mut lines = text.lines();
    @@ -504,8 +507,8 @@ 
    Examples
    assert_eq!(Some("baz"), lines.next()); assert_eq!(None, lines.next());
    -
    1.0.0 · source

    pub fn lines_any(&self) -> LinesAny<'_>

    👎Deprecated since 1.4.0: use lines() instead now

    An iterator over the lines of a string.

    -
    1.8.0 · source

    pub fn encode_utf16(&self) -> EncodeUtf16<'_>

    Returns an iterator of u16 over the string encoded as UTF-16.

    +
    1.0.0 · source

    pub fn lines_any(&self) -> LinesAny<'_>

    👎Deprecated since 1.4.0: use lines() instead now

    An iterator over the lines of a string.

    +
    1.8.0 · source

    pub fn encode_utf16(&self) -> EncodeUtf16<'_>

    Returns an iterator of u16 over the string encoded as UTF-16.

    Examples
    let text = "Zażółć gęślą jaźń";
     
    @@ -513,45 +516,45 @@ 
    Examples
    let utf16_len = text.encode_utf16().count(); assert!(utf16_len <= utf8_len);
    -
    1.0.0 · source

    pub fn contains<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>,

    Returns true if the given pattern matches a sub-slice of +

    1.0.0 · source

    pub fn contains<'a, P>(&'a self, pat: P) -> boolwhere + P: Pattern<'a>,

    Returns true if the given pattern matches a sub-slice of this string slice.

    Returns false if it does not.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let bananas = "bananas";
     
     assert!(bananas.contains("nana"));
     assert!(!bananas.contains("apples"));
    -
    1.0.0 · source

    pub fn starts_with<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>,

    Returns true if the given pattern matches a prefix of this +

    1.0.0 · source

    pub fn starts_with<'a, P>(&'a self, pat: P) -> boolwhere + P: Pattern<'a>,

    Returns true if the given pattern matches a prefix of this string slice.

    Returns false if it does not.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let bananas = "bananas";
     
     assert!(bananas.starts_with("bana"));
     assert!(!bananas.starts_with("nana"));
    -
    1.0.0 · source

    pub fn ends_with<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns true if the given pattern matches a suffix of this +

    1.0.0 · source

    pub fn ends_with<'a, P>(&'a self, pat: P) -> boolwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns true if the given pattern matches a suffix of this string slice.

    Returns false if it does not.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let bananas = "bananas";
     
     assert!(bananas.ends_with("anas"));
     assert!(!bananas.ends_with("nana"));
    -
    1.0.0 · source

    pub fn find<'a, P>(&'a self, pat: P) -> Option<usize>where - P: Pattern<'a>,

    Returns the byte index of the first character of this string slice that +

    1.0.0 · source

    pub fn find<'a, P>(&'a self, pat: P) -> Option<usize>where + P: Pattern<'a>,

    Returns the byte index of the first character of this string slice that matches the pattern.

    -

    Returns None if the pattern doesn’t match.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    Returns None if the pattern doesn’t match.

    +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples

    Simple patterns:

    @@ -575,12 +578,12 @@
    Examples
    let x: &[_] = &['1', '2']; assert_eq!(s.find(x), None);
    -
    1.0.0 · source

    pub fn rfind<'a, P>(&'a self, pat: P) -> Option<usize>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns the byte index for the first character of the last match of the pattern in +

    1.0.0 · source

    pub fn rfind<'a, P>(&'a self, pat: P) -> Option<usize>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns the byte index for the first character of the last match of the pattern in this string slice.

    -

    Returns None if the pattern doesn’t match.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    Returns None if the pattern doesn’t match.

    +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples

    Simple patterns:

    @@ -602,17 +605,17 @@
    Examples
    let x: &[_] = &['1', '2']; assert_eq!(s.rfind(x), None);
    -
    1.0.0 · source

    pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by +

    1.0.0 · source

    pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by characters matched by a pattern.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rsplit method can be used.

    +from a forward search, the rsplit method can be used.

    Examples

    Simple patterns:

    @@ -675,13 +678,13 @@
    Examples

    It does not give you:

    assert_eq!(d, &["a", "b", "c"]);
    -

    Use split_whitespace for this behavior.

    -
    1.51.0 · source

    pub fn split_inclusive<'a, P>(&'a self, pat: P) -> SplitInclusive<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by +

    Use split_whitespace for this behavior.

    +
    1.51.0 · source

    pub fn split_inclusive<'a, P>(&'a self, pat: P) -> SplitInclusive<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by characters matched by a pattern. Differs from the iterator produced by split in that split_inclusive leaves the matched part as the terminator of the substring.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb."
    @@ -694,17 +697,17 @@ 
    Examples
    let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
         .split_inclusive('\n').collect();
     assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]);
    -
    1.0.0 · source

    pub fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of the given string slice, separated by +

    1.0.0 · source

    pub fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of the given string slice, separated by characters matched by a pattern and yielded in reverse order.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the split method can be used.

    +

    For iterating from the front, the split method can be used.

    Examples

    Simple patterns:

    @@ -723,21 +726,21 @@
    Examples
    let v: Vec<&str> = "abc1defXghi".rsplit(|c| c == '1' || c == 'X').collect();
     assert_eq!(v, ["ghi", "def", "abc"]);
    -
    1.0.0 · source

    pub fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by +

    1.0.0 · source

    pub fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by characters matched by a pattern.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    -

    Equivalent to split, except that the trailing substring +

    Equivalent to split, except that the trailing substring is skipped if empty.

    This method can be used for string data that is terminated, rather than separated by a pattern.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rsplit_terminator method can be used.

    +from a forward search, the rsplit_terminator method can be used.

    Examples
    let v: Vec<&str> = "A.B.".split_terminator('.').collect();
     assert_eq!(v, ["A", "B"]);
    @@ -747,13 +750,13 @@ 
    Examples
    let v: Vec<&str> = "A.B:C.D".split_terminator(&['.', ':'][..]).collect(); assert_eq!(v, ["A", "B", "C", "D"]);
    -
    1.0.0 · source

    pub fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of self, separated by characters +

    1.0.0 · source

    pub fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of self, separated by characters matched by a pattern and yielded in reverse order.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    -

    Equivalent to split, except that the trailing substring is +

    Equivalent to split, except that the trailing substring is skipped if empty.

    This method can be used for string data that is terminated, rather than separated by a pattern.

    @@ -761,7 +764,7 @@
    Iterator behaviorThe returned iterator requires that the pattern supports a reverse search, and it will be double ended if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the split_terminator method can be +

    For iterating from the front, the split_terminator method can be used.

    Examples
    let v: Vec<&str> = "A.B.".rsplit_terminator('.').collect();
    @@ -772,17 +775,17 @@ 
    Examples
    let v: Vec<&str> = "A.B:C.D".rsplit_terminator(&['.', ':'][..]).collect(); assert_eq!(v, ["D", "C", "B", "A"]);
    -
    1.0.0 · source

    pub fn splitn<'a, P>(&'a self, n: usize, pat: P) -> SplitN<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by a +

    1.0.0 · source

    pub fn splitn<'a, P>(&'a self, n: usize, pat: P) -> SplitN<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by a pattern, restricted to returning at most n items.

    If n substrings are returned, the last substring (the nth substring) will contain the remainder of the string.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator will not be double ended, because it is not efficient to support.

    -

    If the pattern allows a reverse search, the rsplitn method can be +

    If the pattern allows a reverse search, the rsplitn method can be used.

    Examples

    Simple patterns:

    @@ -802,19 +805,19 @@
    Examples
    let v: Vec<&str> = "abc1defXghi".splitn(2, |c| c == '1' || c == 'X').collect();
     assert_eq!(v, ["abc", "defXghi"]);
    -
    1.0.0 · source

    pub fn rsplitn<'a, P>(&'a self, n: usize, pat: P) -> RSplitN<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of this string slice, separated by a +

    1.0.0 · source

    pub fn rsplitn<'a, P>(&'a self, n: usize, pat: P) -> RSplitN<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of this string slice, separated by a pattern, starting from the end of the string, restricted to returning at most n items.

    If n substrings are returned, the last substring (the nth substring) will contain the remainder of the string.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator will not be double ended, because it is not efficient to support.

    -

    For splitting from the front, the splitn method can be used.

    +

    For splitting from the front, the splitn method can be used.

    Examples

    Simple patterns:

    @@ -830,69 +833,69 @@
    Examples
    let v: Vec<&str> = "abc1defXghi".rsplitn(2, |c| c == '1' || c == 'X').collect();
     assert_eq!(v, ["ghi", "abc1def"]);
    -
    1.52.0 · source

    pub fn split_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where - P: Pattern<'a>,

    Splits the string on the first occurrence of the specified delimiter and +

    1.52.0 · source

    pub fn split_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where + P: Pattern<'a>,

    Splits the string on the first occurrence of the specified delimiter and returns prefix before delimiter and suffix after delimiter.

    Examples
    assert_eq!("cfg".split_once('='), None);
     assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
     assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
     assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
    -
    1.52.0 · source

    pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Splits the string on the last occurrence of the specified delimiter and +

    1.52.0 · source

    pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Splits the string on the last occurrence of the specified delimiter and returns prefix before delimiter and suffix after delimiter.

    Examples
    assert_eq!("cfg".rsplit_once('='), None);
     assert_eq!("cfg=foo".rsplit_once('='), Some(("cfg", "foo")));
     assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));
    -
    1.2.0 · source

    pub fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P>where - P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within the given string +

    1.2.0 · source

    pub fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P>where + P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within the given string slice.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rmatches method can be used.

    +from a forward search, the rmatches method can be used.

    Examples
    let v: Vec<&str> = "abcXXXabcYYYabc".matches("abc").collect();
     assert_eq!(v, ["abc", "abc", "abc"]);
     
     let v: Vec<&str> = "1abc2abc3".matches(char::is_numeric).collect();
     assert_eq!(v, ["1", "2", "3"]);
    -
    1.2.0 · source

    pub fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within this string slice, +

    1.2.0 · source

    pub fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within this string slice, yielded in reverse order.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the matches method can be used.

    +

    For iterating from the front, the matches method can be used.

    Examples
    let v: Vec<&str> = "abcXXXabcYYYabc".rmatches("abc").collect();
     assert_eq!(v, ["abc", "abc", "abc"]);
     
     let v: Vec<&str> = "1abc2abc3".rmatches(char::is_numeric).collect();
     assert_eq!(v, ["3", "2", "1"]);
    -
    1.5.0 · source

    pub fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P>where - P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within this string +

    1.5.0 · source

    pub fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P>where + P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within this string slice as well as the index that the match starts at.

    For matches of pat within self that overlap, only the indices corresponding to the first match are returned.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rmatch_indices method can be used.

    +from a forward search, the rmatch_indices method can be used.

    Examples
    let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
     assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
    @@ -902,19 +905,19 @@ 
    Examples
    let v: Vec<_> = "ababa".match_indices("aba").collect(); assert_eq!(v, [(0, "aba")]); // only the first `aba`
    -
    1.5.0 · source

    pub fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within self, +

    1.5.0 · source

    pub fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within self, yielded in reverse order along with the index of the match.

    For matches of pat within self that overlap, only the indices corresponding to the last match are returned.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the match_indices method can be used.

    +

    For iterating from the front, the match_indices method can be used.

    Examples
    let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
     assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
    @@ -924,14 +927,14 @@ 
    Examples
    let v: Vec<_> = "ababa".rmatch_indices("aba").collect(); assert_eq!(v, [(2, "aba")]); // only the last `aba`
    -
    1.0.0 · source

    pub fn trim(&self) -> &str

    Returns a string slice with leading and trailing whitespace removed.

    +
    1.0.0 · source

    pub fn trim(&self) -> &str

    Returns a string slice with leading and trailing whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

    Examples
    let s = "\n Hello\tworld\t\n";
     
     assert_eq!("Hello\tworld", s.trim());
    -
    1.30.0 · source

    pub fn trim_start(&self) -> &str

    Returns a string slice with leading whitespace removed.

    +
    1.30.0 · source

    pub fn trim_start(&self) -> &str

    Returns a string slice with leading whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

    Text directionality
    @@ -951,7 +954,7 @@
    Examples
    let s = " עברית "; assert!(Some('ע') == s.trim_start().chars().next());
    -
    1.30.0 · source

    pub fn trim_end(&self) -> &str

    Returns a string slice with trailing whitespace removed.

    +
    1.30.0 · source

    pub fn trim_end(&self) -> &str

    Returns a string slice with trailing whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

    Text directionality
    @@ -971,7 +974,7 @@
    Examples
    let s = " עברית "; assert!(Some('ת') == s.trim_end().chars().rev().next());
    -
    1.0.0 · source

    pub fn trim_left(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_start

    Returns a string slice with leading whitespace removed.

    +
    1.0.0 · source

    pub fn trim_left(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_start

    Returns a string slice with leading whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space.

    Text directionality
    @@ -992,7 +995,7 @@
    Examples
    let s = " עברית"; assert!(Some('ע') == s.trim_left().chars().next());
    -
    1.0.0 · source

    pub fn trim_right(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_end

    Returns a string slice with trailing whitespace removed.

    +
    1.0.0 · source

    pub fn trim_right(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_end

    Returns a string slice with trailing whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space.

    Text directionality
    @@ -1013,11 +1016,11 @@
    Examples
    let s = "עברית "; assert!(Some('ת') == s.trim_right().chars().rev().next());
    -
    1.0.0 · source

    pub fn trim_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: DoubleEndedSearcher<'a>,

    Returns a string slice with all prefixes and suffixes that match a +

    1.0.0 · source

    pub fn trim_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: DoubleEndedSearcher<'a>,

    Returns a string slice with all prefixes and suffixes that match a pattern repeatedly removed.

    -

    The pattern can be a char, a slice of chars, or a function +

    The pattern can be a char, a slice of chars, or a function or closure that determines if a character matches.

    Examples

    Simple patterns:

    @@ -1030,10 +1033,10 @@
    Examples

    A more complex pattern, using a closure:

    assert_eq!("1foo1barXX".trim_matches(|c| c == '1' || c == 'X'), "foo1bar");
    -
    1.30.0 · source

    pub fn trim_start_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>,

    Returns a string slice with all prefixes that match a pattern +

    1.30.0 · source

    pub fn trim_start_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>,

    Returns a string slice with all prefixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. start in this context means the first @@ -1046,34 +1049,34 @@

    Examples
    let x: &[_] = &['1', '2']; assert_eq!("12foo1bar12".trim_start_matches(x), "foo1bar12");
    -
    1.45.0 · source

    pub fn strip_prefix<'a, P>(&'a self, prefix: P) -> Option<&'a str>where - P: Pattern<'a>,

    Returns a string slice with the prefix removed.

    +
    1.45.0 · source

    pub fn strip_prefix<'a, P>(&'a self, prefix: P) -> Option<&'a str>where + P: Pattern<'a>,

    Returns a string slice with the prefix removed.

    If the string starts with the pattern prefix, returns substring after the prefix, wrapped in Some. Unlike trim_start_matches, this method removes the prefix exactly once.

    If the string does not start with prefix, returns None.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    assert_eq!("foo:bar".strip_prefix("foo:"), Some("bar"));
     assert_eq!("foo:bar".strip_prefix("bar"), None);
     assert_eq!("foofoo".strip_prefix("foo"), Some("foo"));
    -
    1.45.0 · source

    pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with the suffix removed.

    +
    1.45.0 · source

    pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with the suffix removed.

    If the string ends with the pattern suffix, returns the substring before the suffix, wrapped in Some. Unlike trim_end_matches, this method removes the suffix exactly once.

    If the string does not end with suffix, returns None.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    assert_eq!("bar:foo".strip_suffix(":foo"), Some("bar"));
     assert_eq!("bar:foo".strip_suffix("bar"), None);
     assert_eq!("foofoo".strip_suffix("foo"), Some("foo"));
    -
    1.30.0 · source

    pub fn trim_end_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with all suffixes that match a pattern +

    1.30.0 · source

    pub fn trim_end_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with all suffixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. end in this context means the last @@ -1091,10 +1094,10 @@

    Examples

    A more complex pattern, using a closure:

    assert_eq!("1fooX".trim_end_matches(|c| c == '1' || c == 'X'), "1foo");
    -
    1.0.0 · source

    pub fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>,

    👎Deprecated since 1.33.0: superseded by trim_start_matches

    Returns a string slice with all prefixes that match a pattern +

    1.0.0 · source

    pub fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>,

    👎Deprecated since 1.33.0: superseded by trim_start_matches

    Returns a string slice with all prefixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. ‘Left’ in this context means the first @@ -1107,11 +1110,11 @@

    Examples
    let x: &[_] = &['1', '2']; assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
    -
    1.0.0 · source

    pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    👎Deprecated since 1.33.0: superseded by trim_end_matches

    Returns a string slice with all suffixes that match a pattern +

    1.0.0 · source

    pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    👎Deprecated since 1.33.0: superseded by trim_end_matches

    Returns a string slice with all suffixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. ‘Right’ in this context means the last @@ -1129,16 +1132,16 @@

    Examples

    A more complex pattern, using a closure:

    assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
    -
    1.0.0 · source

    pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err>where - F: FromStr,

    Parses this string slice into another type.

    +
    1.0.0 · source

    pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err>where + F: FromStr,

    Parses this string slice into another type.

    Because parse is so general, it can cause problems with type inference. As such, parse is one of the few times you’ll see the syntax affectionately known as the ‘turbofish’: ::<>. This helps the inference algorithm understand specifically which type you’re trying to parse into.

    -

    parse can parse into any type that implements the FromStr trait.

    +

    parse can parse into any type that implements the FromStr trait.

    Errors
    -

    Will return Err if it’s not possible to parse this string slice into +

    Will return Err if it’s not possible to parse this string slice into the desired type.

    Examples

    Basic usage

    @@ -1156,23 +1159,23 @@
    Examples
    let nope = "j".parse::<u32>();
     
     assert!(nope.is_err());
    -
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all characters in this string are within the ASCII range.

    +
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all characters in this string are within the ASCII range.

    Examples
    let ascii = "hello!\n";
     let non_ascii = "Grüße, Jürgen ❤";
     
     assert!(ascii.is_ascii());
     assert!(!non_ascii.is_ascii());
    -
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this string slice is_ascii, returns it as a slice -of ASCII characters, otherwise returns None.

    -
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &str) -> bool

    Checks that two strings are an ASCII case-insensitive match.

    +
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this string slice is_ascii, returns it as a slice +of ASCII characters, otherwise returns None.

    +
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &str) -> bool

    Checks that two strings are an ASCII case-insensitive match.

    Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), but without allocating and copying temporaries.

    Examples
    assert!("Ferris".eq_ignore_ascii_case("FERRIS"));
     assert!("Ferrös".eq_ignore_ascii_case("FERRöS"));
     assert!(!"Ferrös".eq_ignore_ascii_case("FERRÖS"));
    -
    1.23.0 · source

    pub fn make_ascii_uppercase(&mut self)

    Converts this string to its ASCII upper case equivalent in-place.

    +
    1.23.0 · source

    pub fn make_ascii_uppercase(&mut self)

    Converts this string to its ASCII upper case equivalent in-place.

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

    To return a new uppercased value without modifying the existing one, use @@ -1183,7 +1186,7 @@

    Examples
    s.make_ascii_uppercase(); assert_eq!("GRüßE, JüRGEN ❤", s);
    -
    1.23.0 · source

    pub fn make_ascii_lowercase(&mut self)

    Converts this string to its ASCII lower case equivalent in-place.

    +
    1.23.0 · source

    pub fn make_ascii_lowercase(&mut self)

    Converts this string to its ASCII lower case equivalent in-place.

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

    To return a new lowercased value without modifying the existing one, use @@ -1194,7 +1197,7 @@

    Examples
    s.make_ascii_lowercase(); assert_eq!("grÜße, jÜrgen ❤", s);
    -
    1.34.0 · source

    pub fn escape_debug(&self) -> EscapeDebug<'_>

    Return an iterator that escapes each char in self with char::escape_debug.

    +
    1.34.0 · source

    pub fn escape_debug(&self) -> EscapeDebug<'_>

    Return an iterator that escapes each char in self with char::escape_debug.

    Note: only extended grapheme codepoints that begin the string will be escaped.

    Examples
    @@ -1213,7 +1216,7 @@
    Examples

    Using to_string:

    assert_eq!("❤\n!".escape_debug().to_string(), "❤\\n!");
    -
    1.34.0 · source

    pub fn escape_default(&self) -> EscapeDefault<'_>

    Return an iterator that escapes each char in self with char::escape_default.

    +
    1.34.0 · source

    pub fn escape_default(&self) -> EscapeDefault<'_>

    Return an iterator that escapes each char in self with char::escape_default.

    Examples

    As an iterator:

    @@ -1230,7 +1233,7 @@
    Examples

    Using to_string:

    assert_eq!("❤\n!".escape_default().to_string(), "\\u{2764}\\n!");
    -
    1.34.0 · source

    pub fn escape_unicode(&self) -> EscapeUnicode<'_>

    Return an iterator that escapes each char in self with char::escape_unicode.

    +
    1.34.0 · source

    pub fn escape_unicode(&self) -> EscapeUnicode<'_>

    Return an iterator that escapes each char in self with char::escape_unicode.

    Examples

    As an iterator:

    @@ -1247,9 +1250,9 @@
    Examples

    Using to_string:

    assert_eq!("❤\n!".escape_unicode().to_string(), "\\u{2764}\\u{a}\\u{21}");
    -
    1.0.0 · source

    pub fn replace<'a, P>(&'a self, from: P, to: &str) -> Stringwhere - P: Pattern<'a>,

    Replaces all matches of a pattern with another string.

    -

    replace creates a new String, and copies the data from this string slice into it. +

    1.0.0 · source

    pub fn replace<'a, P>(&'a self, from: P, to: &str) -> Stringwhere + P: Pattern<'a>,

    Replaces all matches of a pattern with another string.

    +

    replace creates a new String, and copies the data from this string slice into it. While doing so, it attempts to find matches of a pattern. If it finds any, it replaces them with the replacement string slice.

    Examples
    @@ -1259,13 +1262,13 @@
    Examples
    assert_eq!("this is new", s.replace("old", "new")); assert_eq!("than an old", s.replace("is", "an"));
    -

    When the pattern doesn’t match, it returns this string slice as String:

    +

    When the pattern doesn’t match, it returns this string slice as String:

    let s = "this is old";
     assert_eq!(s, s.replace("cookie monster", "little lamb"));
    -
    1.16.0 · source

    pub fn replacen<'a, P>(&'a self, pat: P, to: &str, count: usize) -> Stringwhere - P: Pattern<'a>,

    Replaces first N matches of a pattern with another string.

    -

    replacen creates a new String, and copies the data from this string slice into it. +

    1.16.0 · source

    pub fn replacen<'a, P>(&'a self, pat: P, to: &str, count: usize) -> Stringwhere + P: Pattern<'a>,

    Replaces first N matches of a pattern with another string.

    +

    replacen creates a new String, and copies the data from this string slice into it. While doing so, it attempts to find matches of a pattern. If it finds any, it replaces them with the replacement string slice at most count times.

    Examples
    @@ -1275,15 +1278,15 @@
    Examples
    assert_eq!("new new 123 foo", s.replacen("foo", "new", 2)); assert_eq!("faa fao 123 foo", s.replacen('o', "a", 3)); assert_eq!("foo foo new23 foo", s.replacen(char::is_numeric, "new", 1));
    -

    When the pattern doesn’t match, it returns this string slice as String:

    +

    When the pattern doesn’t match, it returns this string slice as String:

    let s = "this is old";
     assert_eq!(s, s.replacen("cookie monster", "little lamb", 10));
    -
    1.2.0 · source

    pub fn to_lowercase(&self) -> String

    Returns the lowercase equivalent of this string slice, as a new String.

    +
    1.2.0 · source

    pub fn to_lowercase(&self) -> String

    Returns the lowercase equivalent of this string slice, as a new String.

    ‘Lowercase’ is defined according to the terms of the Unicode Derived Core Property Lowercase.

    Since some characters can expand into multiple characters when changing -the case, this function returns a String instead of modifying the +the case, this function returns a String instead of modifying the parameter in-place.

    Examples

    Basic usage:

    @@ -1306,11 +1309,11 @@
    Examples
    let new_year = "农历新年";
     
     assert_eq!(new_year, new_year.to_lowercase());
    -
    1.2.0 · source

    pub fn to_uppercase(&self) -> String

    Returns the uppercase equivalent of this string slice, as a new String.

    +
    1.2.0 · source

    pub fn to_uppercase(&self) -> String

    Returns the uppercase equivalent of this string slice, as a new String.

    ‘Uppercase’ is defined according to the terms of the Unicode Derived Core Property Uppercase.

    Since some characters can expand into multiple characters when changing -the case, this function returns a String instead of modifying the +the case, this function returns a String instead of modifying the parameter in-place.

    Examples

    Basic usage:

    @@ -1328,8 +1331,8 @@
    Examples
    let s = "tschüß";
     
     assert_eq!("TSCHÜSS", s.to_uppercase());
    -
    1.16.0 · source

    pub fn repeat(&self, n: usize) -> String

    Creates a new String by repeating a string n times.

    -
    Panics
    +
    1.16.0 · source

    pub fn repeat(&self, n: usize) -> String

    Creates a new String by repeating a string n times.

    +
    Panics

    This function will panic if the capacity would overflow.

    Examples

    Basic usage:

    @@ -1339,98 +1342,98 @@
    Examples
    // this will panic at runtime
     let huge = "0123456789abcdef".repeat(usize::MAX);
    -
    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> String

    Returns a copy of this string where each character is mapped to its +

    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> String

    Returns a copy of this string where each character is mapped to its ASCII upper case equivalent.

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

    -

    To uppercase the value in-place, use make_ascii_uppercase.

    +

    To uppercase the value in-place, use make_ascii_uppercase.

    To uppercase ASCII characters in addition to non-ASCII characters, use to_uppercase.

    Examples
    let s = "Grüße, Jürgen ❤";
     
     assert_eq!("GRüßE, JüRGEN ❤", s.to_ascii_uppercase());
    -
    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> String

    Returns a copy of this string where each character is mapped to its +

    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> String

    Returns a copy of this string where each character is mapped to its ASCII lower case equivalent.

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

    -

    To lowercase the value in-place, use make_ascii_lowercase.

    +

    To lowercase the value in-place, use make_ascii_lowercase.

    To lowercase ASCII characters in addition to non-ASCII characters, use to_lowercase.

    Examples
    let s = "Grüße, Jürgen ❤";
     
     assert_eq!("grüße, jürgen ❤", s.to_ascii_lowercase());
    -

    Trait Implementations§

    §

    impl Add<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +

    Trait Implementations§

    §

    impl Add<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: &ImmutableString -) -> <&ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +) -> <&ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: &ImmutableString -) -> <ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <&ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +) -> <ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <&ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: ImmutableString -) -> <&ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +) -> <&ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: ImmutableString -) -> <ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <&ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <&ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<&ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<&str> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &str)

    Performs the += operation. Read more
    §

    impl AddAssign<ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<String> for ImmutableString

    §

    fn add_assign(&mut self, rhs: String)

    Performs the += operation. Read more
    §

    impl AddAssign<char> for ImmutableString

    §

    fn add_assign(&mut self, rhs: char)

    Performs the += operation. Read more
    §

    impl AsRef<SmartString<LazyCompact>> for ImmutableString

    §

    fn as_ref(&self) -> &SmartString<LazyCompact>

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl AsRef<str> for ImmutableString

    §

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<SmartString<LazyCompact>> for ImmutableString

    §

    fn borrow(&self) -> &SmartString<LazyCompact>

    Immutably borrows from an owned value. Read more
    §

    impl Borrow<str> for ImmutableString

    §

    fn borrow(&self) -> &str

    Immutably borrows from an owned value. Read more
    §

    impl Clone for ImmutableString

    §

    fn clone(&self) -> ImmutableString

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for ImmutableString

    §

    fn default() -> ImmutableString

    Returns the “default value” for a type. Read more
    §

    impl Deref for ImmutableString

    §

    type Target = SmartString<LazyCompact>

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<ImmutableString as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for ImmutableString

    §

    fn deserialize<D>( +) -> <ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <&ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <&ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<&ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<&str> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &str)

    Performs the += operation. Read more
    §

    impl AddAssign<ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<String> for ImmutableString

    §

    fn add_assign(&mut self, rhs: String)

    Performs the += operation. Read more
    §

    impl AddAssign<char> for ImmutableString

    §

    fn add_assign(&mut self, rhs: char)

    Performs the += operation. Read more
    §

    impl AsRef<SmartString<LazyCompact>> for ImmutableString

    §

    fn as_ref(&self) -> &SmartString<LazyCompact>

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl AsRef<str> for ImmutableString

    §

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<SmartString<LazyCompact>> for ImmutableString

    §

    fn borrow(&self) -> &SmartString<LazyCompact>

    Immutably borrows from an owned value. Read more
    §

    impl Borrow<str> for ImmutableString

    §

    fn borrow(&self) -> &str

    Immutably borrows from an owned value. Read more
    §

    impl Clone for ImmutableString

    §

    fn clone(&self) -> ImmutableString

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for ImmutableString

    §

    fn default() -> ImmutableString

    Returns the “default value” for a type. Read more
    §

    impl Deref for ImmutableString

    §

    type Target = SmartString<LazyCompact>

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<ImmutableString as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for ImmutableString

    §

    fn deserialize<D>( deserializer: D -) -> Result<ImmutableString, <D as Deserializer<'de>>::Error>where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: &ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<&SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: &SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&String> for ImmutableString

    §

    fn from(value: &String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&str> for ImmutableString

    §

    fn from(value: &str) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<Box<str, Global>> for ImmutableString

    §

    fn from(value: Box<str, Global>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<String> for ImmutableString

    §

    fn from(value: String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl<'a> FromIterator<&'a char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = &'a char>,

    Creates a value from an iterator. Read more
    §

    impl<'a> FromIterator<&'a str> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = &'a str>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<SmartString<LazyCompact>> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = SmartString<LazyCompact>>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<String> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = String>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = char>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for ImmutableString

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str( - s: &str -) -> Result<ImmutableString, <ImmutableString as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for ImmutableString

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for ImmutableString

    §

    fn cmp(&self, other: &ImmutableString) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<ImmutableString> for str

    §

    fn eq(&self, other: &ImmutableString) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl<S> PartialEq<S> for ImmutableStringwhere - S: AsRef<str>,

    §

    fn eq(&self, other: &S) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<ImmutableString> for str

    §

    fn partial_cmp(&self, other: &ImmutableString) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    §

    impl<S> PartialOrd<S> for ImmutableStringwhere - S: AsRef<str>,

    §

    fn partial_cmp(&self, other: &S) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    §

    impl Serialize for ImmutableString

    §

    fn serialize<S>( +) -> Result<ImmutableString, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: &ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<&SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: &SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&String> for ImmutableString

    §

    fn from(value: &String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&str> for ImmutableString

    §

    fn from(value: &str) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<Box<str, Global>> for ImmutableString

    §

    fn from(value: Box<str, Global>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<String> for ImmutableString

    §

    fn from(value: String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl<'a> FromIterator<&'a char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = &'a char>,

    Creates a value from an iterator. Read more
    §

    impl<'a> FromIterator<&'a str> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = &'a str>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<SmartString<LazyCompact>> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = SmartString<LazyCompact>>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<String> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = String>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = char>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for ImmutableString

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str( + s: &str +) -> Result<ImmutableString, <ImmutableString as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for ImmutableString

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for ImmutableString

    §

    fn cmp(&self, other: &ImmutableString) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<ImmutableString> for str

    §

    fn eq(&self, other: &ImmutableString) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl<S> PartialEq<S> for ImmutableStringwhere + S: AsRef<str>,

    §

    fn eq(&self, other: &S) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<ImmutableString> for str

    §

    fn partial_cmp(&self, other: &ImmutableString) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    §

    impl<S> PartialOrd<S> for ImmutableStringwhere + S: AsRef<str>,

    §

    fn partial_cmp(&self, other: &S) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    §

    impl Serialize for ImmutableString

    §

    fn serialize<S>( &self, ser: S -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl Sub<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl Sub<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( self, rhs: &ImmutableString -) -> <&ImmutableString as Sub<&ImmutableString>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <&ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( +) -> <&ImmutableString as Sub<&ImmutableString>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <&ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( self, rhs: ImmutableString -) -> <ImmutableString as Sub<ImmutableString>>::Output

    Performs the - operation. Read more
    §

    impl Sub<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <&ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <&ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl SubAssign<&ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<&str> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &str)

    Performs the -= operation. Read more
    §

    impl SubAssign<ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<String> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: String)

    Performs the -= operation. Read more
    §

    impl SubAssign<char> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: char)

    Performs the -= operation. Read more
    §

    impl TryFrom<ImmutableString> for FnPtr

    §

    type Error = Box<EvalAltResult, Global>

    The type returned in the event of a conversion error.
    §

    fn try_from(value: ImmutableString) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Performs the conversion.
    §

    impl Eq for ImmutableString

    §

    impl StructuralEq for ImmutableString

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> <ImmutableString as Sub<ImmutableString>>::Output
    Performs the - operation. Read more
    §

    impl Sub<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <&ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <&ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl SubAssign<&ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<&str> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &str)

    Performs the -= operation. Read more
    §

    impl SubAssign<ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<String> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: String)

    Performs the -= operation. Read more
    §

    impl SubAssign<char> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: char)

    Performs the -= operation. Read more
    §

    impl TryFrom<ImmutableString> for FnPtr

    §

    type Error = Box<EvalAltResult, Global>

    The type returned in the event of a conversion error.
    §

    fn try_from(value: ImmutableString) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Performs the conversion.
    §

    impl Eq for ImmutableString

    §

    impl StructuralEq for ImmutableString

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere - M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere + M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.Module.html b/casbin/rhai/plugin/struct.Module.html index cd709f16..b0ab88e4 100644 --- a/casbin/rhai/plugin/struct.Module.html +++ b/casbin/rhai/plugin/struct.Module.html @@ -1,20 +1,26 @@ -Module in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Module

    pub struct Module { /* private fields */ }
    Expand description

    A module which may contain variables, sub-modules, external Rust functions, +Module in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Module

    pub struct Module { /* private fields */ }
    Expand description

    A module which may contain variables, sub-modules, external Rust functions, and/or script-defined functions.

    -

    Implementations§

    §

    impl Module

    pub fn with_capacity(_capacity: usize) -> Module

    👎Deprecated since 1.12.0: use new instead

    Create a new Module with a pre-sized capacity for functions.

    +

    Implementations§

    §

    impl Module

    pub const fn with_capacity(_capacity: usize) -> Module

    👎Deprecated since 1.12.0: use new instead

    Create a new Module with a pre-sized capacity for functions.

    Deprecated
    -

    This method is deprecated. Use new instead.

    +

    This method is deprecated. +Use new instead.

    +

    This method will be removed in the next major version.

    +

    pub fn get_custom_type(&self, type_name: &str) -> Option<&str>

    👎Deprecated since 1.16.0: use get_custom_type_display_by_name instead

    Get the display name of a registered custom type.

    +
    Deprecated
    +

    This method is deprecated. +Use get_custom_type_display_by_name instead.

    This method will be removed in the next major version.

    §

    impl Module

    pub const fn new() -> Module

    Create a new Module.

    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var_value::<i64>("answer").expect("answer should exist"), 42);
    -

    pub fn id(&self) -> Option<&str>

    Get the ID of the Module, if any.

    +

    pub fn id(&self) -> Option<&str>

    Get the ID of the Module, if any.

    Example
    let mut module = Module::new();
     module.set_id("hello");
     assert_eq!(module.id(), Some("hello"));
    -

    pub fn set_id(&mut self, id: impl Into<ImmutableString>) -> &mut Module

    Set the ID of the Module.

    +

    pub fn set_id(&mut self, id: impl Into<ImmutableString>) -> &mut Module

    Set the ID of the Module.

    If the string is empty, it is equivalent to clearing the ID.

    Example
    let mut module = Module::new();
    @@ -28,7 +34,7 @@ 
    Example
    module.clear_id(); assert_eq!(module.id(), None);

    pub fn clear(&mut self)

    Clear the Module.

    -

    pub fn set_custom_type<T>(&mut self, name: &str) -> &mut Module

    Map a custom type to a friendly display name.

    +

    pub fn set_custom_type<T>(&mut self, name: &str) -> &mut Module

    Map a custom type to a friendly display name.

    Example
    #[derive(Clone)]
     struct TestStruct;
    @@ -39,11 +45,11 @@ 
    Example
    module.set_custom_type::<TestStruct>("MyType"); -assert_eq!(module.get_custom_type(name), Some("MyType"));
    +assert_eq!(module.get_custom_type_display_by_name(name), Some("MyType"));

    pub fn set_custom_type_raw( &mut self, - type_path: impl Into<SmartString<LazyCompact>>, - name: impl Into<SmartString<LazyCompact>> + type_name: impl Into<SmartString<LazyCompact>>, + display_name: impl Into<SmartString<LazyCompact>> ) -> &mut Module

    Map a custom type to a friendly display name.

    #[derive(Clone)]
    @@ -55,8 +61,8 @@ 
    Example
    module.set_custom_type_raw(name, "MyType"); -assert_eq!(module.get_custom_type(name), Some("MyType"));
    -

    pub fn get_custom_type(&self, key: &str) -> Option<&str>

    Get the display name of a registered custom type.

    +assert_eq!(module.get_custom_type_display_by_name(name), Some("MyType"));
    +

    pub fn get_custom_type_display_by_name(&self, type_name: &str) -> Option<&str>

    Get the display name of a registered custom type.

    Example
    #[derive(Clone)]
     struct TestStruct;
    @@ -67,14 +73,27 @@ 
    Example
    module.set_custom_type::<TestStruct>("MyType"); -assert_eq!(module.get_custom_type(name), Some("MyType"));
    -

    pub fn is_empty(&self) -> bool

    Returns true if this Module contains no items.

    +assert_eq!(module.get_custom_type_display_by_name(name), Some("MyType"));
    +

    pub fn get_custom_type_display<T>(&self) -> Option<&str>

    Get the display name of a registered custom type.

    Example
    +
    #[derive(Clone)]
    +struct TestStruct;
    +
    +let name = std::any::type_name::<TestStruct>();
    +
    +let mut module = Module::new();
    +
    +module.set_custom_type::<TestStruct>("MyType");
    +
    +assert_eq!(module.get_custom_type_display::<TestStruct>(), Some("MyType"));
    +

    pub fn get_custom_type_raw<T>(&self) -> Option<&CustomTypeInfo>

    Get a registered custom type .

    +

    pub fn is_empty(&self) -> bool

    Returns true if this Module contains no items.

    +
    Example
    let module = Module::new();
     assert!(module.is_empty());
    -

    pub const fn is_indexed(&self) -> bool

    Is the Module indexed?

    +

    pub const fn is_indexed(&self) -> bool

    Is the Module indexed?

    A module must be indexed before it can be used in an import statement.

    -
    Example
    +
    Example
    let mut module = Module::new();
     assert!(module.is_indexed());
     
    @@ -83,76 +102,76 @@ 
    Example
    module.build_index(); assert!(module.is_indexed());
    -

    pub fn contains_var(&self, name: &str) -> bool

    Does a variable exist in the Module?

    -
    Example
    +

    pub fn contains_var(&self, name: &str) -> bool

    Does a variable exist in the Module?

    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert!(module.contains_var("answer"));
    -

    pub fn get_var_value<T>(&self, name: &str) -> Option<T>where - T: Variant + Clone,

    Get the value of a Module variable.

    -
    Example
    +

    pub fn get_var_value<T>(&self, name: &str) -> Option<T>where + T: Variant + Clone,

    Get the value of a Module variable.

    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var_value::<i64>("answer").expect("answer should exist"), 42);
    -

    pub fn get_var(&self, name: &str) -> Option<Dynamic>

    Get a Module variable as a Dynamic.

    -
    Example
    +

    pub fn get_var(&self, name: &str) -> Option<Dynamic>

    Get a Module variable as a Dynamic.

    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var("answer").expect("answer should exist").cast::<i64>(), 42);

    pub fn set_var( &mut self, - name: impl Into<SmartString<LazyCompact>>, - value: impl Variant + Clone + name: impl Into<SmartString<LazyCompact>>, + value: impl Variant + Clone ) -> &mut Module

    Set a variable into the Module.

    If there is an existing variable of the same name, it is replaced.

    -
    Example
    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var_value::<i64>("answer").expect("answer should exist"), 42);
    -

    pub fn contains_sub_module(&self, name: &str) -> bool

    Does a sub-module exist in the Module?

    -
    Example
    +

    pub fn contains_sub_module(&self, name: &str) -> bool

    Does a sub-module exist in the Module?

    +
    Example
    let mut module = Module::new();
     let sub_module = Module::new();
     module.set_sub_module("question", sub_module);
     assert!(module.contains_sub_module("question"));
    -

    pub fn get_sub_module(&self, name: &str) -> Option<&Module>

    Get a sub-module in the Module.

    -
    Example
    +

    pub fn get_sub_module(&self, name: &str) -> Option<&Module>

    Get a sub-module in the Module.

    +
    Example
    let mut module = Module::new();
     let sub_module = Module::new();
     module.set_sub_module("question", sub_module);
     assert!(module.get_sub_module("question").is_some());

    pub fn set_sub_module( &mut self, - name: impl Into<SmartString<LazyCompact>>, - sub_module: impl Into<Arc<Module>> + name: impl Into<SmartString<LazyCompact>>, + sub_module: impl Into<Arc<Module, Global>> ) -> &mut Module

    Set a sub-module into the Module.

    If there is an existing sub-module of the same name, it is replaced.

    -
    Example
    +
    Example
    let mut module = Module::new();
     let sub_module = Module::new();
     module.set_sub_module("question", sub_module);
     assert!(module.get_sub_module("question").is_some());
    -

    pub fn contains_fn(&self, hash_fn: u64) -> bool

    Does the particular Rust function exist in the Module?

    -

    The u64 hash is returned by the set_native_fn call.

    -
    Example
    +

    pub fn contains_fn(&self, hash_fn: u64) -> bool

    Does the particular Rust function exist in the Module?

    +

    The u64 hash is returned by the set_native_fn call.

    +
    Example
    let mut module = Module::new();
     let hash = module.set_native_fn("calc", || Ok(42_i64));
     assert!(module.contains_fn(hash));

    pub fn update_fn_namespace( &mut self, - hash_fn: u64, + hash_fn: u64, namespace: FnNamespace ) -> &mut Module

    Update the namespace of a registered function.

    -

    The u64 hash is returned by the set_native_fn call.

    +

    The u64 hash is returned by the set_native_fn call.

    pub fn set_fn( &mut self, - name: impl AsRef<str>, + name: impl Into<SmartString<LazyCompact>>, namespace: FnNamespace, access: FnAccess, - arg_names: Option<&[&str]>, - arg_types: impl AsRef<[TypeId]>, + arg_names: Option<&[&str]>, + arg_types: impl AsRef<[TypeId]>, func: CallableFunction -) -> u64

    Set a native Rust function into the Module, returning a u64 hash key.

    +) -> u64

    Set a native Rust function into the Module, returning a u64 hash key.

    If there is an existing Rust function of the same hash, it is replaced.

    WARNING - Low Level API

    This function is very low level.

    @@ -163,13 +182,13 @@
    Return Type
    In other words, the number of entries should be one larger than the number of parameters.

    pub fn set_raw_fn<T>( &mut self, - name: impl AsRef<str>, + name: impl Into<SmartString<LazyCompact>>, namespace: FnNamespace, access: FnAccess, - arg_types: impl AsRef<[TypeId]>, - func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static -) -> u64where - T: Variant + Clone,

    Set a native Rust function into the Module, returning a u64 hash key.

    + arg_types: impl AsRef<[TypeId]>, + func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static +) -> u64where + T: Variant + Clone,

    Set a native Rust function into the Module, returning a u64 hash key.

    If there is a similar existing Rust function, it is replaced.

    WARNING - Low Level API

    This function is very low level.

    @@ -185,7 +204,7 @@
    Arguments

    To access the first mutable argument, use args.get_mut(0).unwrap()

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, FnNamespace, FnAccess};
     
     let mut module = Module::new();
    @@ -213,14 +232,14 @@ 
    Example
    }); assert!(module.contains_fn(hash));
    -

    pub fn set_native_fn<A, const N: usize, const C: bool, T, F>( +

    pub fn set_native_fn<A, const N: usize, const C: bool, T, F>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + name: impl Into<SmartString<LazyCompact>>, func: F -) -> u64where +) -> u64where A: 'static, - T: Variant + Clone, - F: RegisterNativeFunction<A, N, C, T, true>,

    Set a native Rust function into the Module, returning a u64 hash key.

    + T: Variant + Clone, + F: RegisterNativeFunction<A, N, C, T, true> + SendSync + 'static,

    Set a native Rust function into the Module, returning a u64 hash key.

    If there is a similar existing Rust function, it is replaced.

    Function Namespace

    The default function namespace is FnNamespace::Internal. @@ -228,42 +247,42 @@

    Function Namespace
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    let mut module = Module::new();
     let hash = module.set_native_fn("calc", || Ok(42_i64));
     assert!(module.contains_fn(hash));
    -

    pub fn set_getter_fn<A, const C: bool, T, F>( +

    pub fn set_getter_fn<A, const C: bool, T, F>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, func: F -) -> u64where - A: Variant + Clone, - T: Variant + Clone, - F: RegisterNativeFunction<(Mut<A>,), 1, C, T, true> + SendSync + 'static,

    Set a Rust getter function taking one mutable parameter, returning a u64 hash key. +) -> u64where + A: Variant + Clone, + T: Variant + Clone, + F: RegisterNativeFunction<(Mut<A>,), 1, C, T, true> + SendSync + 'static,

    Set a Rust getter function taking one mutable parameter, returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing Rust getter function, it is replaced.

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    let mut module = Module::new();
     let hash = module.set_getter_fn("value", |x: &mut i64| { Ok(*x) });
     assert!(module.contains_fn(hash));
    -

    pub fn set_setter_fn<A, const C: bool, T, F>( +

    pub fn set_setter_fn<A, const C: bool, T, F>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, func: F -) -> u64where - A: Variant + Clone, - T: Variant + Clone, - F: RegisterNativeFunction<(Mut<A>, T), 2, C, (), true> + SendSync + 'static,

    Set a Rust setter function taking two parameters (the first one mutable) into the Module, -returning a u64 hash key. +) -> u64where + A: Variant + Clone, + T: Variant + Clone, + F: RegisterNativeFunction<(Mut<A>, T), 2, C, (), true> + SendSync + 'static,

    Set a Rust setter function taking two parameters (the first one mutable) into the Module, +returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing setter Rust function, it is replaced.

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -272,21 +291,21 @@ 
    Example
    Ok(()) }); assert!(module.contains_fn(hash));
    -

    pub fn set_getter_setter_fn<A, const C1: bool, const C2: bool, T>( +

    pub fn set_getter_setter_fn<A, const C1: bool, const C2: bool, T>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, getter: impl RegisterNativeFunction<(Mut<A>,), 1, C1, T, true> + SendSync + 'static, - setter: impl RegisterNativeFunction<(Mut<A>, T), 2, C2, (), true> + SendSync + 'static -) -> (u64, u64)where - A: Variant + Clone, - T: Variant + Clone,

    Set a pair of Rust getter and setter functions into the Module, returning both u64 hash keys. + setter: impl RegisterNativeFunction<(Mut<A>, T), 2, C2, (), true> + SendSync + 'static +) -> (u64, u64)where + A: Variant + Clone, + T: Variant + Clone,

    Set a pair of Rust getter and setter functions into the Module, returning both u64 hash keys. This is a short-hand for set_getter_fn and set_setter_fn.

    These function are automatically exposed to the global namespace.

    If there are similar existing Rust functions, they are replaced.

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -299,12 +318,12 @@ 
    Example
    ); assert!(module.contains_fn(hash_get)); assert!(module.contains_fn(hash_set));
    -

    pub fn set_indexer_get_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where - A: Variant + Clone, - B: Variant + Clone, - T: Variant + Clone, +

    pub fn set_indexer_get_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where + A: Variant + Clone, + B: Variant + Clone, + T: Variant + Clone, F: RegisterNativeFunction<(Mut<A>, B), 2, C, T, true> + SendSync + 'static,

    Set a Rust index getter taking two parameters (the first one mutable) into the Module, -returning a u64 hash key. +returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing setter Rust function, it is replaced.

    Panics
    @@ -313,7 +332,7 @@
    Panics
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -321,12 +340,12 @@ 
    Example
    Ok(*x + y.len() as i64) }); assert!(module.contains_fn(hash));
    -

    pub fn set_indexer_set_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where - A: Variant + Clone, - B: Variant + Clone, - T: Variant + Clone, - F: RegisterNativeFunction<(Mut<A>, B, T), 3, C, (), true> + SendSync + 'static,

    Set a Rust index setter taking three parameters (the first one mutable) into the Module, -returning a u64 hash key. +

    pub fn set_indexer_set_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where + A: Variant + Clone, + B: Variant + Clone, + T: Variant + Clone, + F: RegisterNativeFunction<(Mut<A>, B, T), 3, C, (), true> + SendSync + 'static,

    Set a Rust index setter taking three parameters (the first one mutable) into the Module, +returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing Rust function, it is replaced.

    Panics
    @@ -335,7 +354,7 @@
    Panics
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -343,14 +362,14 @@ 
    Example
    *x = y.len() as i64 + value; Ok(()) }); assert!(module.contains_fn(hash));
    -

    pub fn set_indexer_get_set_fn<A, B, const C1: bool, const C2: bool, T>( +

    pub fn set_indexer_get_set_fn<A, B, const C1: bool, const C2: bool, T>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<A>, B), 2, C1, T, true> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<A>, B, T), 3, C2, (), true> + SendSync + 'static -) -> (u64, u64)where - A: Variant + Clone, - B: Variant + Clone, - T: Variant + Clone,

    Set a pair of Rust index getter and setter functions into the Module, returning both u64 hash keys. + set_fn: impl RegisterNativeFunction<(Mut<A>, B, T), 3, C2, (), true> + SendSync + 'static +) -> (u64, u64)where + A: Variant + Clone, + B: Variant + Clone, + T: Variant + Clone,

    Set a pair of Rust index getter and setter functions into the Module, returning both u64 hash keys. This is a short-hand for set_indexer_get_fn and set_indexer_set_fn.

    These functions are automatically exposed to the global namespace.

    @@ -361,7 +380,7 @@
    Panics
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -375,8 +394,8 @@ 
    Example
    ); assert!(module.contains_fn(hash_get)); assert!(module.contains_fn(hash_set));
    -

    pub fn contains_qualified_fn(&self, hash_fn: u64) -> bool

    Does the particular namespace-qualified function exist in the Module?

    -

    The u64 hash is calculated by build_index.

    +

    pub fn contains_qualified_fn(&self, hash_fn: u64) -> bool

    Does the particular namespace-qualified function exist in the Module?

    +

    The u64 hash is calculated by build_index.

    pub fn combine(&mut self, other: Module) -> &mut Module

    Combine another Module into this Module. The other Module is consumed to merge into this Module.

    pub fn combine_flatten(&mut self, other: Module) -> &mut Module

    Combine another Module into this Module. @@ -385,51 +404,53 @@

    Example

    pub fn fill_with(&mut self, other: &Module) -> &mut Module

    Polyfill this Module with another Module. Only items not existing in this Module are added.

    pub fn merge(&mut self, other: &Module) -> &mut Module

    Merge another Module into this Module.

    -

    pub fn count(&self) -> (usize, usize, usize)

    Get the number of variables, functions and type iterators in the Module.

    -

    pub fn iter_sub_modules(&self) -> impl Iterator<Item = (&str, &Arc<Module>)>

    Get an iterator to the sub-modules in the Module.

    -

    pub fn iter_var(&self) -> impl Iterator<Item = (&str, &Dynamic)>

    Get an iterator to the variables in the Module.

    -

    pub fn contains_indexed_global_functions(&self) -> bool

    Does the Module contain indexed functions that have been exposed to the global namespace?

    +

    pub fn count(&self) -> (usize, usize, usize)

    Get the number of variables, functions and type iterators in the Module.

    +

    pub fn iter_sub_modules( + &self +) -> impl Iterator<Item = (&str, &Arc<Module, Global>)>

    Get an iterator to the sub-modules in the Module.

    +

    pub fn iter_var(&self) -> impl Iterator<Item = (&str, &Dynamic)>

    Get an iterator to the variables in the Module.

    +

    pub const fn contains_indexed_global_functions(&self) -> bool

    Does the Module contain indexed functions that have been exposed to the global namespace?

    Panics

    Panics if the Module is not yet indexed via build_index.

    pub fn build_index(&mut self) -> &mut Module

    Scan through all the sub-modules in the Module and build a hash index of all variables and functions as one flattened namespace.

    If the Module is already indexed, this method has no effect.

    -

    pub fn contains_qualified_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the entire module tree?

    -

    pub fn contains_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the module?

    +

    pub fn contains_qualified_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the entire module tree?

    +

    pub fn contains_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the module?

    pub fn set_iter( &mut self, type_id: TypeId, - func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Dynamic>, Global> + SendSync + 'static + func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Dynamic>, Global> + SendSync + 'static ) -> &mut Module

    Set a type iterator into the Module.

    pub fn set_iter_result( &mut self, type_id: TypeId, - func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + SendSync + 'static + func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + SendSync + 'static ) -> &mut Module

    Set a fallible type iterator into the Module.

    pub fn set_iterable<T>(&mut self) -> &mut Modulewhere - T: Variant + Clone + IntoIterator, - <T as IntoIterator>::Item: Variant + Clone,

    Set a type iterator into the Module.

    + T: Variant + Clone + IntoIterator, + <T as IntoIterator>::Item: Variant + Clone,

    Set a type iterator into the Module.

    pub fn set_iterable_result<T, X>(&mut self) -> &mut Modulewhere - T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, - X: Variant + Clone,

    Set a fallible type iterator into the Module.

    + T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, + X: Variant + Clone,

    Set a fallible type iterator into the Module.

    pub fn set_iterator<T>(&mut self) -> &mut Modulewhere - T: Variant + Clone + Iterator, - <T as Iterator>::Item: Variant + Clone,

    Set an iterator type into the Module as a type iterator.

    + T: Variant + Clone + Iterator, + <T as Iterator>::Item: Variant + Clone,

    Set an iterator type into the Module as a type iterator.

    pub fn set_iterator_result<T, X>(&mut self) -> &mut Modulewhere - T: Variant + Clone + Iterator<Item = Result<X, Box<EvalAltResult, Global>>>, - X: Variant + Clone,

    Set a iterator type into the Module as a fallible type iterator.

    -

    Trait Implementations§

    §

    impl<M> Add<M> for &Modulewhere - M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <&Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> Add<M> for Modulewhere - M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> AddAssign<M> for Modulewhere - M: Into<Module>,

    §

    fn add_assign(&mut self, rhs: M)

    Performs the += operation. Read more
    §

    impl Clone for Module

    §

    fn clone(&self) -> Module

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Module

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Module

    §

    fn default() -> Module

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Module

    §

    impl Send for Module

    §

    impl Sync for Module

    §

    impl Unpin for Module

    §

    impl !UnwindSafe for Module

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + T: Variant + Clone + Iterator<Item = Result<X, Box<EvalAltResult, Global>>>, + X: Variant + Clone,

    Set a iterator type into the Module as a fallible type iterator.

    +

    Trait Implementations§

    §

    impl<M> Add<M> for &Modulewhere + M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <&Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> Add<M> for Modulewhere + M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> AddAssign<M> for Modulewhere + M: Into<Module>,

    §

    fn add_assign(&mut self, rhs: M)

    Performs the += operation. Read more
    §

    impl Clone for Module

    §

    fn clone(&self) -> Module

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Module

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Module

    §

    fn default() -> Module

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Module

    §

    impl Send for Module

    §

    impl Sync for Module

    §

    impl Unpin for Module

    §

    impl !UnwindSafe for Module

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.NativeCallContext.html b/casbin/rhai/plugin/struct.NativeCallContext.html index 3e82722a..1825736f 100644 --- a/casbin/rhai/plugin/struct.NativeCallContext.html +++ b/casbin/rhai/plugin/struct.NativeCallContext.html @@ -1,8 +1,8 @@ -NativeCallContext in casbin::rhai::plugin - Rust
    pub struct NativeCallContext<'a> { /* private fields */ }
    Expand description

    Context of a native Rust function call.

    +NativeCallContext in casbin::rhai::plugin - Rust
    pub struct NativeCallContext<'a> { /* private fields */ }
    Expand description

    Context of a native Rust function call.

    Implementations§

    §

    impl NativeCallContext<'_>

    pub fn new( engine: &Engine, - fn_name: &str, - lib: &[Arc<Module>] + fn_name: &str, + lib: &[Arc<Module, Global>] ) -> NativeCallContext<'_>

    👎Deprecated since 1.3.0: use FnPtr::call to call a function pointer directly.

    Create a new NativeCallContext.

    Unimplemented

    This method is deprecated. It is no longer implemented and always panics.

    @@ -10,42 +10,43 @@
    Unimplemented

    This method will be removed in the next major version.

    pub fn call_fn_dynamic_raw( &self, - fn_name: impl AsRef<str>, - is_method_call: bool, + fn_name: impl AsRef<str>, + is_method_call: bool, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    👎Deprecated since 1.2.0: use call_fn_raw instead

    Call a function inside the call context.

    +) -> Result<Dynamic, Box<EvalAltResult, Global>>
    👎Deprecated since 1.2.0: use call_fn_raw instead

    Call a function inside the call context.

    Deprecated
    -

    This method is deprecated. Use call_fn_raw instead.

    +

    This method is deprecated. +Use call_fn_raw instead.

    This method will be removed in the next major version.

    §

    impl<'a> NativeCallContext<'a>

    pub const fn engine(&self) -> &Engine

    The current Engine.

    -

    pub const fn fn_name(&self) -> &str

    Name of the function called.

    +

    pub const fn fn_name(&self) -> &str

    Name of the function called.

    pub const fn position(&self) -> Position

    Position of the function call.

    -

    pub const fn call_level(&self) -> usize

    Current nesting level of function calls.

    -

    pub const fn source(&self) -> Option<&str>

    The current source.

    -

    pub const fn tag(&self) -> Option<&Dynamic>

    Custom state kept in a Dynamic.

    +

    pub const fn call_level(&self) -> usize

    Current nesting level of function calls.

    +

    pub const fn source(&self) -> Option<&str>

    The current source.

    +

    pub const fn tag(&self) -> Option<&Dynamic>

    Custom state kept in a Dynamic.

    pub fn call_fn<T>( &self, - fn_name: impl AsRef<str>, + fn_name: impl AsRef<str>, args: impl FuncArgs -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Call a function inside the call context with the provided arguments.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Call a function inside the call context with the provided arguments.

    pub fn call_native_fn<T>( &self, - fn_name: impl AsRef<str>, + fn_name: impl AsRef<str>, args: impl FuncArgs -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Call a registered native Rust function inside the call context with the provided arguments.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Call a registered native Rust function inside the call context with the provided arguments.

    This is often useful because Rust functions typically only want to cross-call other registered Rust functions and not have to worry about scripted functions hijacking the process unknowingly (or deliberately).

    pub fn call_fn_raw( &self, - fn_name: impl AsRef<str>, - is_ref_mut: bool, - is_method_call: bool, + fn_name: impl AsRef<str>, + is_ref_mut: bool, + is_method_call: bool, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a function (native Rust or scripted) inside the call context.

    -

    If is_method_call is true, the first argument is assumed to be the this pointer for +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a function (native Rust or scripted) inside the call context.

    +

    If is_method_call is true, the first argument is assumed to be the this pointer for a script-defined function (or the object of a method call).

    WARNING - Low Level API

    This function is very low level.

    @@ -54,14 +55,14 @@
    Arguments
    unnecessarily cloning the arguments.

    DO NOT reuse the arguments after this call. If they are needed afterwards, clone them before calling this function.

    -

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is +

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is not consumed.

    pub fn call_native_fn_raw( &self, - fn_name: impl AsRef<str>, - is_ref_mut: bool, + fn_name: impl AsRef<str>, + is_ref_mut: bool, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a registered native Rust function inside the call context.

    +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a registered native Rust function inside the call context.

    This is often useful because Rust functions typically only want to cross-call other registered Rust functions and not have to worry about scripted functions hijacking the process unknowingly (or deliberately).

    @@ -72,18 +73,18 @@
    Arguments
    unnecessarily cloning the arguments.

    DO NOT reuse the arguments after this call. If they are needed afterwards, clone them before calling this function.

    -

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is +

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is not consumed.

    -

    Trait Implementations§

    §

    impl<'a> Debug for NativeCallContext<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> From<(&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position)> for NativeCallContext<'a>

    §

    fn from( - value: (&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position) -) -> NativeCallContext<'a>

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for NativeCallContext<'a>

    §

    impl<'a> Send for NativeCallContext<'a>

    §

    impl<'a> Sync for NativeCallContext<'a>

    §

    impl<'a> Unpin for NativeCallContext<'a>

    §

    impl<'a> !UnwindSafe for NativeCallContext<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl<'a> Debug for NativeCallContext<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> From<(&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position)> for NativeCallContext<'a>

    §

    fn from( + value: (&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position) +) -> NativeCallContext<'a>

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for NativeCallContext<'a>

    §

    impl<'a> Send for NativeCallContext<'a>

    §

    impl<'a> Sync for NativeCallContext<'a>

    §

    impl<'a> Unpin for NativeCallContext<'a>

    §

    impl<'a> !UnwindSafe for NativeCallContext<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.Position.html b/casbin/rhai/plugin/struct.Position.html index 9ef98d2e..94e94b16 100644 --- a/casbin/rhai/plugin/struct.Position.html +++ b/casbin/rhai/plugin/struct.Position.html @@ -1,63 +1,64 @@ -Position in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Position

    pub struct Position { /* private fields */ }
    Expand description

    A location (line number + character position) in the input script.

    +Position in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::Position

    pub struct Position { /* private fields */ }
    Expand description

    A location (line number + character position) in the input script.

    Limitations

    In order to keep footprint small, both line number and character position have 16-bit resolution, meaning they go up to a maximum of 65,535 lines and 65,535 characters per line.

    Advancing beyond the maximum line length or maximum number of lines is not an error but has no effect.

    -

    Implementations§

    §

    impl Position

    pub const fn new_const(line: u16, position: u16) -> Option<Position>

    👎Deprecated since 1.6.0: use new instead

    Create a new Position.

    -

    If line is zero, then None is returned.

    +

    Implementations§

    §

    impl Position

    pub const fn new_const(line: u16, position: u16) -> Option<Position>

    👎Deprecated since 1.6.0: use new instead

    Create a new Position.

    +

    If line is zero, then None is returned.

    If position is zero, then it is at the beginning of a line.

    Deprecated
    -

    This function is deprecated. Use new (which panics when line is zero) instead.

    +

    This function is deprecated. +Use new (which panics when line is zero) instead.

    This method will be removed in the next major version.

    -
    §

    impl Position

    pub const NONE: Position = Self{ line: 0, pos: 0,}

    A Position representing no position.

    -

    pub const START: Position = Self{ line: 1, pos: 0,}

    A Position representing the first position.

    -

    pub const fn new(line: u16, position: u16) -> Position

    Create a new Position.

    +
    §

    impl Position

    pub const NONE: Position = _

    A Position representing no position.

    +

    pub const START: Position = _

    A Position representing the first position.

    +

    pub const fn new(line: u16, position: u16) -> Position

    Create a new Position.

    line must not be zero.

    If position is zero, then it is at the beginning of a line.

    Panics

    Panics if line is zero.

    -

    pub const fn line(self) -> Option<usize>

    Get the line number (1-based), or None if there is no position.

    -

    Always returns None under no_position.

    -

    pub const fn position(self) -> Option<usize>

    Get the character position (1-based), or None if at beginning of a line.

    -

    Always returns None under no_position.

    -

    pub const fn is_beginning_of_line(self) -> bool

    Is this Position at the beginning of a line?

    +

    pub const fn line(self) -> Option<usize>

    Get the line number (1-based), or None if there is no position.

    +

    Always returns None under no_position.

    +

    pub const fn position(self) -> Option<usize>

    Get the character position (1-based), or None if at beginning of a line.

    +

    Always returns None under no_position.

    +

    pub const fn is_beginning_of_line(self) -> bool

    Is this Position at the beginning of a line?

    Always returns false under no_position.

    -

    pub const fn is_none(self) -> bool

    Is there no Position?

    +

    pub const fn is_none(self) -> bool

    Is there no Position?

    Always returns true under no_position.

    pub const fn or_else(self, pos: Position) -> Position

    Returns an fallback Position if it is NONE?

    Always returns the fallback under no_position.

    -

    Trait Implementations§

    §

    impl Add<Position> for Position

    §

    type Output = Position

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: Position) -> <Position as Add<Position>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<Position> for Position

    §

    fn add_assign(&mut self, rhs: Position)

    Performs the += operation. Read more
    §

    impl Clone for Position

    §

    fn clone(&self) -> Position

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Position

    §

    fn default() -> Position

    Returns the “default value” for a type. Read more
    §

    impl Display for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Hash for Position

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for Position

    §

    fn cmp(&self, other: &Position) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<Position> for Position

    §

    fn eq(&self, other: &Position) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<Position> for Position

    §

    fn partial_cmp(&self, other: &Position) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    §

    impl Copy for Position

    §

    impl Eq for Position

    §

    impl StructuralEq for Position

    §

    impl StructuralPartialEq for Position

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl Add<Position> for Position

    §

    type Output = Position

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: Position) -> <Position as Add<Position>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<Position> for Position

    §

    fn add_assign(&mut self, rhs: Position)

    Performs the += operation. Read more
    §

    impl Clone for Position

    §

    fn clone(&self) -> Position

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Position

    §

    fn default() -> Position

    Returns the “default value” for a type. Read more
    §

    impl Display for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Hash for Position

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for Position

    §

    fn cmp(&self, other: &Position) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<Position> for Position

    §

    fn eq(&self, other: &Position) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<Position> for Position

    §

    fn partial_cmp(&self, other: &Position) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    §

    impl Copy for Position

    §

    impl Eq for Position

    §

    impl StructuralEq for Position

    §

    impl StructuralPartialEq for Position

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere - M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    source§

    impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere + M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    source§

    impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

    \ No newline at end of file diff --git a/casbin/rhai/plugin/struct.TypeId.html b/casbin/rhai/plugin/struct.TypeId.html index 1f077d67..ca9d340f 100644 --- a/casbin/rhai/plugin/struct.TypeId.html +++ b/casbin/rhai/plugin/struct.TypeId.html @@ -1,4 +1,4 @@ -TypeId in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::TypeId

    1.0.0 · source ·
    pub struct TypeId { /* private fields */ }
    Expand description

    A TypeId represents a globally unique identifier for a type.

    +TypeId in casbin::rhai::plugin - Rust

    Struct casbin::rhai::plugin::TypeId

    1.0.0 · source ·
    pub struct TypeId { /* private fields */ }
    Expand description

    A TypeId represents a globally unique identifier for a type.

    Each TypeId is an opaque object which does not allow inspection of what’s inside but does allow basic operations such as cloning, comparison, printing, and showing.

    @@ -7,8 +7,8 @@

    While TypeId implements Hash, PartialOrd, and Ord, it is worth noting that the hashes and ordering will vary between Rust releases. Beware of relying on them inside of your code!

    -

    Implementations§

    source§

    impl TypeId

    const: unstable · source

    pub fn of<T>() -> TypeIdwhere - T: 'static + ?Sized,

    Returns the TypeId of the type this generic function has been +

    Implementations§

    source§

    impl TypeId

    const: unstable · source

    pub fn of<T>() -> TypeIdwhere + T: 'static + ?Sized,

    Returns the TypeId of the type this generic function has been instantiated with.

    Examples
    use std::any::{Any, TypeId};
    @@ -19,36 +19,36 @@ 
    Examples
    assert_eq!(is_string(&0), false); assert_eq!(is_string(&"cookie monster".to_string()), true);
    -

    Trait Implementations§

    source§

    impl Clone for TypeId

    source§

    fn clone(&self) -> TypeId

    Returns a copy of the value. Read more
    source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TypeId

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Hash for TypeId

    source§

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl Ord for TypeId

    source§

    fn cmp(&self, other: &TypeId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    source§

    impl PartialEq<TypeId> for TypeId

    source§

    fn eq(&self, other: &TypeId) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialOrd<TypeId> for TypeId

    source§

    fn partial_cmp(&self, other: &TypeId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl Copy for TypeId

    source§

    impl Eq for TypeId

    source§

    impl StructuralEq for TypeId

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    source§

    impl Clone for TypeId

    source§

    fn clone(&self) -> TypeId

    Returns a copy of the value. Read more
    source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TypeId

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl Hash for TypeId

    source§

    fn hash<H>(&self, state: &mut H)where + H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl Ord for TypeId

    source§

    fn cmp(&self, other: &TypeId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    source§

    impl PartialEq<TypeId> for TypeId

    source§

    fn eq(&self, other: &TypeId) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialOrd<TypeId> for TypeId

    source§

    fn partial_cmp(&self, other: &TypeId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl Copy for TypeId

    source§

    impl Eq for TypeId

    source§

    impl StructuralEq for TypeId

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

    \ No newline at end of file diff --git a/casbin/rhai/plugin/trait.PluginFunction.html b/casbin/rhai/plugin/trait.PluginFunction.html index 56b38b32..22ec7835 100644 --- a/casbin/rhai/plugin/trait.PluginFunction.html +++ b/casbin/rhai/plugin/trait.PluginFunction.html @@ -1,26 +1,26 @@ -PluginFunction in casbin::rhai::plugin - Rust
    pub trait PluginFunction {
    +PluginFunction in casbin::rhai::plugin - Rust
    pub trait PluginFunction {
         // Required methods
         fn call(
             &self,
    -        context: Option<NativeCallContext<'_>>,
    +        context: Option<NativeCallContext<'_>>,
             args: &mut [&mut Dynamic]
    -    ) -> Result<Dynamic, Box<EvalAltResult, Global>>;
    -    fn is_method_call(&self) -> bool;
    -    fn has_context(&self) -> bool;
    +    ) -> Result<Dynamic, Box<EvalAltResult, Global>>;
    +    fn is_method_call(&self) -> bool;
    +    fn has_context(&self) -> bool;
     
         // Provided method
    -    fn is_pure(&self) -> bool { ... }
    +    fn is_pure(&self) -> bool { ... }
     }
    Expand description

    Trait implemented by a plugin function.

    This trait should not be used directly. Use the #[export_module] and #[export_fn] procedural attributes instead.

    Required Methods§

    fn call( &self, - context: Option<NativeCallContext<'_>>, + context: Option<NativeCallContext<'_>>, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call the plugin function with the arguments provided.

    -

    fn is_method_call(&self) -> bool

    Is this plugin function a method?

    -

    fn has_context(&self) -> bool

    Does this plugin function contain a NativeCallContext parameter?

    -

    Provided Methods§

    fn is_pure(&self) -> bool

    Is this plugin function pure?

    +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call the plugin function with the arguments provided.

    +

    fn is_method_call(&self) -> bool

    Is this plugin function a method?

    +

    fn has_context(&self) -> bool

    Does this plugin function contain a NativeCallContext parameter?

    +

    Provided Methods§

    fn is_pure(&self) -> bool

    Is this plugin function pure?

    This defaults to true such that any old implementation that has constant-checking code inside the function itself will continue to work.

    Implementors§

    \ No newline at end of file diff --git a/casbin/rhai/plugin/type.RhaiResult.html b/casbin/rhai/plugin/type.RhaiResult.html index dc711453..afad7c29 100644 --- a/casbin/rhai/plugin/type.RhaiResult.html +++ b/casbin/rhai/plugin/type.RhaiResult.html @@ -1,2 +1,7 @@ -RhaiResult in casbin::rhai::plugin - Rust

    Type Definition casbin::rhai::plugin::RhaiResult

    pub type RhaiResult = Result<Dynamic, Box<EvalAltResult, Global>>;
    Expand description

    Result of a Rhai function.

    -
    \ No newline at end of file +RhaiResult in casbin::rhai::plugin - Rust

    Type Alias casbin::rhai::plugin::RhaiResult

    pub type RhaiResult = Result<Dynamic, Box<EvalAltResult, Global>>;
    Expand description

    Result of a Rhai function.

    +

    Aliased Type§

    enum RhaiResult {
    +    Ok(Dynamic),
    +    Err(Box<EvalAltResult, Global>),
    +}

    Variants§

    §1.0.0

    Ok(Dynamic)

    Contains the success value

    +
    §1.0.0

    Err(Box<EvalAltResult, Global>)

    Contains the error value

    +
    \ No newline at end of file diff --git a/casbin/rhai/serde/fn.from_dynamic.html b/casbin/rhai/serde/fn.from_dynamic.html index 768b93ee..b73bb9ec 100644 --- a/casbin/rhai/serde/fn.from_dynamic.html +++ b/casbin/rhai/serde/fn.from_dynamic.html @@ -1,7 +1,7 @@ -from_dynamic in casbin::rhai::serde - Rust

    Function casbin::rhai::serde::from_dynamic

    pub fn from_dynamic<'de, T>(
    +from_dynamic in casbin::rhai::serde - Rust

    Function casbin::rhai::serde::from_dynamic

    pub fn from_dynamic<'de, T>(
         value: &'de Dynamic
    -) -> Result<T, Box<EvalAltResult, Global>>where
    -    T: Deserialize<'de>,
    Expand description

    Deserialize a Dynamic value into a Rust type that implements serde::Deserialize.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Deserialize<'de>,
    Expand description

    Deserialize a Dynamic value into a Rust type that implements serde::Deserialize.

    Example

    use rhai::{Dynamic, Array, Map, INT};
     use rhai::serde::from_dynamic;
    diff --git a/casbin/rhai/serde/fn.to_dynamic.html b/casbin/rhai/serde/fn.to_dynamic.html
    index d1fab0d9..8220b2e0 100644
    --- a/casbin/rhai/serde/fn.to_dynamic.html
    +++ b/casbin/rhai/serde/fn.to_dynamic.html
    @@ -1,5 +1,5 @@
    -to_dynamic in casbin::rhai::serde - Rust

    Function casbin::rhai::serde::to_dynamic

    pub fn to_dynamic<T>(value: T) -> Result<Dynamic, Box<EvalAltResult, Global>>where
    -    T: Serialize,
    Expand description

    Serialize a Rust type that implements serde::Serialize into a Dynamic.

    +to_dynamic in casbin::rhai::serde - Rust

    Function casbin::rhai::serde::to_dynamic

    pub fn to_dynamic<T>(value: T) -> Result<Dynamic, Box<EvalAltResult, Global>>where
    +    T: Serialize,
    Expand description

    Serialize a Rust type that implements serde::Serialize into a Dynamic.

    Example

    use rhai::{Dynamic, Array, Map};
     use rhai::serde::to_dynamic;
    diff --git a/casbin/rhai/serde/index.html b/casbin/rhai/serde/index.html
    index f51f6be4..fb4e9ce4 100644
    --- a/casbin/rhai/serde/index.html
    +++ b/casbin/rhai/serde/index.html
    @@ -1,3 +1,3 @@
    -casbin::rhai::serde - Rust

    Module casbin::rhai::serde

    Expand description

    (serde) Serialization and deserialization support for serde. +casbin::rhai::serde - Rust

    Module casbin::rhai::serde

    Expand description

    (serde) Serialization and deserialization support for serde. Exported under the serde feature only.

    -

    Structs

    Functions

    \ No newline at end of file +

    Structs

    Functions

    \ No newline at end of file diff --git a/casbin/rhai/serde/struct.DynamicDeserializer.html b/casbin/rhai/serde/struct.DynamicDeserializer.html index c5e50c79..fc79bf43 100644 --- a/casbin/rhai/serde/struct.DynamicDeserializer.html +++ b/casbin/rhai/serde/struct.DynamicDeserializer.html @@ -1,167 +1,167 @@ -DynamicDeserializer in casbin::rhai::serde - Rust
    pub struct DynamicDeserializer<'de>(_);
    Expand description

    Deserializer for Dynamic.

    +DynamicDeserializer in casbin::rhai::serde - Rust
    pub struct DynamicDeserializer<'de>(/* private fields */);
    Expand description

    Deserializer for Dynamic.

    Implementations§

    §

    impl<'de> DynamicDeserializer<'de>

    pub const fn new(value: &'de Dynamic) -> DynamicDeserializer<'de>

    Create a DynamicDeserializer from a reference to a Dynamic value.

    The reference is necessary because the deserialized type may hold references (especially &str) to the source Dynamic.

    -

    Trait Implementations§

    §

    impl<'de> Deserializer<'de> for DynamicDeserializer<'de>

    §

    type Error = Box<EvalAltResult, Global>

    The error type that can be returned if some error occurs during -deserialization.
    §

    fn deserialize_any<V>( +

    Trait Implementations§

    §

    impl<'de> Deserializer<'de> for DynamicDeserializer<'de>

    §

    type Error = Box<EvalAltResult, Global>

    The error type that can be returned if some error occurs during +deserialization.
    §

    fn deserialize_any<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Require the Deserializer to figure out how to drive the visitor based -on what data type is in the input. Read more
    §

    fn deserialize_bool<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Require the Deserializer to figure out how to drive the visitor based +on what data type is in the input. Read more
    §

    fn deserialize_bool<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a bool value.
    §

    fn deserialize_i8<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a bool value.
    §

    fn deserialize_i8<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i8 value.
    §

    fn deserialize_i16<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i8 value.
    §

    fn deserialize_i16<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i16 value.
    §

    fn deserialize_i32<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i16 value.
    §

    fn deserialize_i32<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i32 value.
    §

    fn deserialize_i64<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i32 value.
    §

    fn deserialize_i64<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i64 value.
    §

    fn deserialize_i128<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i64 value.
    §

    fn deserialize_i128<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i128 value. Read more
    §

    fn deserialize_u8<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an i128 value. Read more
    §

    fn deserialize_u8<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u8 value.
    §

    fn deserialize_u16<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u8 value.
    §

    fn deserialize_u16<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u16 value.
    §

    fn deserialize_u32<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u16 value.
    §

    fn deserialize_u32<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u32 value.
    §

    fn deserialize_u64<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u32 value.
    §

    fn deserialize_u64<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u64 value.
    §

    fn deserialize_u128<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a u64 value.
    §

    fn deserialize_u128<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an u128 value. Read more
    §

    fn deserialize_f32<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an u128 value. Read more
    §

    fn deserialize_f32<V>( self, _visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a f32 value.
    §

    fn deserialize_f64<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a f32 value.
    §

    fn deserialize_f64<V>( self, _visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a f64 value.
    §

    fn deserialize_char<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a f64 value.
    §

    fn deserialize_char<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a char value.
    §

    fn deserialize_str<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a char value.
    §

    fn deserialize_str<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a string value and does +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,
    Hint that the Deserialize type is expecting a string value and does not benefit from taking ownership of buffered data owned by the -Deserializer. Read more
    §

    fn deserialize_string<V>( +Deserializer. Read more

    §

    fn deserialize_string<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a string value and would +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,
    Hint that the Deserialize type is expecting a string value and would benefit from taking ownership of buffered data owned by the -Deserializer. Read more
    §

    fn deserialize_bytes<V>( +Deserializer. Read more

    §

    fn deserialize_bytes<V>( self, _visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a byte array and does not +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,
    Hint that the Deserialize type is expecting a byte array and does not benefit from taking ownership of buffered data owned by the -Deserializer. Read more
    §

    fn deserialize_byte_buf<V>( +Deserializer. Read more

    §

    fn deserialize_byte_buf<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a byte array and would +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,
    Hint that the Deserialize type is expecting a byte array and would benefit from taking ownership of buffered data owned by the -Deserializer. Read more
    §

    fn deserialize_option<V>( +Deserializer. Read more

    §

    fn deserialize_option<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an optional value. Read more
    §

    fn deserialize_unit<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an optional value. Read more
    §

    fn deserialize_unit<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a unit value.
    §

    fn deserialize_unit_struct<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a unit value.
    §

    fn deserialize_unit_struct<V>( self, - _name: &'static str, + _name: &'static str, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a unit struct with a -particular name.
    §

    fn deserialize_newtype_struct<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a unit struct with a +particular name.
    §

    fn deserialize_newtype_struct<V>( self, - _name: &'static str, + _name: &'static str, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a newtype struct with a -particular name.
    §

    fn deserialize_seq<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a newtype struct with a +particular name.
    §

    fn deserialize_seq<V>( self, _visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a sequence of values.
    §

    fn deserialize_tuple<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a sequence of values.
    §

    fn deserialize_tuple<V>( self, - _len: usize, + _len: usize, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a sequence of values and -knows how many values there are without looking at the serialized data.
    §

    fn deserialize_tuple_struct<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a sequence of values and +knows how many values there are without looking at the serialized data.
    §

    fn deserialize_tuple_struct<V>( self, - _name: &'static str, - _len: usize, + _name: &'static str, + _len: usize, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a tuple struct with a -particular name and number of fields.
    §

    fn deserialize_map<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a tuple struct with a +particular name and number of fields.
    §

    fn deserialize_map<V>( self, _visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a map of key-value pairs.
    §

    fn deserialize_struct<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a map of key-value pairs.
    §

    fn deserialize_struct<V>( self, - _name: &'static str, - _fields: &'static [&'static str], + _name: &'static str, + _fields: &'static [&'static str], visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting a struct with a particular -name and fields.
    §

    fn deserialize_enum<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting a struct with a particular +name and fields.
    §

    fn deserialize_enum<V>( self, - _name: &'static str, - _variants: &'static [&'static str], + _name: &'static str, + _variants: &'static [&'static str], visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting an enum value with a -particular name and possible variants.
    §

    fn deserialize_identifier<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting an enum value with a +particular name and possible variants.
    §

    fn deserialize_identifier<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type is expecting the name of a struct -field or the discriminant of an enum variant.
    §

    fn deserialize_ignored_any<V>( +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,

    Hint that the Deserialize type is expecting the name of a struct +field or the discriminant of an enum variant.
    §

    fn deserialize_ignored_any<V>( self, visitor: V -) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where - V: Visitor<'de>,

    Hint that the Deserialize type needs to deserialize a value whose type -doesn’t matter because it is ignored. Read more
    source§

    fn is_human_readable(&self) -> bool

    Determine whether Deserialize implementations should expect to -deserialize their human-readable form. Read more

    Auto Trait Implementations§

    §

    impl<'de> !RefUnwindSafe for DynamicDeserializer<'de>

    §

    impl<'de> Send for DynamicDeserializer<'de>

    §

    impl<'de> Sync for DynamicDeserializer<'de>

    §

    impl<'de> Unpin for DynamicDeserializer<'de>

    §

    impl<'de> !UnwindSafe for DynamicDeserializer<'de>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> Result<<V as Visitor<'de>>::Value, Box<EvalAltResult, Global>>where + V: Visitor<'de>,
    Hint that the Deserialize type needs to deserialize a value whose type +doesn’t matter because it is ignored. Read more
    source§

    fn is_human_readable(&self) -> bool

    Determine whether Deserialize implementations should expect to +deserialize their human-readable form. Read more

    Auto Trait Implementations§

    §

    impl<'de> !RefUnwindSafe for DynamicDeserializer<'de>

    §

    impl<'de> Send for DynamicDeserializer<'de>

    §

    impl<'de> Sync for DynamicDeserializer<'de>

    §

    impl<'de> Unpin for DynamicDeserializer<'de>

    §

    impl<'de> !UnwindSafe for DynamicDeserializer<'de>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/serde/struct.DynamicSerializer.html b/casbin/rhai/serde/struct.DynamicSerializer.html index d596c842..0c4f7822 100644 --- a/casbin/rhai/serde/struct.DynamicSerializer.html +++ b/casbin/rhai/serde/struct.DynamicSerializer.html @@ -1,190 +1,190 @@ -DynamicSerializer in casbin::rhai::serde - Rust
    pub struct DynamicSerializer { /* private fields */ }
    Expand description

    Serializer for Dynamic.

    +DynamicSerializer in casbin::rhai::serde - Rust
    pub struct DynamicSerializer { /* private fields */ }
    Expand description

    Serializer for Dynamic.

    Implementations§

    §

    impl DynamicSerializer

    pub const fn new(value: Dynamic) -> DynamicSerializer

    Create a DynamicSerializer from a Dynamic value.

    -

    Trait Implementations§

    §

    impl SerializeMap for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_key<T>( +

    Trait Implementations§

    §

    impl SerializeMap for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_key<T>( &mut self, - _key: &T -) -> Result<(), Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a map key. Read more
    §

    fn serialize_value<T>( + _key: &T +) -> Result<(), Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a map key. Read more
    §

    fn serialize_value<T>( &mut self, - _value: &T -) -> Result<(), Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a map value. Read more
    §

    fn serialize_entry<K, T>( + _value: &T +) -> Result<(), Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a map value. Read more
    §

    fn serialize_entry<K, T>( &mut self, - _key: &K, - _value: &T -) -> Result<(), Box<EvalAltResult, Global>>where - K: Serialize + ?Sized, - T: Serialize + ?Sized,

    Serialize a map entry consisting of a key and a value. Read more
    §

    fn end( + _key: &K, + _value: &T +) -> Result<(), Box<EvalAltResult, Global>>where + K: Serialize + ?Sized, + T: Serialize + ?Sized,

    Serialize a map entry consisting of a key and a value. Read more
    §

    fn end( self -) -> Result<<DynamicSerializer as SerializeMap>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a map.
    §

    impl SerializeSeq for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_element<T>( +) -> Result<<DynamicSerializer as SerializeMap>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a map.
    §

    impl SerializeSeq for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_element<T>( &mut self, - _value: &T -) -> Result<(), Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a sequence element.
    §

    fn end( + _value: &T +) -> Result<(), Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a sequence element.
    §

    fn end( self -) -> Result<<DynamicSerializer as SerializeSeq>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a sequence.
    §

    impl SerializeStruct for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_field<T>( +) -> Result<<DynamicSerializer as SerializeSeq>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a sequence.
    §

    impl SerializeStruct for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_field<T>( &mut self, - _key: &'static str, - _value: &T -) -> Result<(), Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a struct field.
    §

    fn end( + _key: &'static str, + _value: &T +) -> Result<(), Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a struct field.
    §

    fn end( self -) -> Result<<DynamicSerializer as SerializeStruct>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a struct.
    source§

    fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

    Indicate that a struct field has been skipped.
    §

    impl SerializeTuple for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_element<T>( +) -> Result<<DynamicSerializer as SerializeStruct>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a struct.
    source§

    fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

    Indicate that a struct field has been skipped.
    §

    impl SerializeTuple for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_element<T>( &mut self, - _value: &T -) -> Result<(), Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a tuple element.
    §

    fn end( + _value: &T +) -> Result<(), Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a tuple element.
    §

    fn end( self -) -> Result<<DynamicSerializer as SerializeTuple>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a tuple.
    §

    impl SerializeTupleStruct for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_field<T>( +) -> Result<<DynamicSerializer as SerializeTuple>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a tuple.
    §

    impl SerializeTupleStruct for DynamicSerializer

    §

    type Ok = Dynamic

    Must match the Ok type of our Serializer.
    §

    type Error = Box<EvalAltResult, Global>

    Must match the Error type of our Serializer.
    §

    fn serialize_field<T>( &mut self, - _value: &T -) -> Result<(), Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a tuple struct field.
    §

    fn end( + _value: &T +) -> Result<(), Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a tuple struct field.
    §

    fn end( self -) -> Result<<DynamicSerializer as SerializeTupleStruct>::Ok, Box<EvalAltResult, Global>>

    Finish serializing a tuple struct.
    §

    impl Serializer for &mut DynamicSerializer

    §

    type Ok = Dynamic

    The output type produced by this Serializer during successful +) -> Result<<DynamicSerializer as SerializeTupleStruct>::Ok, Box<EvalAltResult, Global>>
    Finish serializing a tuple struct.
    §

    impl Serializer for &mut DynamicSerializer

    §

    type Ok = Dynamic

    The output type produced by this Serializer during successful serialization. Most serializers that produce text or binary output should set Ok = () and serialize into an io::Write or buffer contained within the Serializer instance. Serializers that build in-memory data structures may be simplified by using Ok to propagate -the data structure around.
    §

    type Error = Box<EvalAltResult, Global>

    The error type when some error occurs during serialization.
    §

    type SerializeSeq = DynamicSerializer

    Type returned from serialize_seq for serializing the content of the -sequence.
    §

    type SerializeTuple = DynamicSerializer

    Type returned from serialize_tuple for serializing the content of -the tuple.
    §

    type SerializeTupleStruct = DynamicSerializer

    Type returned from serialize_tuple_struct for serializing the -content of the tuple struct.
    §

    type SerializeTupleVariant = TupleVariantSerializer

    Type returned from serialize_tuple_variant for serializing the -content of the tuple variant.
    §

    type SerializeMap = DynamicSerializer

    Type returned from serialize_map for serializing the content of the -map.
    §

    type SerializeStruct = DynamicSerializer

    Type returned from serialize_struct for serializing the content of -the struct.
    §

    type SerializeStructVariant = StructVariantSerializer

    Type returned from serialize_struct_variant for serializing the -content of the struct variant.
    §

    fn serialize_bool( +the data structure around.

    §

    type Error = Box<EvalAltResult, Global>

    The error type when some error occurs during serialization.
    §

    type SerializeSeq = DynamicSerializer

    Type returned from serialize_seq for serializing the content of the +sequence.
    §

    type SerializeTuple = DynamicSerializer

    Type returned from serialize_tuple for serializing the content of +the tuple.
    §

    type SerializeTupleStruct = DynamicSerializer

    Type returned from serialize_tuple_struct for serializing the +content of the tuple struct.
    §

    type SerializeTupleVariant = TupleVariantSerializer

    Type returned from serialize_tuple_variant for serializing the +content of the tuple variant.
    §

    type SerializeMap = DynamicSerializer

    Type returned from serialize_map for serializing the content of the +map.
    §

    type SerializeStruct = DynamicSerializer

    Type returned from serialize_struct for serializing the content of +the struct.
    §

    type SerializeStructVariant = StructVariantSerializer

    Type returned from serialize_struct_variant for serializing the +content of the struct variant.
    §

    fn serialize_bool( self, - v: bool -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a bool value. Read more
    §

    fn serialize_i8( + v: bool +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a bool value. Read more
    §

    fn serialize_i8( self, - v: i8 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i8 value. Read more
    §

    fn serialize_i16( + v: i8 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i8 value. Read more
    §

    fn serialize_i16( self, - v: i16 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i16 value. Read more
    §

    fn serialize_i32( + v: i16 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i16 value. Read more
    §

    fn serialize_i32( self, - v: i32 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i32 value. Read more
    §

    fn serialize_i64( + v: i32 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i32 value. Read more
    §

    fn serialize_i64( self, - v: i64 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i64 value. Read more
    §

    fn serialize_i128( + v: i64 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i64 value. Read more
    §

    fn serialize_i128( self, - v: i128 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i128 value. Read more
    §

    fn serialize_u8( + v: i128 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an i128 value. Read more
    §

    fn serialize_u8( self, - v: u8 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u8 value. Read more
    §

    fn serialize_u16( + v: u8 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u8 value. Read more
    §

    fn serialize_u16( self, - v: u16 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u16 value. Read more
    §

    fn serialize_u32( + v: u16 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u16 value. Read more
    §

    fn serialize_u32( self, - v: u32 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u32 value. Read more
    §

    fn serialize_u64( + v: u32 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u32 value. Read more
    §

    fn serialize_u64( self, - v: u64 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u64 value. Read more
    §

    fn serialize_u128( + v: u64 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u64 value. Read more
    §

    fn serialize_u128( self, - v: u128 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u128 value. Read more
    §

    fn serialize_f32( + v: u128 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a u128 value. Read more
    §

    fn serialize_f32( self, - v: f32 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an f32 value. Read more
    §

    fn serialize_f64( + v: f32 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an f32 value. Read more
    §

    fn serialize_f64( self, - v: f64 -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an f64 value. Read more
    §

    fn serialize_char( + v: f64 +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize an f64 value. Read more
    §

    fn serialize_char( self, - v: char -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a character. Read more
    §

    fn serialize_str( + v: char +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a character. Read more
    §

    fn serialize_str( self, - v: &str -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a &str. Read more
    §

    fn serialize_bytes( + v: &str +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a &str. Read more
    §

    fn serialize_bytes( self, - _v: &[u8] -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a chunk of raw byte data. Read more
    §

    fn serialize_none( + _v: &[u8] +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a chunk of raw byte data. Read more
    §

    fn serialize_none( self -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a None value. Read more
    §

    fn serialize_some<T>( +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a None value. Read more
    §

    fn serialize_some<T>( self, - value: &T -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a Some(T) value. Read more
    §

    fn serialize_unit( + value: &T +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a Some(T) value. Read more
    §

    fn serialize_unit( self -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a () value. Read more
    §

    fn serialize_unit_struct( - self, - _name: &'static str -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a unit struct like struct Unit or PhantomData<T>. Read more
    §

    fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a unit variant like E::A in enum E { A, B }. Read more
    §

    fn serialize_newtype_struct<T>( - self, - _name: &'static str, - value: &T -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a newtype struct like struct Millimeters(u8). Read more
    §

    fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T -) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>where - T: Serialize + ?Sized,

    Serialize a newtype variant like E::N in enum E { N(u8) }. Read more
    §

    fn serialize_seq( - self, - _len: Option<usize> -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeSeq, Box<EvalAltResult, Global>>

    Begin to serialize a variably sized sequence. This call must be +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>
    Serialize a () value. Read more
    §

    fn serialize_unit_struct( + self, + _name: &'static str +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a unit struct like struct Unit or PhantomData<T>. Read more
    §

    fn serialize_unit_variant( + self, + _name: &'static str, + _variant_index: u32, + variant: &'static str +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>

    Serialize a unit variant like E::A in enum E { A, B }. Read more
    §

    fn serialize_newtype_struct<T>( + self, + _name: &'static str, + value: &T +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a newtype struct like struct Millimeters(u8). Read more
    §

    fn serialize_newtype_variant<T>( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + _value: &T +) -> Result<<&mut DynamicSerializer as Serializer>::Ok, Box<EvalAltResult, Global>>where + T: Serialize + ?Sized,

    Serialize a newtype variant like E::N in enum E { N(u8) }. Read more
    §

    fn serialize_seq( + self, + _len: Option<usize> +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeSeq, Box<EvalAltResult, Global>>

    Begin to serialize a variably sized sequence. This call must be followed by zero or more calls to serialize_element, then a call to -end. Read more
    §

    fn serialize_tuple( +end. Read more

    §

    fn serialize_tuple( self, - len: usize -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeTuple, Box<EvalAltResult, Global>>

    Begin to serialize a statically sized sequence whose length will be + len: usize +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeTuple, Box<EvalAltResult, Global>>
    Begin to serialize a statically sized sequence whose length will be known at deserialization time without looking at the serialized data. This call must be followed by zero or more calls to serialize_element, -then a call to end. Read more
    §

    fn serialize_tuple_struct( +then a call to end. Read more

    §

    fn serialize_tuple_struct( self, - _name: &'static str, - len: usize -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeTupleStruct, Box<EvalAltResult, Global>>

    Begin to serialize a tuple struct like struct Rgb(u8, u8, u8). This + _name: &'static str, + len: usize +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeTupleStruct, Box<EvalAltResult, Global>>
    Begin to serialize a tuple struct like struct Rgb(u8, u8, u8). This call must be followed by zero or more calls to serialize_field, then a -call to end. Read more
    §

    fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeTupleVariant, Box<EvalAltResult, Global>>

    Begin to serialize a tuple variant like E::T in enum E { T(u8, u8) }. This call must be followed by zero or more calls to -serialize_field, then a call to end. Read more
    §

    fn serialize_map( - self, - _len: Option<usize> -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeMap, Box<EvalAltResult, Global>>

    Begin to serialize a map. This call must be followed by zero or more -calls to serialize_key and serialize_value, then a call to end. Read more
    §

    fn serialize_struct( - self, - _name: &'static str, - len: usize -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeStruct, Box<EvalAltResult, Global>>

    Begin to serialize a struct like struct Rgb { r: u8, g: u8, b: u8 }. +call to end. Read more
    §

    fn serialize_tuple_variant( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + _len: usize +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeTupleVariant, Box<EvalAltResult, Global>>

    Begin to serialize a tuple variant like E::T in enum E { T(u8, u8) }. This call must be followed by zero or more calls to +serialize_field, then a call to end. Read more
    §

    fn serialize_map( + self, + _len: Option<usize> +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeMap, Box<EvalAltResult, Global>>

    Begin to serialize a map. This call must be followed by zero or more +calls to serialize_key and serialize_value, then a call to end. Read more
    §

    fn serialize_struct( + self, + _name: &'static str, + len: usize +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeStruct, Box<EvalAltResult, Global>>

    Begin to serialize a struct like struct Rgb { r: u8, g: u8, b: u8 }. This call must be followed by zero or more calls to serialize_field, -then a call to end. Read more
    §

    fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize -) -> Result<<&mut DynamicSerializer as Serializer>::SerializeStructVariant, Box<EvalAltResult, Global>>

    Begin to serialize a struct variant like E::S in enum E { S { r: u8, g: u8, b: u8 } }. This call must be followed by zero or more calls to -serialize_field, then a call to end. Read more
    source§

    fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>where - I: IntoIterator, - <I as IntoIterator>::Item: Serialize,

    Collect an iterator as a sequence. Read more
    source§

    fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>where - K: Serialize, - V: Serialize, - I: IntoIterator<Item = (K, V)>,

    Collect an iterator as a map. Read more
    source§

    fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>where - T: Display + ?Sized,

    Serialize a string produced by an implementation of Display. Read more
    source§

    fn is_human_readable(&self) -> bool

    Determine whether Serialize implementations should serialize in -human-readable form. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +then a call to end. Read more
    §

    fn serialize_struct_variant( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + _len: usize +) -> Result<<&mut DynamicSerializer as Serializer>::SerializeStructVariant, Box<EvalAltResult, Global>>

    Begin to serialize a struct variant like E::S in enum E { S { r: u8, g: u8, b: u8 } }. This call must be followed by zero or more calls to +serialize_field, then a call to end. Read more
    source§

    fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>where + I: IntoIterator, + <I as IntoIterator>::Item: Serialize,

    Collect an iterator as a sequence. Read more
    source§

    fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>where + K: Serialize, + V: Serialize, + I: IntoIterator<Item = (K, V)>,

    Collect an iterator as a map. Read more
    source§

    fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>where + T: Display + ?Sized,

    Serialize a string produced by an implementation of Display. Read more
    source§

    fn is_human_readable(&self) -> bool

    Determine whether Serialize implementations should serialize in +human-readable form. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/sidebar-items.js b/casbin/rhai/sidebar-items.js index 69beb903..7d7b22b3 100644 --- a/casbin/rhai/sidebar-items.js +++ b/casbin/rhai/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"attr":["export_fn","export_module"],"constant":["OP_CONTAINS","OP_EQUALS"],"enum":["EvalAltResult","FnAccess","FnNamespace","LexError","ParseErrorType"],"fn":["eval","eval_file","format_map_as_json","run","run_file"],"macro":["combine_with_exported_module","def_package","exported_module","register_exported_fn","set_exported_fn","set_exported_global_fn"],"mod":["config","packages","plugin","serde"],"struct":["AST","Dynamic","Engine","EvalContext","Expression","FnPtr","ImmutableString","Instant","Locked","Module","NativeCallContext","ParseError","Position","Scope","Shared","TypeBuilder","VarDefInfo"],"trait":["CustomType","FuncArgs","RegisterNativeFunction"],"type":["Array","Blob","INT","Map","OptimizationLevel"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"attr":["export_fn","export_module"],"constant":["OP_CONTAINS","OP_EQUALS"],"enum":["EvalAltResult","FnAccess","FnNamespace","LexError","ParseErrorType"],"fn":["eval","eval_file","format_map_as_json","run","run_file"],"macro":["combine_with_exported_module","def_package","exported_module","register_exported_fn","set_exported_fn","set_exported_global_fn"],"mod":["config","packages","plugin","serde"],"struct":["AST","Dynamic","Engine","EvalContext","Expression","FnPtr","ImmutableString","Instant","Locked","Module","NativeCallContext","ParseError","Position","Scope","Shared","TypeBuilder","VarDefInfo"],"trait":["CustomType","FuncArgs","RegisterNativeFunction"],"type":["Array","Blob","INT","Map"]}; \ No newline at end of file diff --git a/casbin/rhai/struct.AST.html b/casbin/rhai/struct.AST.html index 81f4bc6e..907cb1c5 100644 --- a/casbin/rhai/struct.AST.html +++ b/casbin/rhai/struct.AST.html @@ -1,9 +1,9 @@ -AST in casbin::rhai - Rust

    Struct casbin::rhai::AST

    pub struct AST { /* private fields */ }
    Expand description

    Compiled AST (abstract syntax tree) of a Rhai script.

    +AST in casbin::rhai - Rust

    Struct casbin::rhai::AST

    pub struct AST { /* private fields */ }
    Expand description

    Compiled AST (abstract syntax tree) of a Rhai script.

    Thread Safety

    Currently, AST is neither Send nor Sync. Turn on the sync feature to make it Send + Sync.

    Implementations§

    §

    impl AST

    pub fn empty() -> AST

    Create an empty AST.

    -

    pub fn source(&self) -> Option<&str>

    Get the source, if any.

    -

    pub fn set_source(&mut self, source: impl Into<ImmutableString>) -> &mut AST

    Set the source.

    +

    pub fn source(&self) -> Option<&str>

    Get the source, if any.

    +

    pub fn set_source(&mut self, source: impl Into<ImmutableString>) -> &mut AST

    Set the source.

    pub fn clear_source(&mut self) -> &mut AST

    Clear the source.

    pub fn clone_statements_only(&self) -> AST

    Clone the AST’s script statements into a new AST. No functions are cloned.

    @@ -83,9 +83,9 @@
    Example

    pub fn clear_statements(&mut self) -> &mut AST

    Clear all statements in the AST, leaving only function definitions.

    pub fn iter_literal_variables( &self, - include_constants: bool, - include_variables: bool -) -> impl Iterator<Item = (&str, bool, Dynamic)>

    Extract all top-level literal constant and/or variable definitions. + include_constants: bool, + include_variables: bool +) -> impl Iterator<Item = (&str, bool, Dynamic)>

    Extract all top-level literal constant and/or variable definitions. This is useful for extracting all global constants from a script without actually running it.

    A literal constant/variable definition takes the form of: const VAR = value; and let VAR = value; @@ -136,17 +136,17 @@

    Example
    assert_eq!(scope.len(), 2); Ok(())
    -

    Trait Implementations§

    §

    impl<A> Add<A> for &ASTwhere - A: AsRef<AST>,

    §

    type Output = AST

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: A) -> <&AST as Add<A>>::Output

    Performs the + operation. Read more
    §

    impl<A> AddAssign<A> for ASTwhere - A: Into<AST>,

    §

    fn add_assign(&mut self, rhs: A)

    Performs the += operation. Read more
    §

    impl AsRef<[Stmt]> for AST

    §

    fn as_ref(&self) -> &[Stmt]

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<[Stmt]> for AST

    §

    fn borrow(&self) -> &[Stmt]

    Immutably borrows from an owned value. Read more
    §

    impl Clone for AST

    §

    fn clone(&self) -> AST

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for AST

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for AST

    §

    fn default() -> AST

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for AST

    §

    impl Send for AST

    §

    impl Sync for AST

    §

    impl Unpin for AST

    §

    impl !UnwindSafe for AST

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl<A> Add<A> for &ASTwhere + A: AsRef<AST>,

    §

    type Output = AST

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: A) -> <&AST as Add<A>>::Output

    Performs the + operation. Read more
    §

    impl<A> AddAssign<A> for ASTwhere + A: Into<AST>,

    §

    fn add_assign(&mut self, rhs: A)

    Performs the += operation. Read more
    §

    impl AsRef<[Stmt]> for AST

    §

    fn as_ref(&self) -> &[Stmt]

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<[Stmt]> for AST

    §

    fn borrow(&self) -> &[Stmt]

    Immutably borrows from an owned value. Read more
    §

    impl Clone for AST

    §

    fn clone(&self) -> AST

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for AST

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for AST

    §

    fn default() -> AST

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for AST

    §

    impl Send for AST

    §

    impl Sync for AST

    §

    impl Unpin for AST

    §

    impl !UnwindSafe for AST

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.Dynamic.html b/casbin/rhai/struct.Dynamic.html index 043787cf..49c9458c 100644 --- a/casbin/rhai/struct.Dynamic.html +++ b/casbin/rhai/struct.Dynamic.html @@ -1,21 +1,23 @@ -Dynamic in casbin::rhai - Rust

    Struct casbin::rhai::Dynamic

    pub struct Dynamic(_);
    Expand description

    Dynamic type containing any value.

    -

    Implementations§

    §

    impl Dynamic

    pub fn as_string(self) -> Result<String, &'static str>

    👎Deprecated since 1.1.0: use into_string instead

    Convert the Dynamic into a String and return it. +Dynamic in casbin::rhai - Rust

    Struct casbin::rhai::Dynamic

    pub struct Dynamic(/* private fields */);
    Expand description

    Dynamic type containing any value.

    +

    Implementations§

    §

    impl Dynamic

    pub fn as_string(self) -> Result<String, &'static str>

    👎Deprecated since 1.1.0: use into_string instead

    Convert the Dynamic into a String and return it. If there are other references to the same string, a cloned copy is returned. Returns the name of the actual type if the cast fails.

    Deprecated
    -

    This method is deprecated. Use into_string instead.

    +

    This method is deprecated. +Use into_string instead.

    This method will be removed in the next major version.

    -

    pub fn as_immutable_string(self) -> Result<ImmutableString, &'static str>

    👎Deprecated since 1.1.0: use into_immutable_string instead

    Convert the Dynamic into an ImmutableString and return it. +

    pub fn as_immutable_string(self) -> Result<ImmutableString, &'static str>

    👎Deprecated since 1.1.0: use into_immutable_string instead

    Convert the Dynamic into an ImmutableString and return it. Returns the name of the actual type if the cast fails.

    Deprecated
    -

    This method is deprecated. Use into_immutable_string instead.

    +

    This method is deprecated. +Use into_immutable_string instead.

    This method will be removed in the next major version.

    -
    §

    impl Dynamic

    pub const fn tag(&self) -> i32

    Get the arbitrary data attached to this Dynamic.

    -

    pub fn set_tag(&mut self, value: i32) -> &mut Dynamic

    Attach arbitrary data to this Dynamic.

    -

    pub const fn is_variant(&self) -> bool

    Does this Dynamic hold a variant data type instead of one of the supported system +

    §

    impl Dynamic

    pub const fn tag(&self) -> i32

    Get the arbitrary data attached to this Dynamic.

    +

    pub fn set_tag(&mut self, value: i32) -> &mut Dynamic

    Attach arbitrary data to this Dynamic.

    +

    pub const fn is_variant(&self) -> bool

    Does this Dynamic hold a variant data type instead of one of the supported system primitive types?

    -

    pub fn is<T>(&self) -> boolwhere - T: Any + Clone,

    Is the value held by this Dynamic a particular type?

    +

    pub fn is<T>(&self) -> boolwhere + T: Any + Clone,

    Is the value held by this Dynamic a particular type?

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    @@ -23,35 +25,35 @@
    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -

    pub fn type_name(&self) -> &'static str

    Get the name of the type of the value held by this Dynamic.

    +

    pub fn type_name(&self) -> &'static str

    Get the name of the type of the value held by this Dynamic.

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -
    §

    impl Dynamic

    pub const UNIT: Dynamic = Self(Union::Unit((), DEFAULT_TAG_VALUE, ReadWrite))

    A Dynamic containing a ().

    -

    pub const TRUE: Dynamic = Self::from_bool(true)

    A Dynamic containing a true.

    -

    pub const FALSE: Dynamic = Self::from_bool(false)

    A Dynamic containing a false.

    -

    pub const ZERO: Dynamic = Self::from_int(0)

    A Dynamic containing the integer zero.

    -

    pub const ONE: Dynamic = Self::from_int(1)

    A Dynamic containing the integer 1.

    -

    pub const TWO: Dynamic = Self::from_int(2)

    A Dynamic containing the integer 2.

    -

    pub const THREE: Dynamic = Self::from_int(3)

    A Dynamic containing the integer 3.

    -

    pub const TEN: Dynamic = Self::from_int(10)

    A Dynamic containing the integer 10.

    -

    pub const HUNDRED: Dynamic = Self::from_int(100)

    A Dynamic containing the integer 100.

    -

    pub const THOUSAND: Dynamic = Self::from_int(1000)

    A Dynamic containing the integer 1,000.

    -

    pub const MILLION: Dynamic = Self::from_int(1000000)

    A Dynamic containing the integer 1,000,000.

    -

    pub const NEGATIVE_ONE: Dynamic = Self::from_int(-1)

    A Dynamic containing the integer -1.

    -

    pub const NEGATIVE_TWO: Dynamic = Self::from_int(-2)

    A Dynamic containing the integer -2.

    -

    pub const fn from_bool(value: bool) -> Dynamic

    Create a new Dynamic from a bool.

    -

    pub const fn from_int(value: i32) -> Dynamic

    Create a new Dynamic from an INT.

    -

    pub const fn from_char(value: char) -> Dynamic

    Create a new Dynamic from a char.

    -

    pub fn from_array(array: Vec<Dynamic, Global>) -> Dynamic

    Create a Dynamic from an Array.

    -

    pub fn from_blob(blob: Vec<u8, Global>) -> Dynamic

    Create a Dynamic from a Blob.

    +
    §

    impl Dynamic

    pub const UNIT: Dynamic = _

    A Dynamic containing a ().

    +

    pub const TRUE: Dynamic = _

    A Dynamic containing a true.

    +

    pub const FALSE: Dynamic = _

    A Dynamic containing a false.

    +

    pub const ZERO: Dynamic = _

    A Dynamic containing the integer zero.

    +

    pub const ONE: Dynamic = _

    A Dynamic containing the integer 1.

    +

    pub const TWO: Dynamic = _

    A Dynamic containing the integer 2.

    +

    pub const THREE: Dynamic = _

    A Dynamic containing the integer 3.

    +

    pub const TEN: Dynamic = _

    A Dynamic containing the integer 10.

    +

    pub const HUNDRED: Dynamic = _

    A Dynamic containing the integer 100.

    +

    pub const THOUSAND: Dynamic = _

    A Dynamic containing the integer 1,000.

    +

    pub const MILLION: Dynamic = _

    A Dynamic containing the integer 1,000,000.

    +

    pub const NEGATIVE_ONE: Dynamic = _

    A Dynamic containing the integer -1.

    +

    pub const NEGATIVE_TWO: Dynamic = _

    A Dynamic containing the integer -2.

    +

    pub const fn from_bool(value: bool) -> Dynamic

    Create a new Dynamic from a bool.

    +

    pub const fn from_int(value: i32) -> Dynamic

    Create a new Dynamic from an INT.

    +

    pub const fn from_char(value: char) -> Dynamic

    Create a new Dynamic from a char.

    +

    pub fn from_array(array: Vec<Dynamic, Global>) -> Dynamic

    Create a Dynamic from an Array.

    +

    pub fn from_blob(blob: Vec<u8, Global>) -> Dynamic

    Create a Dynamic from a Blob.

    pub fn from_map( - map: BTreeMap<SmartString<LazyCompact>, Dynamic, Global> + map: BTreeMap<SmartString<LazyCompact>, Dynamic, Global> ) -> Dynamic

    Create a Dynamic from a Map.

    pub fn from_timestamp(value: Instant) -> Dynamic

    Create a new Dynamic from an Instant.

    Not available under no-std or no_time.

    pub fn into_read_only(self) -> Dynamic

    Make this Dynamic read-only (i.e. a constant).

    -

    pub fn is_read_only(&self) -> bool

    Is this Dynamic read-only?

    +

    pub fn is_read_only(&self) -> bool

    Is this Dynamic read-only?

    Constant Dynamic values are read-only.

    Usage

    If a &mut Dynamic to such a constant is passed to a Rust function, the function @@ -63,16 +65,16 @@

    Shared Values

    If a Dynamic holds a shared value, then it is read-only only if the shared value itself is read-only.

    pub fn from<T>(value: T) -> Dynamicwhere - T: Variant + Clone,

    Create a Dynamic from any type. A Dynamic value is simply returned as is.

    + T: Variant + Clone,

    Create a Dynamic from any type. A Dynamic value is simply returned as is.

    Arrays

    Beware that you need to pass in an Array type for it to be recognized as -an Array. A Vec<T> does not get automatically converted to an +an Array. A Vec<T> does not get automatically converted to an Array, but will be a custom type instead (stored as a trait object).

    -

    Use array.into() or array.into_iter() to convert a Vec<T> into a Dynamic as +

    Use array.into() or array.into_iter() to convert a Vec<T> into a Dynamic as an Array value. See the examples for details.

    Hash Maps
    -

    Similarly, passing in a HashMap<String, T> or -BTreeMap<String, T> will not get a Map but a +

    Similarly, passing in a HashMap<String, T> or +BTreeMap<String, T> will not get a Map but a custom type.

    Again, use map.into() to get a Dynamic with a Map value. See the examples for details.

    @@ -111,11 +113,11 @@
    Examples
    let result: Dynamic = map.into(); assert_eq!(result.type_name(), "map");

    pub fn take(&mut self) -> Dynamic

    Return this Dynamic, replacing it with Dynamic::UNIT.

    -

    pub fn try_cast<T>(self) -> Option<T>where - T: Any,

    Convert the Dynamic value into specific type.

    +

    pub fn try_cast<T>(self) -> Option<T>where + T: Any,

    Convert the Dynamic value into specific type.

    Casting to a Dynamic just returns as is, but if it contains a shared value, it is cloned into a Dynamic with a normal value.

    -

    Returns None if types mismatched.

    +

    Returns None if types mismatched.

    Panics or Deadlocks

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    @@ -127,7 +129,7 @@
    Example
    assert_eq!(x.try_cast::<u32>().expect("x should be u32"), 42);

    pub fn cast<T>(self) -> Twhere - T: Any + Clone,

    Convert the Dynamic value into a specific type.

    + T: Any + Clone,

    Convert the Dynamic value into a specific type.

    Casting to a Dynamic just returns as is, but if it contains a shared value, it is cloned into a Dynamic with a normal value.

    Panics or Deadlocks
    @@ -142,10 +144,10 @@
    Example
    assert_eq!(x.cast::<u32>(), 42);

    pub fn clone_cast<T>(&self) -> Twhere - T: Any + Clone,

    Clone the Dynamic value and convert it into a specific type.

    + T: Any + Clone,

    Clone the Dynamic value and convert it into a specific type.

    Casting to a Dynamic just returns as is, but if it contains a shared value, it is cloned into a Dynamic with a normal value.

    -

    Returns None if types mismatched.

    +

    Returns None if types mismatched.

    Panics or Deadlocks

    Panics if the cast fails (e.g. the type of the actual value is not the same as the specified type).

    @@ -166,103 +168,103 @@
    Example

    If the Dynamic is not a shared value, it returns itself.

    If the Dynamic is a shared value, it returns the shared value if there are no outstanding references, or a cloned copy.

    -

    pub fn read_lock<T>(&self) -> Option<DynamicReadLock<'_, T>>where - T: Any + Clone,

    Get a reference of a specific type to the Dynamic. +

    pub fn read_lock<T>(&self) -> Option<DynamicReadLock<'_, T>>where + T: Any + Clone,

    Get a reference of a specific type to the Dynamic. Casting to Dynamic just returns a reference to it.

    -

    Returns None if the cast fails.

    +

    Returns None if the cast fails.

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -

    pub fn write_lock<T>(&mut self) -> Option<DynamicWriteLock<'_, T>>where - T: Any + Clone,

    Get a mutable reference of a specific type to the Dynamic. +

    pub fn write_lock<T>(&mut self) -> Option<DynamicWriteLock<'_, T>>where + T: Any + Clone,

    Get a mutable reference of a specific type to the Dynamic. Casting to Dynamic just returns a mutable reference to it.

    -

    Returns None if the cast fails.

    +

    Returns None if the cast fails.

    Panics or Deadlocks When Value is Shared

    Under the sync feature, this call may deadlock, or panic. Otherwise, this call panics if the data is currently borrowed for write.

    -

    pub fn is_unit(&self) -> bool

    Return true if the Dynamic holds a ().

    -

    pub fn is_int(&self) -> bool

    Return true if the Dynamic holds the system integer type INT.

    -

    pub fn is_bool(&self) -> bool

    Return true if the Dynamic holds a bool.

    -

    pub fn is_char(&self) -> bool

    Return true if the Dynamic holds a char.

    -

    pub fn is_string(&self) -> bool

    Return true if the Dynamic holds an ImmutableString.

    -

    pub fn is_array(&self) -> bool

    Return true if the Dynamic holds an Array.

    +

    pub fn is_unit(&self) -> bool

    Return true if the Dynamic holds a ().

    +

    pub fn is_int(&self) -> bool

    Return true if the Dynamic holds the system integer type INT.

    +

    pub fn is_bool(&self) -> bool

    Return true if the Dynamic holds a bool.

    +

    pub fn is_char(&self) -> bool

    Return true if the Dynamic holds a char.

    +

    pub fn is_string(&self) -> bool

    Return true if the Dynamic holds an ImmutableString.

    +

    pub fn is_array(&self) -> bool

    Return true if the Dynamic holds an Array.

    Not available under no_index.

    -

    pub fn is_blob(&self) -> bool

    Return true if the Dynamic holds a Blob.

    +

    pub fn is_blob(&self) -> bool

    Return true if the Dynamic holds a Blob.

    Not available under no_index.

    -

    pub fn is_map(&self) -> bool

    Return true if the Dynamic holds a Map.

    +

    pub fn is_map(&self) -> bool

    Return true if the Dynamic holds a Map.

    Not available under no_object.

    -

    pub fn is_timestamp(&self) -> bool

    Return true if the Dynamic holds a timestamp.

    +

    pub fn is_timestamp(&self) -> bool

    Return true if the Dynamic holds a timestamp.

    Not available under no_time.

    -

    pub fn as_unit(&self) -> Result<(), &'static str>

    Cast the Dynamic as a unit (). +

    pub fn as_unit(&self) -> Result<(), &'static str>

    Cast the Dynamic as a unit (). Returns the name of the actual type if the cast fails.

    -

    pub fn as_int(&self) -> Result<i32, &'static str>

    Cast the Dynamic as the system integer type INT. +

    pub fn as_int(&self) -> Result<i32, &'static str>

    Cast the Dynamic as the system integer type INT. Returns the name of the actual type if the cast fails.

    -

    pub fn as_bool(&self) -> Result<bool, &'static str>

    Cast the Dynamic as a bool. +

    pub fn as_bool(&self) -> Result<bool, &'static str>

    Cast the Dynamic as a bool. Returns the name of the actual type if the cast fails.

    -

    pub fn as_char(&self) -> Result<char, &'static str>

    Cast the Dynamic as a char. +

    pub fn as_char(&self) -> Result<char, &'static str>

    Cast the Dynamic as a char. Returns the name of the actual type if the cast fails.

    -

    pub fn into_string(self) -> Result<String, &'static str>

    Convert the Dynamic into a String. +

    pub fn into_string(self) -> Result<String, &'static str>

    Convert the Dynamic into a String. If there are other references to the same string, a cloned copy is returned. Returns the name of the actual type if the cast fails.

    -

    pub fn into_immutable_string(self) -> Result<ImmutableString, &'static str>

    Convert the Dynamic into an ImmutableString. +

    pub fn into_immutable_string(self) -> Result<ImmutableString, &'static str>

    Convert the Dynamic into an ImmutableString. Returns the name of the actual type if the cast fails.

    -

    pub fn into_array(self) -> Result<Vec<Dynamic, Global>, &'static str>

    Convert the Dynamic into an Array. +

    pub fn into_array(self) -> Result<Vec<Dynamic, Global>, &'static str>

    Convert the Dynamic into an Array. Returns the name of the actual type if the cast fails.

    Not available under no_index.

    -

    pub fn into_typed_array<T>(self) -> Result<Vec<T, Global>, &'static str>where - T: Variant + Clone,

    Convert the Dynamic into a Vec. +

    pub fn into_typed_array<T>(self) -> Result<Vec<T, Global>, &'static str>where + T: Variant + Clone,

    Convert the Dynamic into a Vec. Returns the name of the actual type if any cast fails.

    Not available under no_index.

    -

    pub fn into_blob(self) -> Result<Vec<u8, Global>, &'static str>

    Convert the Dynamic into a Blob. +

    pub fn into_blob(self) -> Result<Vec<u8, Global>, &'static str>

    Convert the Dynamic into a Blob. Returns the name of the actual type if the cast fails.

    Not available under no_index.

    -

    pub fn deep_scan(&mut self, filter: impl FnMut(&mut Dynamic))

    Recursively scan for Dynamic values within this Dynamic (e.g. items in an array or map), +

    pub fn deep_scan(&mut self, filter: impl FnMut(&mut Dynamic))

    Recursively scan for Dynamic values within this Dynamic (e.g. items in an array or map), calling a filter function on each.

    Shared values are NOT scanned.

    -

    Trait Implementations§

    §

    impl Clone for Dynamic

    §

    fn clone(&self) -> Dynamic

    Clone the Dynamic value.

    +

    Trait Implementations§

    §

    impl Clone for Dynamic

    §

    fn clone(&self) -> Dynamic

    Clone the Dynamic value.

    WARNING

    The cloned copy is marked read-write even if the original is read-only.

    -
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Dynamic

    §

    fn default() -> Dynamic

    Returns the “default value” for a type. Read more
    §

    impl<'de> Deserialize<'de> for Dynamic

    §

    fn deserialize<D>( +

    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Dynamic

    §

    fn default() -> Dynamic

    Returns the “default value” for a type. Read more
    §

    impl<'de> Deserialize<'de> for Dynamic

    §

    fn deserialize<D>( deserializer: D -) -> Result<Dynamic, <D as Deserializer<'de>>::Error>where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Extend<Dynamic> for FnPtr

    §

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = Dynamic>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<T> From<&[T]> for Dynamicwhere - T: Variant + Clone,

    §

    fn from(value: &[T]) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<()> for Dynamic

    §

    fn from(value: ()) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<BTreeMap<K, T, Global>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>, - T: Variant + Clone,

    §

    fn from(value: BTreeMap<K, T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<BTreeSet<K, Global>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: BTreeSet<K, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<FnPtr> for Dynamic

    §

    fn from(value: FnPtr) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<HashMap<K, T, RandomState>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>, - T: Variant + Clone,

    §

    fn from(value: HashMap<K, T, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<HashSet<K, RandomState>> for Dynamicwhere - K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: HashSet<K, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Instant> for Dynamic

    §

    fn from(value: Instant) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Range<i32>> for Dynamic

    §

    fn from(value: Range<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<RangeInclusive<i32>> for Dynamic

    §

    fn from(value: RangeInclusive<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<S> From<S> for Dynamicwhere - S: Into<ImmutableString>,

    §

    fn from(value: S) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> From<Vec<T, Global>> for Dynamicwhere - T: Variant + Clone,

    §

    fn from(value: Vec<T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<bool> for Dynamic

    §

    fn from(value: bool) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<char> for Dynamic

    §

    fn from(value: char) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<i32> for Dynamic

    §

    fn from(value: i32) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> FromIterator<T> for Dynamicwhere - T: Variant + Clone,

    §

    fn from_iter<X>(iter: X) -> Dynamicwhere - X: IntoIterator<Item = T>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for Dynamic

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str(value: &str) -> Result<Dynamic, <Dynamic as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for Dynamic

    §

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Hash the Dynamic value.

    +) -> Result<Dynamic, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,
    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Dynamic

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Extend<Dynamic> for FnPtr

    §

    fn extend<T>(&mut self, iter: T)where + T: IntoIterator<Item = Dynamic>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<T> From<&[T]> for Dynamicwhere + T: Variant + Clone,

    §

    fn from(value: &[T]) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<()> for Dynamic

    §

    fn from(value: ()) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<BTreeMap<K, T, Global>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>, + T: Variant + Clone,

    §

    fn from(value: BTreeMap<K, T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<BTreeSet<K, Global>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: BTreeSet<K, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<FnPtr> for Dynamic

    §

    fn from(value: FnPtr) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K, T> From<HashMap<K, T, RandomState>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>, + T: Variant + Clone,

    §

    fn from(value: HashMap<K, T, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<K> From<HashSet<K, RandomState>> for Dynamicwhere + K: Into<SmartString<LazyCompact>>,

    §

    fn from(value: HashSet<K, RandomState>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Instant> for Dynamic

    §

    fn from(value: Instant) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<Range<i32>> for Dynamic

    §

    fn from(value: Range<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<RangeInclusive<i32>> for Dynamic

    §

    fn from(value: RangeInclusive<i32>) -> Dynamic

    Converts to this type from the input type.
    §

    impl<S> From<S> for Dynamicwhere + S: Into<ImmutableString>,

    §

    fn from(value: S) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> From<Vec<T, Global>> for Dynamicwhere + T: Variant + Clone,

    §

    fn from(value: Vec<T, Global>) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<bool> for Dynamic

    §

    fn from(value: bool) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<char> for Dynamic

    §

    fn from(value: char) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<i32> for Dynamic

    §

    fn from(value: i32) -> Dynamic

    Converts to this type from the input type.
    §

    impl<T> FromIterator<T> for Dynamicwhere + T: Variant + Clone,

    §

    fn from_iter<X>(iter: X) -> Dynamicwhere + X: IntoIterator<Item = T>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for Dynamic

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str(value: &str) -> Result<Dynamic, <Dynamic as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for Dynamic

    §

    fn hash<H>(&self, state: &mut H)where + H: Hasher,

    Hash the Dynamic value.

    Panics

    Panics if the Dynamic value contains an unrecognized trait object.

    -
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl<'de> IntoDeserializer<'de, Box<EvalAltResult, Global>> for &'de Dynamic

    §

    type Deserializer = DynamicDeserializer<'de>

    The type of the deserializer being converted into.
    §

    fn into_deserializer( +

    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl<'de> IntoDeserializer<'de, Box<EvalAltResult, Global>> for &'de Dynamic

    §

    type Deserializer = DynamicDeserializer<'de>

    The type of the deserializer being converted into.
    §

    fn into_deserializer( self -) -> <&'de Dynamic as IntoDeserializer<'de, Box<EvalAltResult, Global>>>::Deserializer

    Convert this value into a deserializer.
    §

    impl Serialize for Dynamic

    §

    fn serialize<S>( +) -> <&'de Dynamic as IntoDeserializer<'de, Box<EvalAltResult, Global>>>::Deserializer

    Convert this value into a deserializer.
    §

    impl Serialize for Dynamic

    §

    fn serialize<S>( &self, ser: S -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,
    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

    \ No newline at end of file diff --git a/casbin/rhai/struct.Engine.html b/casbin/rhai/struct.Engine.html index b4b46a0f..c19cdd0d 100644 --- a/casbin/rhai/struct.Engine.html +++ b/casbin/rhai/struct.Engine.html @@ -1,8 +1,8 @@ -Engine in casbin::rhai - Rust

    Struct casbin::rhai::Engine

    pub struct Engine { /* private fields */ }
    Expand description

    Rhai main scripting engine.

    +Engine in casbin::rhai - Rust

    Struct casbin::rhai::Engine

    pub struct Engine { /* private fields */ }
    Expand description

    Rhai main scripting engine.

    Thread Safety

    Engine is re-entrant.

    -

    Currently, Engine is neither Send nor Sync. -Use the sync feature to make it Send + Sync.

    +

    Currently, Engine is neither Send nor Sync. +Use the sync feature to make it Send + Sync.

    Example

    use rhai::Engine;
     
    @@ -11,8 +11,8 @@ 

    Example

    let result = engine.eval::<i64>("40 + 2")?; println!("Answer: {result}"); // prints 42
    -

    Implementations§

    §

    impl Engine

    pub fn eval<T>(&self, script: &str) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string as a script, returning the result value or an error.

    +

    Implementations§

    §

    impl Engine

    pub fn eval<T>(&self, script: &str) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string as a script, returning the result value or an error.

    Example
    use rhai::Engine;
     
    @@ -21,10 +21,10 @@ 
    Example
    assert_eq!(engine.eval::<i64>("40 + 2")?, 42);

    pub fn eval_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string as a script with own scope, returning the result value or an error.

    + scope: &mut Scope<'_>, + script: &str +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string as a script with own scope, returning the result value or an error.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within the scope are propagated throughout the script including functions.

    @@ -45,9 +45,9 @@
    Example
    assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 44);

    pub fn eval_expression<T>( &self, - script: &str -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string containing an expression, returning the result value or an error.

    + script: &str +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string containing an expression, returning the result value or an error.

    Example
    use rhai::Engine;
     
    @@ -56,10 +56,10 @@ 
    Example
    assert_eq!(engine.eval_expression::<i64>("40 + 2")?, 42);

    pub fn eval_expression_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a string containing an expression with own scope, returning the result value or an error.

    + scope: &mut Scope<'_>, + script: &str +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a string containing an expression with own scope, returning the result value or an error.

    Example
    use rhai::{Engine, Scope};
     
    @@ -70,8 +70,8 @@ 
    Example
    scope.push("x", 40_i64); assert_eq!(engine.eval_expression_with_scope::<i64>(&mut scope, "x + 2")?, 42);
    -

    pub fn eval_ast<T>(&self, ast: &AST) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate an AST, returning the result value or an error.

    +

    pub fn eval_ast<T>(&self, ast: &AST) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate an AST, returning the result value or an error.

    Example
    use rhai::Engine;
     
    @@ -84,10 +84,10 @@ 
    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);

    pub fn eval_ast_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, + scope: &mut Scope<'_>, ast: &AST -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate an AST with own scope, returning the result value or an error.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate an AST with own scope, returning the result value or an error.

    Example
    use rhai::{Engine, Scope};
     
    @@ -106,7 +106,7 @@ 
    Example
    // The variable in the scope is modified assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 44);
    -
    §

    impl Engine

    pub fn run(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script.

    +
    §

    impl Engine

    pub fn run(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script.

    Example
    use rhai::Engine;
     
    @@ -115,9 +115,9 @@ 
    Example
    engine.run("print(40 + 2);")?;

    pub fn run_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script with own scope.

    + scope: &mut Scope<'_>, + script: &str +) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a string as a script with own scope.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within the scope are propagated throughout the script including functions.

    @@ -135,7 +135,7 @@
    Example
    // The variable in the scope is modified assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 42);
    -

    pub fn run_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST.

    +

    pub fn run_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST.

    Example
    use rhai::Engine;
     
    @@ -148,9 +148,9 @@ 
    Example
    engine.run_ast(&ast)?;

    pub fn run_ast_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, + scope: &mut Scope<'_>, ast: &AST -) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST with own scope.

    +) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate an AST with own scope.

    Example
    use rhai::{Engine, Scope};
     
    @@ -168,7 +168,7 @@ 
    Example
    // The variable in the scope is modified assert_eq!(scope.get_value::<i64>("x").expect("variable x should exist"), 42);
    -
    §

    impl Engine

    pub fn compile(&self, script: impl AsRef<str>) -> Result<AST, ParseError>

    Compile a string into an AST, which can be used later for evaluation.

    +
    §

    impl Engine

    pub fn compile(&self, script: impl AsRef<str>) -> Result<AST, ParseError>

    Compile a string into an AST, which can be used later for evaluation.

    Example
    use rhai::Engine;
     
    @@ -182,9 +182,9 @@ 
    Example
    }

    pub fn compile_with_scope( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: impl AsRef<str> -) -> Result<AST, ParseError>

    Compile a string into an AST using own scope, which can be used later for evaluation.

    + scope: &Scope<'_>, + script: impl AsRef<str> +) -> Result<AST, ParseError>

    Compile a string into an AST using own scope, which can be used later for evaluation.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within the scope are propagated throughout the script including functions. This allows functions @@ -211,10 +211,10 @@

    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);

    pub fn compile_scripts_with_scope<S>( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - scripts: impl AsRef<[S]> -) -> Result<AST, ParseError>where - S: AsRef<str>,

    When passed a list of strings, first join the strings into one large script, and then + scope: &Scope<'_>, + scripts: impl AsRef<[S]> +) -> Result<AST, ParseError>where + S: AsRef<str>,

    When passed a list of strings, first join the strings into one large script, and then compile them into an AST using own scope, which can be used later for evaluation.

    The scope is useful for passing constants into the script for optimization when using [OptimizationLevel::Full][crate::OptimizationLevel::Full].

    @@ -249,8 +249,8 @@
    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);

    pub fn compile_expression( &self, - script: impl AsRef<str> -) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST, + script: impl AsRef<str> +) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST, which can be used later for evaluation.

    Example
    use rhai::Engine;
    @@ -265,9 +265,9 @@ 
    Example
    }

    pub fn compile_expression_with_scope( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: impl AsRef<str> -) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST using own scope, + scope: &Scope<'_>, + script: impl AsRef<str> +) -> Result<AST, ParseError>

    Compile a string containing an expression into an AST using own scope, which can be used later for evaluation.

    Example
    use rhai::{Engine, Scope, OptimizationLevel};
    @@ -291,9 +291,9 @@ 
    Example
    assert_eq!(engine.eval_ast::<i64>(&ast)?, 42);
    §

    impl Engine

    pub fn parse_json( &self, - json: impl AsRef<str>, - has_null: bool -) -> Result<BTreeMap<SmartString<LazyCompact>, Dynamic, Global>, Box<EvalAltResult, Global>>

    Parse a JSON string into an object map.

    + json: impl AsRef<str>, + has_null: bool +) -> Result<BTreeMap<SmartString<LazyCompact>, Dynamic, Global>, Box<EvalAltResult, Global>>

    Parse a JSON string into an object map.

    This is a light-weight alternative to using, say, serde_json to deserialize the JSON.

    Not available under no_object.

    @@ -331,8 +331,8 @@
    Example
    assert_eq!(c["z"].as_char().expect("z should be char"), '$');
    §

    impl Engine

    pub fn compile_file( &self, - path: PathBuf -) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST, which can be used later for evaluation.

    + path: PathBuf +) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST, which can be used later for evaluation.

    Not available under no_std or WASM.

    Example
    use rhai::Engine;
    @@ -348,9 +348,9 @@ 
    Example
    }

    pub fn compile_file_with_scope( &self, - scope: &Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST using own scope, which can be used later for evaluation.

    + scope: &Scope<'_>, + path: PathBuf +) -> Result<AST, Box<EvalAltResult, Global>>

    Compile a script file into an AST using own scope, which can be used later for evaluation.

    Not available under no_std or WASM.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within @@ -372,9 +372,9 @@

    Example
    let result = engine.eval_ast::<i64>(&ast)?;

    pub fn eval_file<T>( &self, - path: PathBuf -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a script file, returning the result value or an error.

    + path: PathBuf +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a script file, returning the result value or an error.

    Not available under no_std or WASM.

    Example
    use rhai::Engine;
    @@ -385,10 +385,10 @@ 
    Example
    let result = engine.eval_file::<i64>("script.rhai".into())?;

    pub fn eval_file_with_scope<T>( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Evaluate a script file with own scope, returning the result value or an error.

    + scope: &mut Scope<'_>, + path: PathBuf +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Evaluate a script file with own scope, returning the result value or an error.

    Not available under no_std or WASM.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within @@ -405,7 +405,7 @@

    Example
    // Notice that a PathBuf is required which can easily be constructed from a string. let result = engine.eval_file_with_scope::<i64>(&mut scope, "script.rhai".into())?;
    -

    pub fn run_file(&self, path: PathBuf) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file.

    +

    pub fn run_file(&self, path: PathBuf) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file.

    Not available under no_std or WASM.

    Example
    use rhai::Engine;
    @@ -416,9 +416,9 @@ 
    Example
    engine.run_file("script.rhai".into())?;

    pub fn run_file_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file with own scope.

    + scope: &mut Scope<'_>, + path: PathBuf +) -> Result<(), Box<EvalAltResult, Global>>

    Evaluate a file with own scope.

    Not available under no_std or WASM.

    Constants Propagation

    If not [OptimizationLevel::None][crate::OptimizationLevel::None], constants defined within @@ -435,14 +435,14 @@

    Example
    // Notice that a PathBuf is required which can easily be constructed from a string. engine.run_file_with_scope(&mut scope, "script.rhai".into())?;
    -
    §

    impl Engine

    pub fn register_fn<A, const N: usize, const C: bool, R, const L: bool, F>( +

    §

    impl Engine

    pub fn register_fn<A, const N: usize, const C: bool, R, const L: bool, F>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, func: F ) -> &mut Enginewhere A: 'static, - R: Variant + Clone, - F: RegisterNativeFunction<A, N, C, R, L>,

    Register a custom function with the Engine.

    + R: Variant + Clone, + F: RegisterNativeFunction<A, N, C, R, L> + SendSync + 'static,

    Register a custom function with the Engine.

    Example
    use rhai::Engine;
     
    @@ -463,11 +463,11 @@ 
    Example
    assert_eq!(engine.eval::<i64>("sub(44, 2)")?, 42);

    pub fn register_raw_fn<T>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - arg_types: impl AsRef<[TypeId]>, - func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + arg_types: impl AsRef<[TypeId]>, + func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone,

    Register a function of the Engine.

    + T: Variant + Clone,

    Register a function of the Engine.

    WARNING - Low Level API

    This function is very low level. It takes a list of TypeId’s indicating the actual types of the parameters.

    @@ -479,8 +479,8 @@
    Arguments
    Notice that this will consume the argument, replacing it with ().

    To access the first mutable parameter, use args.get_mut(0).unwrap()

    pub fn register_type<T>(&mut self) -> &mut Enginewhere - T: Variant + Clone,

    Register a custom type for use with the Engine. -The type must implement Clone.

    + T: Variant + Clone,

    Register a custom type for use with the Engine. +The type must implement Clone.

    Example
    #[derive(Debug, Clone, Eq, PartialEq)]
     struct TestStruct {
    @@ -511,9 +511,9 @@ 
    Example
    engine.eval::<TestStruct>("let x = new_ts(); x.update(41); x")?, TestStruct { field: 42 } );
    -

    pub fn register_type_with_name<T>(&mut self, name: &str) -> &mut Enginewhere - T: Variant + Clone,

    Register a custom type for use with the Engine, with a pretty-print name -for the type_of function. The type must implement Clone.

    +

    pub fn register_type_with_name<T>(&mut self, name: &str) -> &mut Enginewhere + T: Variant + Clone,

    Register a custom type for use with the Engine, with a pretty-print name +for the type_of function. The type must implement Clone.

    Example
    #[derive(Clone)]
     struct TestStruct {
    @@ -549,27 +549,27 @@ 
    Example
    );

    pub fn register_type_with_name_raw( &mut self, - type_path: impl Into<SmartString<LazyCompact>>, - name: impl Into<SmartString<LazyCompact>> + type_path: impl Into<SmartString<LazyCompact>>, + name: impl Into<SmartString<LazyCompact>> ) -> &mut Engine

    Register a custom type for use with the Engine, with a pretty-print name -for the type_of function. The type must implement Clone.

    +for the type_of function. The type must implement Clone.

    WARNING - Low Level API

    This function is low level.

    pub fn register_iterator<T>(&mut self) -> &mut Enginewhere - T: Variant + Clone + IntoIterator, - <T as IntoIterator>::Item: Variant + Clone,

    Register a type iterator for an iterable type with the Engine. + T: Variant + Clone + IntoIterator, + <T as IntoIterator>::Item: Variant + Clone,

    Register a type iterator for an iterable type with the Engine. This is an advanced API.

    pub fn register_iterator_result<T, X>(&mut self) -> &mut Enginewhere - T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, - X: Variant + Clone,

    Register a fallible type iterator for an iterable type with the Engine. + T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, + X: Variant + Clone,

    Register a fallible type iterator for an iterable type with the Engine. This is an advanced API.

    -

    pub fn register_get<T, const C: bool, V, const L: bool>( +

    pub fn register_get<T, const C: bool, V, const L: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C, V, L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    Register a getter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,

    Register a getter function for a member of a registered type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under no_object.

    Example
    @@ -600,13 +600,13 @@
    Example
    .register_get("xyz", TestStruct::get_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a.xyz")?, 1);
    -

    pub fn register_set<T, const C: bool, V, const L: bool>( +

    pub fn register_set<T, const C: bool, V, const L: bool>( &mut self, - name: impl AsRef<str>, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), L> + SendSync + 'static + name: impl AsRef<str>, + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    Register a setter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,

    Register a setter function for a member of a registered type with the Engine.

    Not available under no_object.

    Example
    #[derive(Debug, Clone, Eq, PartialEq)]
    @@ -639,14 +639,14 @@ 
    Example
    engine.eval::<TestStruct>("let a = new_ts(); a.xyz = 42; a")?, TestStruct { field: 42 } );
    -

    pub fn register_get_set<T, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( +

    pub fn register_get_set<T, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C1, V, L1> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C2, (), L2> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C2, (), L2> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    Short-hand for registering both getter and setter functions + T: Variant + Clone, + V: Variant + Clone,

    Short-hand for registering both getter and setter functions of a registered type with the Engine.

    All function signatures must start with &mut self and not &self.

    Not available under no_object.

    @@ -682,17 +682,17 @@
    Example
    .register_get_set("xyz", TestStruct::get_field, TestStruct::set_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a.xyz = 42; a.xyz")?, 42);
    -

    pub fn register_indexer_get<T, X, const C: bool, V, const L: bool>( +

    pub fn register_indexer_get<T, X, const C: bool, V, const L: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C, V, L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    Register an index getter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,

    Register an index getter for a custom type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under both no_index and no_object.

    Panics
    -

    Panics if the type is Array, Map, String, +

    Panics if the type is Array, Map, String, ImmutableString, &str or INT. Indexers for arrays, object maps, strings and integers cannot be registered.

    Example
    @@ -724,16 +724,16 @@
    Example
    .register_indexer_get(TestStruct::get_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a[2]")?, 3);
    -

    pub fn register_indexer_set<T, X, const C: bool, V, const L: bool>( +

    pub fn register_indexer_set<T, X, const C: bool, V, const L: bool>( &mut self, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), L> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), L> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    Register an index setter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,

    Register an index setter for a custom type with the Engine.

    Not available under both no_index and no_object.

    Panics
    -

    Panics if the type is Array, Map, String, +

    Panics if the type is Array, Map, String, ImmutableString, &str or INT. Indexers for arrays, object maps, strings and integers cannot be registered.

    Example
    @@ -766,17 +766,17 @@
    Example
    let result = engine.eval::<TestStruct>("let a = new_ts(); a[2] = 42; a")?; assert_eq!(result.fields[2], 42);
    -

    pub fn register_indexer_get_set<T, X, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( +

    pub fn register_indexer_get_set<T, X, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C1, V, L1> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C2, (), L2> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C2, (), L2> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    Short-hand for registering both index getter and setter functions for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,

    Short-hand for registering both index getter and setter functions for a custom type with the Engine.

    Not available under both no_index and no_object.

    Panics
    -

    Panics if the type is Array, Map, String, +

    Panics if the type is Array, Map, String, ImmutableString, &str or INT. Indexers for arrays, object maps, strings and integers cannot be registered.

    Example
    @@ -811,60 +811,47 @@
    Example
    .register_indexer_get_set(TestStruct::get_field, TestStruct::set_field); assert_eq!(engine.eval::<i64>("let a = new_ts(); a[2] = 42; a[2]")?, 42);
    -

    pub fn register_global_module(&mut self, module: Arc<Module>) -> &mut Engine

    Register a shared Module into the global namespace of Engine.

    +

    pub fn register_global_module( + &mut self, + module: Arc<Module, Global> +) -> &mut Engine

    Register a shared Module into the global namespace of Engine.

    All functions and type iterators are automatically available to scripts without namespace qualifications.

    Sub-modules and variables are ignored.

    When searching for functions, modules loaded later are preferred. In other words, loaded modules are searched in reverse order.

    -
    §

    impl Engine

    pub const fn allow_if_expression(&self) -> bool

    Is if-expression allowed? +

    §

    impl Engine

    pub const fn allow_if_expression(&self) -> bool

    Is if-expression allowed? Default is true.

    -

    pub fn set_allow_if_expression(&mut self, enable: bool) -> &mut Engine

    Set whether if-expression is allowed.

    -

    pub const fn allow_switch_expression(&self) -> bool

    Is switch expression allowed? +

    pub fn set_allow_if_expression(&mut self, enable: bool) -> &mut Engine

    Set whether if-expression is allowed.

    +

    pub const fn allow_switch_expression(&self) -> bool

    Is switch expression allowed? Default is true.

    -

    pub fn set_allow_switch_expression(&mut self, enable: bool) -> &mut Engine

    Set whether switch expression is allowed.

    -

    pub const fn allow_loop_expressions(&self) -> bool

    Are loop expressions allowed? +

    pub fn set_allow_switch_expression(&mut self, enable: bool) -> &mut Engine

    Set whether switch expression is allowed.

    +

    pub const fn allow_loop_expressions(&self) -> bool

    Are loop expressions allowed? Default is true.

    -

    pub fn set_allow_loop_expressions(&mut self, enable: bool) -> &mut Engine

    Set whether loop expressions are allowed.

    -

    pub const fn allow_statement_expression(&self) -> bool

    Is statement-expression allowed? +

    pub fn set_allow_loop_expressions(&mut self, enable: bool) -> &mut Engine

    Set whether loop expressions are allowed.

    +

    pub const fn allow_statement_expression(&self) -> bool

    Is statement-expression allowed? Default is true.

    -

    pub fn set_allow_statement_expression(&mut self, enable: bool) -> &mut Engine

    Set whether statement-expression is allowed.

    -

    pub const fn allow_looping(&self) -> bool

    Is looping allowed? +

    pub fn set_allow_statement_expression(&mut self, enable: bool) -> &mut Engine

    Set whether statement-expression is allowed.

    +

    pub const fn allow_looping(&self) -> bool

    Is looping allowed? Default is true.

    -

    pub fn set_allow_looping(&mut self, enable: bool) -> &mut Engine

    Set whether looping is allowed.

    -

    pub const fn allow_shadowing(&self) -> bool

    Is variables shadowing allowed? +

    pub fn set_allow_looping(&mut self, enable: bool) -> &mut Engine

    Set whether looping is allowed.

    +

    pub const fn allow_shadowing(&self) -> bool

    Is variables shadowing allowed? Default is true.

    -

    pub fn set_allow_shadowing(&mut self, enable: bool) -> &mut Engine

    Set whether variables shadowing is allowed.

    -

    pub const fn strict_variables(&self) -> bool

    Is strict variables mode enabled? +

    pub fn set_allow_shadowing(&mut self, enable: bool) -> &mut Engine

    Set whether variables shadowing is allowed.

    +

    pub const fn strict_variables(&self) -> bool

    Is strict variables mode enabled? Default is false.

    -

    pub fn set_strict_variables(&mut self, enable: bool) -> &mut Engine

    Set whether strict variables mode is enabled.

    -

    pub const fn fail_on_invalid_map_property(&self) -> bool

    Raise error if an object map property does not exist? +

    pub fn set_strict_variables(&mut self, enable: bool) -> &mut Engine

    Set whether strict variables mode is enabled.

    +

    pub const fn fail_on_invalid_map_property(&self) -> bool

    Raise error if an object map property does not exist? Default is false.

    Not available under no_object.

    -

    pub fn set_fail_on_invalid_map_property(&mut self, enable: bool) -> &mut Engine

    Set whether to raise error if an object map property does not exist.

    +

    pub fn set_fail_on_invalid_map_property(&mut self, enable: bool) -> &mut Engine

    Set whether to raise error if an object map property does not exist.

    Not available under no_object.

    -

    pub const fn fast_operators(&self) -> bool

    Is fast operators mode enabled? +

    pub const fn fast_operators(&self) -> bool

    Is fast operators mode enabled? Default is false.

    -

    pub fn set_fast_operators(&mut self, enable: bool) -> &mut Engine

    Set whether fast operators mode is enabled.

    -
    §

    impl Engine

    pub const fn max_call_levels(&self) -> usize

    The maximum levels of function calls allowed for a script.

    -

    Always returns usize::MAX.

    -

    pub const fn max_operations(&self) -> u64

    The maximum number of operations allowed for a script to run (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_modules(&self) -> usize

    The maximum number of imported modules allowed for a script.

    -

    Always returns usize::MAX.

    -

    pub const fn max_expr_depth(&self) -> usize

    The depth limit for expressions (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_function_expr_depth(&self) -> usize

    The depth limit for expressions in functions (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_string_size(&self) -> usize

    The maximum length of strings (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_array_size(&self) -> usize

    The maximum length of arrays (0 for unlimited).

    -

    Always returns zero.

    -

    pub const fn max_map_size(&self) -> usize

    The maximum size of object maps (0 for unlimited).

    -

    Always returns zero.

    -
    §

    impl Engine

    pub fn on_var( +

    pub fn set_fast_operators(&mut self, enable: bool) -> &mut Engine

    Set whether fast operators mode is enabled.

    +
    §

    impl Engine

    pub fn on_var( &mut self, - callback: impl Fn(&str, usize, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<Option<Dynamic>, Box<EvalAltResult, Global>> + SendSync + 'static + callback: impl Fn(&str, usize, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<Option<Dynamic>, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Provide a callback that will be invoked before each variable access.

    WARNING - Unstable API

    This API is volatile and may change in the future.

    @@ -904,7 +891,7 @@
    Example

    pub fn on_def_var( &mut self, - callback: impl Fn(bool, VarDefInfo<'_>, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<bool, Box<EvalAltResult, Global>> + SendSync + 'static + callback: impl Fn(bool, VarDefInfo<'_>, EvalContext<'_, '_, '_, '_, '_, '_>) -> Result<bool, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Provide a callback that will be invoked before the definition of each variable .

    WARNING - Unstable API

    This API is volatile and may change in the future.

    @@ -931,7 +918,7 @@
    Example
    // Register a variable definition filter. engine.on_def_var(|_, info, _| { // Disallow defining MYSTIC_NUMBER as a constant - if info.name == "MYSTIC_NUMBER" && info.is_const { + if info.name() == "MYSTIC_NUMBER" && info.is_const() { Ok(false) } else { Ok(true) @@ -946,8 +933,8 @@
    Example

    pub fn on_print( &mut self, - callback: impl Fn(&str) + SendSync + 'static -) -> &mut Engine

    Override default action of print (print to stdout using println!)

    + callback: impl Fn(&str) + SendSync + 'static +) -> &mut Engine

    Override default action of print (print to stdout using println!)

    Example
    use rhai::Engine;
     
    @@ -964,8 +951,8 @@ 
    Example
    assert_eq!(*result.read().unwrap(), "42");

    pub fn on_debug( &mut self, - callback: impl Fn(&str, Option<&str>, Position) + SendSync + 'static -) -> &mut Engine

    Override default action of debug (print to stdout using println!)

    + callback: impl Fn(&str, Option<&str>, Position) + SendSync + 'static +) -> &mut Engine

    Override default action of debug (print to stdout using println!)

    Callback Function Signature

    The callback function signature passed takes the following form:

    Fn(text: &str, source: Option<&str>, pos: Position)

    @@ -996,26 +983,26 @@
    Example
    assert_eq!(*result.read().unwrap(), r#"world @ 1:18 > "hello""#); #[cfg(feature = "no_position")] assert_eq!(*result.read().unwrap(), r#"world @ none > "hello""#);
    -
    §

    impl Engine

    pub fn map_type_name<'a>(&'a self, name: &'a str) -> &'a str

    Pretty-print a type name.

    +
    §

    impl Engine

    pub fn map_type_name<'a>(&'a self, name: &'a str) -> &'a str

    Pretty-print a type name.

    If a type is registered via register_type_with_name, the type name provided for the registration will be used.

    Panics

    Panics if the type name is &mut.

    pub fn compact_script( &self, - script: impl AsRef<str> -) -> Result<String, ParseError>

    Compact a script to eliminate insignificant whitespaces and comments.

    + script: impl AsRef<str> +) -> Result<String, ParseError>

    Compact a script to eliminate insignificant whitespaces and comments.

    This is useful to prepare a script for further compressing.

    The output script is semantically identical to the input script, except smaller in size.

    Unlike other uglifiers and minifiers, this method does not rename variables nor perform any optimization on the input script.

    -
    §

    impl Engine

    §

    impl Engine

    pub fn register_custom_syntax<S>( &mut self, - symbols: impl AsRef<[S]>, - scope_may_be_changed: bool, - func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static -) -> Result<&mut Engine, ParseError>where - S: AsRef<str> + Into<SmartString<LazyCompact>>,

    Register a custom syntax with the Engine.

    + symbols: impl AsRef<[S]>, + scope_may_be_changed: bool, + func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static +) -> Result<&mut Engine, ParseError>where + S: AsRef<str> + Into<SmartString<LazyCompact>>,

    Register a custom syntax with the Engine.

    Not available under no_custom_syntax.

    pub fn register_custom_syntax_with_state_raw( &mut self, - key: impl Into<SmartString<LazyCompact>>, - parse: impl Fn(&[ImmutableString], &str, &mut Dynamic) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, - scope_may_be_changed: bool, - func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>], &Dynamic) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static + key: impl Into<SmartString<LazyCompact>>, + parse: impl Fn(&[ImmutableString], &str, &mut Dynamic) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, + scope_may_be_changed: bool, + func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>], &Dynamic) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    Register a custom syntax with the Engine with custom user-defined state.

    Not available under no_custom_syntax.

    WARNING - Low Level API
    @@ -1071,127 +1058,138 @@
    Return value
  • Ok(Some(symbol)): the next symbol to match, which can also be $expr$, $ident$ or $block$.
  • Err(ParseError): error that is reflected back to the Engine, normally ParseError(ParseErrorType::BadInput(LexError::ImproperSymbol(message)), Position::NONE) to indicate a syntax error, but it can be any ParseError.
  • -
    §

    impl Engine

    pub fn build_type<T>(&mut self) -> &mut Enginewhere +

    §

    impl Engine

    pub fn build_type<T>(&mut self) -> &mut Enginewhere T: CustomType,

    Build the API of a custom type for use with the Engine.

    The custom type must implement CustomType.

    -
    §

    impl Engine

    pub fn consume_file( +

    §

    impl Engine

    pub fn consume_file( &self, - path: PathBuf -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file instead

    Evaluate a file, but throw away the result and only return error (if any). + path: PathBuf +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file instead

    Evaluate a file, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Not available under no_std or WASM.

    Deprecated
    -

    This method is deprecated. Use run_file instead.

    +

    This method is deprecated. +Use run_file instead.

    This method will be removed in the next major version.

    pub fn consume_file_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - path: PathBuf -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file_with_scope instead

    Evaluate a file with own scope, but throw away the result and only return error (if any). + scope: &mut Scope<'_>, + path: PathBuf +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_file_with_scope instead

    Evaluate a file with own scope, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Not available under no_std or WASM.

    Deprecated
    -

    This method is deprecated. Use run_file_with_scope instead.

    +

    This method is deprecated. +Use run_file_with_scope instead.

    This method will be removed in the next major version.

    -

    pub fn consume(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run instead

    Evaluate a string, but throw away the result and only return error (if any). +

    pub fn consume(&self, script: &str) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run instead

    Evaluate a string, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run instead.

    +

    This method is deprecated. +Use run instead.

    This method will be removed in the next major version.

    pub fn consume_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, - script: &str -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_with_scope instead

    Evaluate a string with own scope, but throw away the result and only return error (if any). + scope: &mut Scope<'_>, + script: &str +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_with_scope instead

    Evaluate a string with own scope, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run_with_scope instead.

    +

    This method is deprecated. +Use run_with_scope instead.

    This method will be removed in the next major version.

    -

    pub fn consume_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast instead

    Evaluate an AST, but throw away the result and only return error (if any). +

    pub fn consume_ast(&self, ast: &AST) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast instead

    Evaluate an AST, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run_ast instead.

    +

    This method is deprecated. +Use run_ast instead.

    This method will be removed in the next major version.

    pub fn consume_ast_with_scope( &self, - scope: &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>, + scope: &mut Scope<'_>, ast: &AST -) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast_with_scope instead

    Evaluate an AST with own scope, but throw away the result and only return error (if any). +) -> Result<(), Box<EvalAltResult, Global>>

    👎Deprecated since 1.1.0: use run_ast_with_scope instead

    Evaluate an AST with own scope, but throw away the result and only return error (if any). Useful for when you don’t need the result, but still need to keep track of possible errors.

    Deprecated
    -

    This method is deprecated. Use run_ast_with_scope instead.

    +

    This method is deprecated. +Use run_ast_with_scope instead.

    This method will be removed in the next major version.

    -

    pub fn register_result_fn<A, const N: usize, const C: bool, R>( +

    pub fn register_result_fn<A, const N: usize, const C: bool, R>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - func: impl RegisterNativeFunction<A, N, C, R, true> + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + func: impl RegisterNativeFunction<A, N, C, R, true> + SendSync + 'static ) -> &mut Enginewhere A: 'static, - R: Variant + Clone,

    👎Deprecated since 1.9.1: use register_fn instead

    Register a custom fallible function with the Engine.

    + R: Variant + Clone,
    👎Deprecated since 1.9.1: use register_fn instead

    Register a custom fallible function with the Engine.

    Deprecated
    -

    This method is deprecated. Use register_fn instead.

    +

    This method is deprecated. +Use register_fn instead.

    This method will be removed in the next major version.

    -

    pub fn register_get_result<T, const C: bool, V>( +

    pub fn register_get_result<T, const C: bool, V>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C, V, true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_get instead

    Register a getter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_get instead

    Register a getter function for a member of a registered type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under no_object.

    Deprecated
    -

    This method is deprecated. Use register_get instead.

    +

    This method is deprecated. +Use register_get instead.

    This method will be removed in the next major version.

    -

    pub fn register_set_result<T, V, const C: bool, S>( +

    pub fn register_set_result<T, V, const C: bool, S>( &mut self, - name: impl AsRef<str>, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), true> + SendSync + 'static + name: impl AsRef<str>, + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_set instead

    Register a setter function for a member of a registered type with the Engine.

    + T: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_set instead

    Register a setter function for a member of a registered type with the Engine.

    Not available under no_object.

    Deprecated
    -

    This method is deprecated. Use register_set instead.

    +

    This method is deprecated. +Use register_set instead.

    This method will be removed in the next major version.

    -

    pub fn register_indexer_get_result<T, X, V, const C: bool>( +

    pub fn register_indexer_get_result<T, X, V, const C: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C, V, true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_indexer_get instead

    Register an index getter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_indexer_get instead

    Register an index getter for a custom type with the Engine.

    The function signature must start with &mut self and not &self.

    Not available under both no_index and no_object.

    Deprecated
    -

    This method is deprecated. Use register_indexer_get instead.

    +

    This method is deprecated. +Use register_indexer_get instead.

    This method will be removed in the next major version.

    -

    pub fn register_indexer_set_result<T, X, V, const C: bool>( +

    pub fn register_indexer_set_result<T, X, V, const C: bool>( &mut self, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), true> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), true> + SendSync + 'static ) -> &mut Enginewhere - T: Variant + Clone, - X: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use register_indexer_set instead

    Register an index setter for a custom type with the Engine.

    + T: Variant + Clone, + X: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use register_indexer_set instead

    Register an index setter for a custom type with the Engine.

    Not available under both no_index and no_object.

    Deprecated
    -

    This method is deprecated. Use register_indexer_set instead.

    +

    This method is deprecated. +Use register_indexer_set instead.

    This method will be removed in the next major version.

    pub fn register_custom_syntax_raw( &mut self, - key: impl Into<SmartString<LazyCompact>>, - parse: impl Fn(&[ImmutableString], &str) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, - scope_may_be_changed: bool, - func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static + key: impl Into<SmartString<LazyCompact>>, + parse: impl Fn(&[ImmutableString], &str) -> Result<Option<ImmutableString>, ParseError> + SendSync + 'static, + scope_may_be_changed: bool, + func: impl Fn(&mut EvalContext<'_, '_, '_, '_, '_, '_>, &[Expression<'_>]) -> Result<Dynamic, Box<EvalAltResult, Global>> + SendSync + 'static ) -> &mut Engine

    👎Deprecated since 1.11.0: use register_custom_syntax_with_state_raw instead

    Register a custom syntax with the Engine.

    Not available under no_custom_syntax.

    Deprecated

    This method is deprecated. Use register_custom_syntax_with_state_raw instead.

    This method will be removed in the next major version.

    -
    §

    impl Engine

    pub fn disable_symbol( +

    §

    impl Engine

    pub fn disable_symbol( &mut self, - symbol: impl Into<SmartString<LazyCompact>> + symbol: impl Into<SmartString<LazyCompact>> ) -> &mut Engine

    Disable a particular keyword or operator in the language.

    Examples

    The following will raise an error during parsing because the if keyword is disabled and is @@ -1215,7 +1213,7 @@

    Examples
    engine.compile("let x = 42; x += 1;")?; // ^ unknown operator
    -

    pub fn is_symbol_disabled(&self, symbol: &str) -> bool

    Is a particular keyword or operator disabled?

    +

    pub fn is_symbol_disabled(&self, symbol: &str) -> bool

    Is a particular keyword or operator disabled?

    Examples
    use rhai::Engine;
     
    @@ -1226,9 +1224,9 @@ 
    Examples
    assert!(engine.is_symbol_disabled("if"));

    pub fn register_custom_operator( &mut self, - keyword: impl AsRef<str>, - precedence: u8 -) -> Result<&mut Engine, String>

    Register a custom operator with a precedence into the language.

    + keyword: impl AsRef<str>, + precedence: u8 +) -> Result<&mut Engine, String>

    Register a custom operator with a precedence into the language.

    Not available under no_custom_syntax.

    The operator can be a valid identifier, a reserved symbol, a disabled operator or a disabled keyword.

    The precedence cannot be zero.

    @@ -1250,47 +1248,22 @@
    Example
    );

    pub const fn default_tag(&self) -> &Dynamic

    Get the default value of the custom state for each evaluation run.

    pub fn default_tag_mut(&mut self) -> &mut Dynamic

    Get a mutable reference to the default value of the custom state for each evaluation run.

    -

    pub fn set_default_tag(&mut self, value: impl Into<Dynamic>) -> &mut Engine

    Set the default value of the custom state for each evaluation run.

    -
    §

    impl Engine

    pub const RAW: Engine = Self{ - global_modules: StaticVec::new_const(), - - interned_strings: None, - - disabled_symbols: None, - - custom_keywords: None, - - custom_syntax: None, - - def_var_filter: None, - - resolve_var: None, - - token_mapper: None, - - print: None, - - debug: None, - - options: LangOptions::new(), - - def_tag: Dynamic::UNIT, - - optimization_level: (),}

    An empty raw Engine.

    +

    pub fn set_default_tag(&mut self, value: impl Into<Dynamic>) -> &mut Engine

    Set the default value of the custom state for each evaluation run.

    +
    §

    impl Engine

    pub const RAW: Engine = _

    An empty raw Engine.

    pub fn new() -> Engine

    Create a new Engine.

    pub const fn new_raw() -> Engine

    Create a new Engine with minimal built-in functions. It returns a copy of Engine::RAW.

    This is useful for creating a custom scripting engine with only the functions you need.

    Use register_global_module to add packages of functions.

    pub fn const_empty_string(&self) -> ImmutableString

    Get an empty ImmutableString which refers to a shared instance.

    -

    Trait Implementations§

    §

    impl Debug for Engine

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Engine

    §

    fn default() -> Engine

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Engine

    §

    impl Send for Engine

    §

    impl Sync for Engine

    §

    impl Unpin for Engine

    §

    impl !UnwindSafe for Engine

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl Debug for Engine

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Engine

    §

    fn default() -> Engine

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Engine

    §

    impl Send for Engine

    §

    impl Sync for Engine

    §

    impl Unpin for Engine

    §

    impl !UnwindSafe for Engine

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.EvalContext.html b/casbin/rhai/struct.EvalContext.html index 553df038..54f288f6 100644 --- a/casbin/rhai/struct.EvalContext.html +++ b/casbin/rhai/struct.EvalContext.html @@ -1,35 +1,31 @@ -EvalContext in casbin::rhai - Rust

    Struct casbin::rhai::EvalContext

    pub struct EvalContext<'a, 's, 'ps, 'g, 'c, 't> { /* private fields */ }
    Expand description

    Context of a script evaluation process.

    +EvalContext in casbin::rhai - Rust

    Struct casbin::rhai::EvalContext

    pub struct EvalContext<'a, 's, 'ps, 'g, 'c, 't> { /* private fields */ }
    Expand description

    Context of a script evaluation process.

    Implementations§

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    pub fn new( engine: &'a Engine, global: &'g mut GlobalRuntimeState, caches: &'c mut Caches, - scope: &'s mut Scope<'ps, rhai::::types::scope::Scope::{constant#0}>, - this_ptr: Option<&'t mut Dynamic> + scope: &'s mut Scope<'ps>, + this_ptr: Option<&'t mut Dynamic> ) -> EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    Create a new EvalContext.

    pub const fn engine(&self) -> &'a Engine

    The current Engine.

    -

    pub fn source(&self) -> Option<&str>

    The current source.

    -

    pub const fn scope( - &self -) -> &Scope<'ps, rhai::::types::scope::Scope::{constant#0}>

    The current Scope.

    -

    pub fn scope_mut( - &mut self -) -> &mut Scope<'ps, rhai::::types::scope::Scope::{constant#0}>

    Get a mutable reference to the current Scope.

    +

    pub fn source(&self) -> Option<&str>

    The current source.

    +

    pub const fn scope(&self) -> &Scope<'ps>

    The current Scope.

    +

    pub fn scope_mut(&mut self) -> &mut Scope<'ps>

    Get a mutable reference to the current Scope.

    pub const fn tag(&self) -> &Dynamic

    Custom state kept in a Dynamic.

    pub fn tag_mut(&mut self) -> &mut Dynamic

    Mutable reference to the custom state kept in a Dynamic.

    -

    pub fn this_ptr(&self) -> Option<&Dynamic>

    The current bound this pointer, if any.

    -

    pub fn this_ptr_mut(&mut self) -> Option<&mut Dynamic>

    Mutable reference to the current bound this pointer, if any.

    -

    pub const fn call_level(&self) -> usize

    The current nesting level of function calls.

    +

    pub fn this_ptr(&self) -> Option<&Dynamic>

    The current bound this pointer, if any.

    +

    pub fn this_ptr_mut(&mut self) -> Option<&mut Dynamic>

    Mutable reference to the current bound this pointer, if any.

    +

    pub const fn call_level(&self) -> usize

    The current nesting level of function calls.

    pub fn eval_expression_tree( &mut self, expr: &Expression<'_> -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Evaluate an expression tree within this evaluation context.

    WARNING - Low Level API

    This function is very low level. It evaluates an expression from an AST.

    pub fn eval_expression_tree_raw( &mut self, expr: &Expression<'_>, - rewind_scope: bool -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Evaluate an expression tree within this evaluation context.

    + rewind_scope: bool +) -> Result<Dynamic, Box<EvalAltResult, Global>>
    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Evaluate an expression tree within this evaluation context.

    The following option is available:

    Auto Trait Implementations§

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> !RefUnwindSafe for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> Send for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> Sync for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> Unpin for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> !UnwindSafe for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Auto Trait Implementations§

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> !RefUnwindSafe for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> Send for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> Sync for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> Unpin for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    §

    impl<'a, 's, 'ps, 'g, 'c, 't> !UnwindSafe for EvalContext<'a, 's, 'ps, 'g, 'c, 't>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.Expression.html b/casbin/rhai/struct.Expression.html index a8d548d3..4f942129 100644 --- a/casbin/rhai/struct.Expression.html +++ b/casbin/rhai/struct.Expression.html @@ -1,15 +1,15 @@ -Expression in casbin::rhai - Rust

    Struct casbin::rhai::Expression

    pub struct Expression<'a>(_);
    Expand description

    An expression sub-tree in an AST.

    +Expression in casbin::rhai - Rust

    Struct casbin::rhai::Expression

    pub struct Expression<'a>(/* private fields */);
    Expand description

    An expression sub-tree in an AST.

    Implementations§

    §

    impl Expression<'_>

    pub fn eval_with_context( &self, context: &mut EvalContext<'_, '_, '_, '_, '_, '_> -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Evaluate this expression tree within an evaluation context.

    WARNING - Low Level API

    This function is very low level. It evaluates an expression from an AST.

    pub fn eval_with_context_raw( &self, context: &mut EvalContext<'_, '_, '_, '_, '_, '_>, - rewind_scope: bool -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Evaluate this expression tree within an evaluation context.

    + rewind_scope: bool +) -> Result<Dynamic, Box<EvalAltResult, Global>>
    👎Deprecated: This API is NOT deprecated, but it is considered volatile and may change in the future.

    Evaluate this expression tree within an evaluation context.

    The following option is available:

    pub fn get_string_value(&self) -> Option<&str>

    Get the value of this expression if it is a variable name or a string constant.

    -

    Returns None also if the constant is not of the specified type.

    +

    pub fn get_string_value(&self) -> Option<&str>

    Get the value of this expression if it is a variable name or a string constant.

    +

    Returns None also if the constant is not of the specified type.

    pub const fn position(&self) -> Position

    Get the position of this expression.

    -

    pub fn get_literal_value<T>(&self) -> Option<T>where +

    pub fn get_literal_value<T>(&self) -> Option<T>where T: Variant,

    Get the value of this expression if it is a literal constant.

    Supports INT, [FLOAT][crate::FLOAT], (), char, bool and ImmutableString.

    -

    Returns None also if the constant is not of the specified type.

    -
    §

    impl Expression<'_>

    pub fn get_variable_name(&self) -> Option<&str>

    👎Deprecated since 1.4.0: use get_string_value instead

    If this expression is a variable name, return it. Otherwise None.

    +

    Returns None also if the constant is not of the specified type.

    +
    §

    impl Expression<'_>

    pub fn get_variable_name(&self) -> Option<&str>

    👎Deprecated since 1.4.0: use get_string_value instead

    If this expression is a variable name, return it. Otherwise None.

    Deprecated
    -

    This method is deprecated. Use get_string_value instead.

    +

    This method is deprecated. +Use get_string_value instead.

    This method will be removed in the next major version.

    -

    Trait Implementations§

    §

    impl AsRef<Expr> for Expression<'_>

    §

    fn as_ref(&self) -> &Expr

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<Expr> for Expression<'_>

    §

    fn borrow(&self) -> &Expr

    Immutably borrows from an owned value. Read more
    §

    impl<'a> Clone for Expression<'a>

    §

    fn clone(&self) -> Expression<'a>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl<'a> Debug for Expression<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Deref for Expression<'_>

    §

    type Target = Expr

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<Expression<'_> as Deref>::Target

    Dereferences the value.
    §

    impl<'a> From<&'a Expr> for Expression<'a>

    §

    fn from(expr: &'a Expr) -> Expression<'a>

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for Expression<'a>

    §

    impl<'a> Send for Expression<'a>

    §

    impl<'a> Sync for Expression<'a>

    §

    impl<'a> Unpin for Expression<'a>

    §

    impl<'a> !UnwindSafe for Expression<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl AsRef<Expr> for Expression<'_>

    §

    fn as_ref(&self) -> &Expr

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<Expr> for Expression<'_>

    §

    fn borrow(&self) -> &Expr

    Immutably borrows from an owned value. Read more
    §

    impl<'a> Clone for Expression<'a>

    §

    fn clone(&self) -> Expression<'a>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl<'a> Debug for Expression<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Deref for Expression<'_>

    §

    type Target = Expr

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<Expression<'_> as Deref>::Target

    Dereferences the value.
    §

    impl<'a> From<&'a Expr> for Expression<'a>

    §

    fn from(expr: &'a Expr) -> Expression<'a>

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for Expression<'a>

    §

    impl<'a> Send for Expression<'a>

    §

    impl<'a> Sync for Expression<'a>

    §

    impl<'a> Unpin for Expression<'a>

    §

    impl<'a> !UnwindSafe for Expression<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.FnPtr.html b/casbin/rhai/struct.FnPtr.html index 56728433..0b91b66c 100644 --- a/casbin/rhai/struct.FnPtr.html +++ b/casbin/rhai/struct.FnPtr.html @@ -1,43 +1,44 @@ -FnPtr in casbin::rhai - Rust

    Struct casbin::rhai::FnPtr

    pub struct FnPtr { /* private fields */ }
    Expand description

    A general function pointer, which may carry additional (i.e. curried) argument values +FnPtr in casbin::rhai - Rust

    Struct casbin::rhai::FnPtr

    pub struct FnPtr { /* private fields */ }
    Expand description

    A general function pointer, which may carry additional (i.e. curried) argument values to be passed onto a function during a call.

    -

    Implementations§

    §

    impl FnPtr

    pub fn num_curried(&self) -> usize

    👎Deprecated since 1.8.0: use curry().len() instead

    Get the number of curried arguments.

    +

    Implementations§

    §

    impl FnPtr

    pub fn num_curried(&self) -> usize

    👎Deprecated since 1.8.0: use curry().len() instead

    Get the number of curried arguments.

    Deprecated
    -

    This method is deprecated. Use curry().len() instead.

    +

    This method is deprecated. +Use curry().len() instead.

    This method will be removed in the next major version.

    pub fn call_dynamic( &self, context: &NativeCallContext<'_>, - this_ptr: Option<&mut Dynamic>, - arg_values: impl AsMut<[Dynamic]> -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    👎Deprecated since 1.3.0: use call_within_context or call_raw instead

    Call the function pointer with curried arguments (if any). + this_ptr: Option<&mut Dynamic>, + arg_values: impl AsMut<[Dynamic]> +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    👎Deprecated since 1.3.0: use call_within_context or call_raw instead

    Call the function pointer with curried arguments (if any). The function may be script-defined (not available under no_function) or native Rust.

    This method is intended for calling a function pointer that is passed into a native Rust function as an argument. Therefore, the AST is NOT evaluated before calling the function.

    Deprecated
    -

    This method is deprecated. Use call_within_context or -call_raw instead.

    +

    This method is deprecated. +Use call_within_context or call_raw instead.

    This method will be removed in the next major version.

    §

    impl FnPtr

    pub fn new( - name: impl Into<ImmutableString> -) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Create a new function pointer.

    -

    pub fn fn_name(&self) -> &str

    Get the name of the function.

    + name: impl Into<ImmutableString> +) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Create a new function pointer.

    +

    pub fn fn_name(&self) -> &str

    Get the name of the function.

    pub fn curry(&self) -> &[Dynamic]

    Get the curried arguments.

    -

    pub fn iter_curry(&self) -> impl Iterator<Item = &Dynamic>

    Iterate the curried arguments.

    -

    pub fn iter_curry_mut(&mut self) -> impl Iterator<Item = &mut Dynamic>

    Mutably-iterate the curried arguments.

    +

    pub fn iter_curry(&self) -> impl Iterator<Item = &Dynamic>

    Iterate the curried arguments.

    +

    pub fn iter_curry_mut(&mut self) -> impl Iterator<Item = &mut Dynamic>

    Mutably-iterate the curried arguments.

    pub fn add_curry(&mut self, value: Dynamic) -> &mut FnPtr

    Add a new curried argument.

    pub fn set_curry( &mut self, - values: impl IntoIterator<Item = Dynamic> + values: impl IntoIterator<Item = Dynamic> ) -> &mut FnPtr

    Set curried arguments to the function pointer.

    -

    pub fn is_curried(&self) -> bool

    Is the function pointer curried?

    +

    pub fn is_curried(&self) -> bool

    Is the function pointer curried?

    pub fn call<T>( &self, engine: &Engine, ast: &AST, args: impl FuncArgs -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Call the function pointer with curried arguments (if any). +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Call the function pointer with curried arguments (if any). The function may be script-defined (not available under no_function) or native Rust.

    This method is intended for calling a function pointer directly, possibly on another Engine. Therefore, the AST is NOT evaluated before calling the function.

    @@ -61,8 +62,8 @@
    Example
    &self, context: &NativeCallContext<'_>, args: impl FuncArgs -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Call the function pointer with curried arguments (if any). +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Call the function pointer with curried arguments (if any). The function may be script-defined (not available under no_function) or native Rust.

    This method is intended for calling a function pointer that is passed into a native Rust function as an argument. Therefore, the AST is NOT evaluated before calling the @@ -70,9 +71,9 @@

    Example

    pub fn call_raw( &self, context: &NativeCallContext<'_>, - this_ptr: Option<&mut Dynamic>, - arg_values: impl AsMut<[Dynamic]> -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call the function pointer with curried arguments (if any). + this_ptr: Option<&mut Dynamic>, + arg_values: impl AsMut<[Dynamic]> +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call the function pointer with curried arguments (if any). The function may be script-defined (not available under no_function) or native Rust.

    This method is intended for calling a function pointer that is passed into a native Rust function as an argument. Therefore, the AST is NOT evaluated before calling the @@ -84,23 +85,23 @@

    Arguments
    This is to avoid unnecessarily cloning the arguments.

    Do not use the arguments after this call. If they are needed afterwards, clone them before calling this function.

    -

    Trait Implementations§

    §

    impl Clone for FnPtr

    §

    fn clone(&self) -> FnPtr

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for FnPtr

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Display for FnPtr

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Extend<Dynamic> for FnPtr

    §

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = Dynamic>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl From<FnPtr> for Dynamic

    §

    fn from(value: FnPtr) -> Dynamic

    Converts to this type from the input type.
    §

    impl Hash for FnPtr

    §

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Index<usize> for FnPtr

    §

    type Output = Dynamic

    The returned type after indexing.
    §

    fn index(&self, index: usize) -> &<FnPtr as Index<usize>>::Output

    Performs the indexing (container[index]) operation. Read more
    §

    impl IndexMut<usize> for FnPtr

    §

    fn index_mut(&mut self, index: usize) -> &mut <FnPtr as Index<usize>>::Output

    Performs the mutable indexing (container[index]) operation. Read more
    §

    impl TryFrom<ImmutableString> for FnPtr

    §

    type Error = Box<EvalAltResult, Global>

    The type returned in the event of a conversion error.
    §

    fn try_from(value: ImmutableString) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Performs the conversion.

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for FnPtr

    §

    impl Send for FnPtr

    §

    impl Sync for FnPtr

    §

    impl Unpin for FnPtr

    §

    impl !UnwindSafe for FnPtr

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl Clone for FnPtr

    §

    fn clone(&self) -> FnPtr

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for FnPtr

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Display for FnPtr

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Extend<Dynamic> for FnPtr

    §

    fn extend<T>(&mut self, iter: T)where + T: IntoIterator<Item = Dynamic>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl From<FnPtr> for Dynamic

    §

    fn from(value: FnPtr) -> Dynamic

    Converts to this type from the input type.
    §

    impl Hash for FnPtr

    §

    fn hash<H>(&self, state: &mut H)where + H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Index<usize> for FnPtr

    §

    type Output = Dynamic

    The returned type after indexing.
    §

    fn index(&self, index: usize) -> &<FnPtr as Index<usize>>::Output

    Performs the indexing (container[index]) operation. Read more
    §

    impl IndexMut<usize> for FnPtr

    §

    fn index_mut(&mut self, index: usize) -> &mut <FnPtr as Index<usize>>::Output

    Performs the mutable indexing (container[index]) operation. Read more
    §

    impl TryFrom<ImmutableString> for FnPtr

    §

    type Error = Box<EvalAltResult, Global>

    The type returned in the event of a conversion error.
    §

    fn try_from(value: ImmutableString) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Performs the conversion.

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for FnPtr

    §

    impl Send for FnPtr

    §

    impl Sync for FnPtr

    §

    impl Unpin for FnPtr

    §

    impl !UnwindSafe for FnPtr

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.ImmutableString.html b/casbin/rhai/struct.ImmutableString.html index 3d81117f..391b4fde 100644 --- a/casbin/rhai/struct.ImmutableString.html +++ b/casbin/rhai/struct.ImmutableString.html @@ -1,4 +1,4 @@ -ImmutableString in casbin::rhai - Rust
    pub struct ImmutableString(_);
    Expand description

    The system immutable string type.

    +ImmutableString in casbin::rhai - Rust
    pub struct ImmutableString(/* private fields */);
    Expand description

    The system immutable string type.

    An ImmutableString wraps an Rc<SmartString> (or Arc<SmartString> under the sync feature) so that it can be simply shared and not cloned.

    Example

    @@ -26,9 +26,9 @@

    Example

    assert_ne!(s2.as_str(), s.as_str()); assert_eq!(s, "hello, world!");

    Implementations§

    §

    impl ImmutableString

    pub fn new() -> ImmutableString

    Create a new ImmutableString.

    -

    pub fn into_owned(self) -> String

    Consume the ImmutableString and convert it into a String.

    +

    pub fn into_owned(self) -> String

    Consume the ImmutableString and convert it into a String.

    If there are other references to the same string, a cloned copy is returned.

    -

    pub fn ptr_eq(&self, other: &ImmutableString) -> bool

    Returns true if the two ImmutableString’s point to the same allocation.

    +

    pub fn ptr_eq(&self, other: &ImmutableString) -> bool

    Returns true if the two ImmutableString’s point to the same allocation.

    Example
    use rhai::ImmutableString;
     
    @@ -43,19 +43,19 @@ 
    Example
    assert!(s1.ptr_eq(&s2)); assert!(!s1.ptr_eq(&s3)); assert!(!s2.ptr_eq(&s3));
    -

    Methods from Deref<Target = SmartString<LazyCompact>>§

    pub fn len(&self) -> usize

    Return the length in bytes of the string.

    +

    Methods from Deref<Target = SmartString<LazyCompact>>§

    pub fn len(&self) -> usize

    Return the length in bytes of the string.

    Note that this may differ from the length in chars.

    -

    pub fn is_empty(&self) -> bool

    Test whether the string is empty.

    -

    pub fn is_inline(&self) -> bool

    Test whether the string is currently inlined.

    -

    pub fn as_str(&self) -> &str

    Get a reference to the string as a string slice.

    -

    pub fn capacity(&self) -> usize

    Return the currently allocated capacity of the string.

    -

    Note that if this is a boxed string, it returns String::capacity(), +

    pub fn is_empty(&self) -> bool

    Test whether the string is empty.

    +

    pub fn is_inline(&self) -> bool

    Test whether the string is currently inlined.

    +

    pub fn as_str(&self) -> &str

    Get a reference to the string as a string slice.

    +

    pub fn capacity(&self) -> usize

    Return the currently allocated capacity of the string.

    +

    Note that if this is a boxed string, it returns String::capacity(), but an inline string always returns [MAX_INLINE].

    Note also that if a boxed string is converted into an inline string, its capacity is deallocated, and if the inline string is promoted to a boxed string in the future, it will be reallocated with a default capacity.

    -

    Methods from Deref<Target = str>§

    1.0.0 · source

    pub fn len(&self) -> usize

    Returns the length of self.

    -

    This length is in bytes, not chars or graphemes. In other words, +

    Methods from Deref<Target = str>§

    1.0.0 · source

    pub fn len(&self) -> usize

    Returns the length of self.

    +

    This length is in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.

    Examples
    let len = "foo".len();
    @@ -63,14 +63,14 @@ 
    Examples
    assert_eq!("ƒoo".len(), 4); // fancy f! assert_eq!("ƒoo".chars().count(), 3);
    -
    1.0.0 · source

    pub fn is_empty(&self) -> bool

    Returns true if self has a length of zero bytes.

    +
    1.0.0 · source

    pub fn is_empty(&self) -> bool

    Returns true if self has a length of zero bytes.

    Examples
    let s = "";
     assert!(s.is_empty());
     
     let s = "not empty";
     assert!(!s.is_empty());
    -
    1.9.0 · source

    pub fn is_char_boundary(&self, index: usize) -> bool

    Checks that index-th byte is the first byte in a UTF-8 code point +

    1.9.0 · source

    pub fn is_char_boundary(&self, index: usize) -> bool

    Checks that index-th byte is the first byte in a UTF-8 code point sequence or the end of the string.

    The start and end of the string (when index == self.len()) are considered to be boundaries.

    @@ -87,7 +87,7 @@
    Examples
    // third byte of `老` assert!(!s.is_char_boundary(8));
    -
    source

    pub fn floor_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not exceeding index where is_char_boundary(x) is true.

    +
    source

    pub fn floor_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not exceeding index where is_char_boundary(x) is true.

    This method can help you truncate a string so that it’s still valid UTF-8, but doesn’t exceed a given number of bytes. Note that this is done purely at the character level and can still visually split graphemes, even though the underlying characters aren’t @@ -102,11 +102,10 @@

    Examples
    let closest = s.floor_char_boundary(13); assert_eq!(closest, 10); assert_eq!(&s[..closest], "❤️🧡");
    -
    source

    pub fn ceil_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not below index where is_char_boundary(x) is true.

    -

    This method is the natural complement to floor_char_boundary. See that method +

    source

    pub fn ceil_char_boundary(&self, index: usize) -> usize

    🔬This is a nightly-only experimental API. (round_char_boundary)

    Finds the closest x not below index where is_char_boundary(x) is true.

    +

    If index is greater than the length of the string, this returns the length of the string.

    +

    This method is the natural complement to floor_char_boundary. See that method for more details.

    -
    Panics
    -

    Panics if index > self.len().

    Examples
    #![feature(round_char_boundary)]
     let s = "❤️🧡💛💚💙💜";
    @@ -116,12 +115,12 @@ 
    Examples
    let closest = s.ceil_char_boundary(13); assert_eq!(closest, 14); assert_eq!(&s[..closest], "❤️🧡💛");
    -
    1.0.0 · source

    pub fn as_bytes(&self) -> &[u8]

    Converts a string slice to a byte slice. To convert the byte slice back -into a string slice, use the from_utf8 function.

    +
    1.0.0 · source

    pub fn as_bytes(&self) -> &[u8]

    Converts a string slice to a byte slice. To convert the byte slice back +into a string slice, use the from_utf8 function.

    Examples
    let bytes = "bors".as_bytes();
     assert_eq!(b"bors", bytes);
    -
    1.20.0 · source

    pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]

    Converts a mutable string slice to a mutable byte slice.

    +
    1.20.0 · source

    pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]

    Converts a mutable string slice to a mutable byte slice.

    Safety

    The caller must ensure that the content of the slice is valid UTF-8 before the borrow ends and the underlying str is used.

    @@ -147,25 +146,25 @@
    Examples
    } assert_eq!("🍔∈🌏", s);
    -
    1.0.0 · source

    pub fn as_ptr(&self) -> *const u8

    Converts a string slice to a raw pointer.

    +
    1.0.0 · source

    pub fn as_ptr(&self) -> *const u8

    Converts a string slice to a raw pointer.

    As string slices are a slice of bytes, the raw pointer points to a -u8. This pointer will be pointing to the first byte of the string +u8. This pointer will be pointing to the first byte of the string slice.

    The caller must ensure that the returned pointer is never written to. -If you need to mutate the contents of the string slice, use as_mut_ptr.

    +If you need to mutate the contents of the string slice, use as_mut_ptr.

    Examples
    let s = "Hello";
     let ptr = s.as_ptr();
    -
    1.36.0 · source

    pub fn as_mut_ptr(&mut self) -> *mut u8

    Converts a mutable string slice to a raw pointer.

    +
    1.36.0 · source

    pub fn as_mut_ptr(&mut self) -> *mut u8

    Converts a mutable string slice to a raw pointer.

    As string slices are a slice of bytes, the raw pointer points to a -u8. This pointer will be pointing to the first byte of the string +u8. This pointer will be pointing to the first byte of the string slice.

    It is your responsibility to make sure that the string slice only gets modified in a way that it remains valid UTF-8.

    -
    1.20.0 · source

    pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>where - I: SliceIndex<str>,

    Returns a subslice of str.

    +
    1.20.0 · source

    pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>where + I: SliceIndex<str>,

    Returns a subslice of str.

    This is the non-panicking alternative to indexing the str. Returns -None whenever equivalent indexing operation would panic.

    +None whenever equivalent indexing operation would panic.

    Examples
    let v = String::from("🗻∈🌏");
     
    @@ -177,13 +176,13 @@ 
    Examples
    // out of bounds assert!(v.get(..42).is_none());
    -
    1.20.0 · source

    pub fn get_mut<I>( +

    1.20.0 · source

    pub fn get_mut<I>( &mut self, i: I -) -> Option<&mut <I as SliceIndex<str>>::Output>where - I: SliceIndex<str>,

    Returns a mutable subslice of str.

    +) -> Option<&mut <I as SliceIndex<str>>::Output>where + I: SliceIndex<str>,

    Returns a mutable subslice of str.

    This is the non-panicking alternative to indexing the str. Returns -None whenever equivalent indexing operation would panic.

    +None whenever equivalent indexing operation would panic.

    Examples
    let mut v = String::from("hello");
     // correct length
    @@ -202,8 +201,8 @@ 
    Examples
    assert_eq!(Some("HE"), s); } assert_eq!("HEllo", v);
    -
    1.20.0 · source

    pub unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Outputwhere - I: SliceIndex<str>,

    Returns an unchecked subslice of str.

    +
    1.20.0 · source

    pub unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Outputwhere + I: SliceIndex<str>,

    Returns an unchecked subslice of str.

    This is the unchecked alternative to indexing the str.

    Safety

    Callers of this function are responsible that these preconditions are @@ -222,11 +221,11 @@

    Examples
    assert_eq!("∈", v.get_unchecked(4..7)); assert_eq!("🌏", v.get_unchecked(7..11)); }
    -
    1.20.0 · source

    pub unsafe fn get_unchecked_mut<I>( +

    1.20.0 · source

    pub unsafe fn get_unchecked_mut<I>( &mut self, i: I -) -> &mut <I as SliceIndex<str>>::Outputwhere - I: SliceIndex<str>,

    Returns a mutable, unchecked subslice of str.

    +) -> &mut <I as SliceIndex<str>>::Outputwhere + I: SliceIndex<str>,

    Returns a mutable, unchecked subslice of str.

    This is the unchecked alternative to indexing the str.

    Safety

    Callers of this function are responsible that these preconditions are @@ -245,14 +244,14 @@

    Examples
    assert_eq!("∈", v.get_unchecked_mut(4..7)); assert_eq!("🌏", v.get_unchecked_mut(7..11)); }
    -
    1.0.0 · source

    pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

    👎Deprecated since 1.29.0: use get_unchecked(begin..end) instead

    Creates a string slice from another string slice, bypassing safety +

    1.0.0 · source

    pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

    👎Deprecated since 1.29.0: use get_unchecked(begin..end) instead

    Creates a string slice from another string slice, bypassing safety checks.

    This is generally not recommended, use with caution! For a safe -alternative see str and Index.

    +alternative see str and Index.

    This new slice goes from begin to end, including begin but excluding end.

    To get a mutable string slice instead, see the -slice_mut_unchecked method.

    +slice_mut_unchecked method.

    Safety

    Callers of this function are responsible that three preconditions are satisfied:

    @@ -273,18 +272,18 @@
    Examples
    unsafe { assert_eq!("world", s.slice_unchecked(7, 12)); }
    -
    1.5.0 · source

    pub unsafe fn slice_mut_unchecked( +

    1.5.0 · source

    pub unsafe fn slice_mut_unchecked( &mut self, - begin: usize, - end: usize -) -> &mut str

    👎Deprecated since 1.29.0: use get_unchecked_mut(begin..end) instead

    Creates a string slice from another string slice, bypassing safety + begin: usize, + end: usize +) -> &mut str

    👎Deprecated since 1.29.0: use get_unchecked_mut(begin..end) instead

    Creates a string slice from another string slice, bypassing safety checks. This is generally not recommended, use with caution! For a safe -alternative see str and IndexMut.

    +alternative see str and IndexMut.

    This new slice goes from begin to end, including begin but excluding end.

    To get an immutable string slice instead, see the -slice_unchecked method.

    +slice_unchecked method.

    Safety

    Callers of this function are responsible that three preconditions are satisfied:

    @@ -293,14 +292,14 @@
    Safety
  • begin and end must be byte positions within the string slice.
  • begin and end must lie on UTF-8 sequence boundaries.
  • -
    1.4.0 · source

    pub fn split_at(&self, mid: usize) -> (&str, &str)

    Divide one string slice into two at an index.

    +
    1.4.0 · source

    pub fn split_at(&self, mid: usize) -> (&str, &str)

    Divide one string slice into two at an index.

    The argument, mid, should be a byte offset from the start of the string. It must also be on the boundary of a UTF-8 code point.

    The two slices returned go from the start of the string slice to mid, and from mid to the end of the string slice.

    -

    To get mutable string slices instead, see the split_at_mut +

    To get mutable string slices instead, see the split_at_mut method.

    -
    Panics
    +
    Panics

    Panics if mid is not on a UTF-8 code point boundary, or if it is past the end of the last code point of the string slice.

    Examples
    @@ -310,13 +309,13 @@
    Examples
    assert_eq!("Per", first); assert_eq!(" Martin-Löf", last);
    -
    1.4.0 · source

    pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str)

    Divide one mutable string slice into two at an index.

    +
    1.4.0 · source

    pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str)

    Divide one mutable string slice into two at an index.

    The argument, mid, should be a byte offset from the start of the string. It must also be on the boundary of a UTF-8 code point.

    The two slices returned go from the start of the string slice to mid, and from mid to the end of the string slice.

    -

    To get immutable string slices instead, see the split_at method.

    -
    Panics
    +

    To get immutable string slices instead, see the split_at method.

    +
    Panics

    Panics if mid is not on a UTF-8 code point boundary, or if it is past the end of the last code point of the string slice.

    Examples
    @@ -328,10 +327,10 @@
    Examples
    assert_eq!(" Martin-Löf", last); } assert_eq!("PER Martin-Löf", s);
    -
    1.0.0 · source

    pub fn chars(&self) -> Chars<'_>

    Returns an iterator over the chars of a string slice.

    +
    1.0.0 · source

    pub fn chars(&self) -> Chars<'_>

    Returns an iterator over the chars of a string slice.

    As a string slice consists of valid UTF-8, we can iterate through a -string slice by char. This method returns such an iterator.

    -

    It’s important to remember that char represents a Unicode Scalar +string slice by char. This method returns such an iterator.

    +

    It’s important to remember that char represents a Unicode Scalar Value, and might not match your idea of what a ‘character’ is. Iteration over grapheme clusters may be what you actually want. This functionality is not provided by Rust’s standard library, check crates.io instead.

    @@ -354,7 +353,7 @@
    Examples
    assert_eq!(Some('e'), chars.next()); assert_eq!(None, chars.next());
    -

    Remember, chars might not match your intuition about characters:

    +

    Remember, chars might not match your intuition about characters:

    let y = "y̆";
     
    @@ -364,12 +363,12 @@ 
    Examples
    assert_eq!(Some('\u{0306}'), chars.next()); assert_eq!(None, chars.next());
    -
    1.0.0 · source

    pub fn char_indices(&self) -> CharIndices<'_>

    Returns an iterator over the chars of a string slice, and their +

    1.0.0 · source

    pub fn char_indices(&self) -> CharIndices<'_>

    Returns an iterator over the chars of a string slice, and their positions.

    As a string slice consists of valid UTF-8, we can iterate through a -string slice by char. This method returns an iterator of both -these chars, as well as their byte positions.

    -

    The iterator yields tuples. The position is first, the char is +string slice by char. This method returns an iterator of both +these chars, as well as their byte positions.

    +

    The iterator yields tuples. The position is first, the char is second.

    Examples

    Basic usage:

    @@ -390,7 +389,7 @@
    Examples
    assert_eq!(Some((6, 'e')), char_indices.next()); assert_eq!(None, char_indices.next());
    -

    Remember, chars might not match your intuition about characters:

    +

    Remember, chars might not match your intuition about characters:

    let yes = "y̆es";
     
    @@ -404,7 +403,7 @@ 
    Examples
    assert_eq!(Some((4, 's')), char_indices.next()); assert_eq!(None, char_indices.next());
    -
    1.0.0 · source

    pub fn bytes(&self) -> Bytes<'_>

    An iterator over the bytes of a string slice.

    +
    1.0.0 · source

    pub fn bytes(&self) -> Bytes<'_>

    An iterator over the bytes of a string slice.

    As a string slice consists of a sequence of bytes, we can iterate through a string slice by byte. This method returns such an iterator.

    Examples
    @@ -416,12 +415,12 @@
    Examples
    assert_eq!(Some(b's'), bytes.next()); assert_eq!(None, bytes.next());
    -
    1.1.0 · source

    pub fn split_whitespace(&self) -> SplitWhitespace<'_>

    Splits a string slice by whitespace.

    +
    1.1.0 · source

    pub fn split_whitespace(&self) -> SplitWhitespace<'_>

    Splits a string slice by whitespace.

    The iterator returned will return string slices that are sub-slices of the original string slice, separated by any amount of whitespace.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space. If you only want to split on ASCII whitespace -instead, use split_ascii_whitespace.

    +instead, use split_ascii_whitespace.

    Examples

    Basic usage:

    @@ -446,10 +445,10 @@
    Examples
    assert_eq!("".split_whitespace().next(), None);
     assert_eq!("   ".split_whitespace().next(), None);
    -
    1.34.0 · source

    pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

    Splits a string slice by ASCII whitespace.

    +
    1.34.0 · source

    pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

    Splits a string slice by ASCII whitespace.

    The iterator returned will return string slices that are sub-slices of the original string slice, separated by any amount of ASCII whitespace.

    -

    To split by Unicode Whitespace instead, use split_whitespace.

    +

    To split by Unicode Whitespace instead, use split_whitespace.

    Examples

    Basic usage:

    @@ -474,26 +473,30 @@
    Examples
    assert_eq!("".split_ascii_whitespace().next(), None);
     assert_eq!("   ".split_ascii_whitespace().next(), None);
    -
    1.0.0 · source

    pub fn lines(&self) -> Lines<'_>

    An iterator over the lines of a string, as string slices.

    +
    1.0.0 · source

    pub fn lines(&self) -> Lines<'_>

    An iterator over the lines of a string, as string slices.

    Lines are split at line endings that are either newlines (\n) or sequences of a carriage return followed by a line feed (\r\n).

    Line terminators are not included in the lines returned by the iterator.

    +

    Note that any carriage return (\r) not immediately followed by a +line feed (\n) does not split a line. These carriage returns are +thereby included in the produced lines.

    The final line ending is optional. A string that ends with a final line ending will return the same lines as an otherwise identical string without a final line ending.

    Examples

    Basic usage:

    -
    let text = "foo\r\nbar\n\nbaz\n";
    +
    let text = "foo\r\nbar\n\nbaz\r";
     let mut lines = text.lines();
     
     assert_eq!(Some("foo"), lines.next());
     assert_eq!(Some("bar"), lines.next());
     assert_eq!(Some(""), lines.next());
    -assert_eq!(Some("baz"), lines.next());
    +// Trailing carriage return is included in the last line
    +assert_eq!(Some("baz\r"), lines.next());
     
     assert_eq!(None, lines.next());
    -

    The final line ending isn’t required:

    +

    The final line does not require any ending:

    let text = "foo\nbar\n\r\nbaz";
     let mut lines = text.lines();
    @@ -504,8 +507,8 @@ 
    Examples
    assert_eq!(Some("baz"), lines.next()); assert_eq!(None, lines.next());
    -
    1.0.0 · source

    pub fn lines_any(&self) -> LinesAny<'_>

    👎Deprecated since 1.4.0: use lines() instead now

    An iterator over the lines of a string.

    -
    1.8.0 · source

    pub fn encode_utf16(&self) -> EncodeUtf16<'_>

    Returns an iterator of u16 over the string encoded as UTF-16.

    +
    1.0.0 · source

    pub fn lines_any(&self) -> LinesAny<'_>

    👎Deprecated since 1.4.0: use lines() instead now

    An iterator over the lines of a string.

    +
    1.8.0 · source

    pub fn encode_utf16(&self) -> EncodeUtf16<'_>

    Returns an iterator of u16 over the string encoded as UTF-16.

    Examples
    let text = "Zażółć gęślą jaźń";
     
    @@ -513,45 +516,45 @@ 
    Examples
    let utf16_len = text.encode_utf16().count(); assert!(utf16_len <= utf8_len);
    -
    1.0.0 · source

    pub fn contains<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>,

    Returns true if the given pattern matches a sub-slice of +

    1.0.0 · source

    pub fn contains<'a, P>(&'a self, pat: P) -> boolwhere + P: Pattern<'a>,

    Returns true if the given pattern matches a sub-slice of this string slice.

    Returns false if it does not.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let bananas = "bananas";
     
     assert!(bananas.contains("nana"));
     assert!(!bananas.contains("apples"));
    -
    1.0.0 · source

    pub fn starts_with<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>,

    Returns true if the given pattern matches a prefix of this +

    1.0.0 · source

    pub fn starts_with<'a, P>(&'a self, pat: P) -> boolwhere + P: Pattern<'a>,

    Returns true if the given pattern matches a prefix of this string slice.

    Returns false if it does not.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let bananas = "bananas";
     
     assert!(bananas.starts_with("bana"));
     assert!(!bananas.starts_with("nana"));
    -
    1.0.0 · source

    pub fn ends_with<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns true if the given pattern matches a suffix of this +

    1.0.0 · source

    pub fn ends_with<'a, P>(&'a self, pat: P) -> boolwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns true if the given pattern matches a suffix of this string slice.

    Returns false if it does not.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let bananas = "bananas";
     
     assert!(bananas.ends_with("anas"));
     assert!(!bananas.ends_with("nana"));
    -
    1.0.0 · source

    pub fn find<'a, P>(&'a self, pat: P) -> Option<usize>where - P: Pattern<'a>,

    Returns the byte index of the first character of this string slice that +

    1.0.0 · source

    pub fn find<'a, P>(&'a self, pat: P) -> Option<usize>where + P: Pattern<'a>,

    Returns the byte index of the first character of this string slice that matches the pattern.

    -

    Returns None if the pattern doesn’t match.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    Returns None if the pattern doesn’t match.

    +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples

    Simple patterns:

    @@ -575,12 +578,12 @@
    Examples
    let x: &[_] = &['1', '2']; assert_eq!(s.find(x), None);
    -
    1.0.0 · source

    pub fn rfind<'a, P>(&'a self, pat: P) -> Option<usize>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns the byte index for the first character of the last match of the pattern in +

    1.0.0 · source

    pub fn rfind<'a, P>(&'a self, pat: P) -> Option<usize>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns the byte index for the first character of the last match of the pattern in this string slice.

    -

    Returns None if the pattern doesn’t match.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    Returns None if the pattern doesn’t match.

    +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples

    Simple patterns:

    @@ -602,17 +605,17 @@
    Examples
    let x: &[_] = &['1', '2']; assert_eq!(s.rfind(x), None);
    -
    1.0.0 · source

    pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by +

    1.0.0 · source

    pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by characters matched by a pattern.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rsplit method can be used.

    +from a forward search, the rsplit method can be used.

    Examples

    Simple patterns:

    @@ -675,13 +678,13 @@
    Examples

    It does not give you:

    assert_eq!(d, &["a", "b", "c"]);
    -

    Use split_whitespace for this behavior.

    -
    1.51.0 · source

    pub fn split_inclusive<'a, P>(&'a self, pat: P) -> SplitInclusive<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by +

    Use split_whitespace for this behavior.

    +
    1.51.0 · source

    pub fn split_inclusive<'a, P>(&'a self, pat: P) -> SplitInclusive<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of this string slice, separated by characters matched by a pattern. Differs from the iterator produced by split in that split_inclusive leaves the matched part as the terminator of the substring.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb."
    @@ -694,17 +697,17 @@ 
    Examples
    let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
         .split_inclusive('\n').collect();
     assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]);
    -
    1.0.0 · source

    pub fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of the given string slice, separated by +

    1.0.0 · source

    pub fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of the given string slice, separated by characters matched by a pattern and yielded in reverse order.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the split method can be used.

    +

    For iterating from the front, the split method can be used.

    Examples

    Simple patterns:

    @@ -723,21 +726,21 @@
    Examples
    let v: Vec<&str> = "abc1defXghi".rsplit(|c| c == '1' || c == 'X').collect();
     assert_eq!(v, ["ghi", "def", "abc"]);
    -
    1.0.0 · source

    pub fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by +

    1.0.0 · source

    pub fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by characters matched by a pattern.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    -

    Equivalent to split, except that the trailing substring +

    Equivalent to split, except that the trailing substring is skipped if empty.

    This method can be used for string data that is terminated, rather than separated by a pattern.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rsplit_terminator method can be used.

    +from a forward search, the rsplit_terminator method can be used.

    Examples
    let v: Vec<&str> = "A.B.".split_terminator('.').collect();
     assert_eq!(v, ["A", "B"]);
    @@ -747,13 +750,13 @@ 
    Examples
    let v: Vec<&str> = "A.B:C.D".split_terminator(&['.', ':'][..]).collect(); assert_eq!(v, ["A", "B", "C", "D"]);
    -
    1.0.0 · source

    pub fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of self, separated by characters +

    1.0.0 · source

    pub fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of self, separated by characters matched by a pattern and yielded in reverse order.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    -

    Equivalent to split, except that the trailing substring is +

    Equivalent to split, except that the trailing substring is skipped if empty.

    This method can be used for string data that is terminated, rather than separated by a pattern.

    @@ -761,7 +764,7 @@
    Iterator behaviorThe returned iterator requires that the pattern supports a reverse search, and it will be double ended if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the split_terminator method can be +

    For iterating from the front, the split_terminator method can be used.

    Examples
    let v: Vec<&str> = "A.B.".rsplit_terminator('.').collect();
    @@ -772,17 +775,17 @@ 
    Examples
    let v: Vec<&str> = "A.B:C.D".rsplit_terminator(&['.', ':'][..]).collect(); assert_eq!(v, ["D", "C", "B", "A"]);
    -
    1.0.0 · source

    pub fn splitn<'a, P>(&'a self, n: usize, pat: P) -> SplitN<'a, P>where - P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by a +

    1.0.0 · source

    pub fn splitn<'a, P>(&'a self, n: usize, pat: P) -> SplitN<'a, P>where + P: Pattern<'a>,

    An iterator over substrings of the given string slice, separated by a pattern, restricted to returning at most n items.

    If n substrings are returned, the last substring (the nth substring) will contain the remainder of the string.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator will not be double ended, because it is not efficient to support.

    -

    If the pattern allows a reverse search, the rsplitn method can be +

    If the pattern allows a reverse search, the rsplitn method can be used.

    Examples

    Simple patterns:

    @@ -802,19 +805,19 @@
    Examples
    let v: Vec<&str> = "abc1defXghi".splitn(2, |c| c == '1' || c == 'X').collect();
     assert_eq!(v, ["abc", "defXghi"]);
    -
    1.0.0 · source

    pub fn rsplitn<'a, P>(&'a self, n: usize, pat: P) -> RSplitN<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of this string slice, separated by a +

    1.0.0 · source

    pub fn rsplitn<'a, P>(&'a self, n: usize, pat: P) -> RSplitN<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over substrings of this string slice, separated by a pattern, starting from the end of the string, restricted to returning at most n items.

    If n substrings are returned, the last substring (the nth substring) will contain the remainder of the string.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator will not be double ended, because it is not efficient to support.

    -

    For splitting from the front, the splitn method can be used.

    +

    For splitting from the front, the splitn method can be used.

    Examples

    Simple patterns:

    @@ -830,69 +833,69 @@
    Examples
    let v: Vec<&str> = "abc1defXghi".rsplitn(2, |c| c == '1' || c == 'X').collect();
     assert_eq!(v, ["ghi", "abc1def"]);
    -
    1.52.0 · source

    pub fn split_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where - P: Pattern<'a>,

    Splits the string on the first occurrence of the specified delimiter and +

    1.52.0 · source

    pub fn split_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where + P: Pattern<'a>,

    Splits the string on the first occurrence of the specified delimiter and returns prefix before delimiter and suffix after delimiter.

    Examples
    assert_eq!("cfg".split_once('='), None);
     assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
     assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
     assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
    -
    1.52.0 · source

    pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Splits the string on the last occurrence of the specified delimiter and +

    1.52.0 · source

    pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Splits the string on the last occurrence of the specified delimiter and returns prefix before delimiter and suffix after delimiter.

    Examples
    assert_eq!("cfg".rsplit_once('='), None);
     assert_eq!("cfg=foo".rsplit_once('='), Some(("cfg", "foo")));
     assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));
    -
    1.2.0 · source

    pub fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P>where - P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within the given string +

    1.2.0 · source

    pub fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P>where + P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within the given string slice.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rmatches method can be used.

    +from a forward search, the rmatches method can be used.

    Examples
    let v: Vec<&str> = "abcXXXabcYYYabc".matches("abc").collect();
     assert_eq!(v, ["abc", "abc", "abc"]);
     
     let v: Vec<&str> = "1abc2abc3".matches(char::is_numeric).collect();
     assert_eq!(v, ["1", "2", "3"]);
    -
    1.2.0 · source

    pub fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within this string slice, +

    1.2.0 · source

    pub fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within this string slice, yielded in reverse order.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the matches method can be used.

    +

    For iterating from the front, the matches method can be used.

    Examples
    let v: Vec<&str> = "abcXXXabcYYYabc".rmatches("abc").collect();
     assert_eq!(v, ["abc", "abc", "abc"]);
     
     let v: Vec<&str> = "1abc2abc3".rmatches(char::is_numeric).collect();
     assert_eq!(v, ["3", "2", "1"]);
    -
    1.5.0 · source

    pub fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P>where - P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within this string +

    1.5.0 · source

    pub fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P>where + P: Pattern<'a>,

    An iterator over the disjoint matches of a pattern within this string slice as well as the index that the match starts at.

    For matches of pat within self that overlap, only the indices corresponding to the first match are returned.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior
    -

    The returned iterator will be a DoubleEndedIterator if the pattern +

    The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

    +elements. This is true for, e.g., char, but not for &str.

    If the pattern allows a reverse search but its results might differ -from a forward search, the rmatch_indices method can be used.

    +from a forward search, the rmatch_indices method can be used.

    Examples
    let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
     assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
    @@ -902,19 +905,19 @@ 
    Examples
    let v: Vec<_> = "ababa".match_indices("aba").collect(); assert_eq!(v, [(0, "aba")]); // only the first `aba`
    -
    1.5.0 · source

    pub fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within self, +

    1.5.0 · source

    pub fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    An iterator over the disjoint matches of a pattern within self, yielded in reverse order along with the index of the match.

    For matches of pat within self that overlap, only the indices corresponding to the last match are returned.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Iterator behavior

    The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

    -

    For iterating from the front, the match_indices method can be used.

    +

    For iterating from the front, the match_indices method can be used.

    Examples
    let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
     assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
    @@ -924,14 +927,14 @@ 
    Examples
    let v: Vec<_> = "ababa".rmatch_indices("aba").collect(); assert_eq!(v, [(2, "aba")]); // only the last `aba`
    -
    1.0.0 · source

    pub fn trim(&self) -> &str

    Returns a string slice with leading and trailing whitespace removed.

    +
    1.0.0 · source

    pub fn trim(&self) -> &str

    Returns a string slice with leading and trailing whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

    Examples
    let s = "\n Hello\tworld\t\n";
     
     assert_eq!("Hello\tworld", s.trim());
    -
    1.30.0 · source

    pub fn trim_start(&self) -> &str

    Returns a string slice with leading whitespace removed.

    +
    1.30.0 · source

    pub fn trim_start(&self) -> &str

    Returns a string slice with leading whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

    Text directionality
    @@ -951,7 +954,7 @@
    Examples
    let s = " עברית "; assert!(Some('ע') == s.trim_start().chars().next());
    -
    1.30.0 · source

    pub fn trim_end(&self) -> &str

    Returns a string slice with trailing whitespace removed.

    +
    1.30.0 · source

    pub fn trim_end(&self) -> &str

    Returns a string slice with trailing whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

    Text directionality
    @@ -971,7 +974,7 @@
    Examples
    let s = " עברית "; assert!(Some('ת') == s.trim_end().chars().rev().next());
    -
    1.0.0 · source

    pub fn trim_left(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_start

    Returns a string slice with leading whitespace removed.

    +
    1.0.0 · source

    pub fn trim_left(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_start

    Returns a string slice with leading whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space.

    Text directionality
    @@ -992,7 +995,7 @@
    Examples
    let s = " עברית"; assert!(Some('ע') == s.trim_left().chars().next());
    -
    1.0.0 · source

    pub fn trim_right(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_end

    Returns a string slice with trailing whitespace removed.

    +
    1.0.0 · source

    pub fn trim_right(&self) -> &str

    👎Deprecated since 1.33.0: superseded by trim_end

    Returns a string slice with trailing whitespace removed.

    ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space.

    Text directionality
    @@ -1013,11 +1016,11 @@
    Examples
    let s = "עברית "; assert!(Some('ת') == s.trim_right().chars().rev().next());
    -
    1.0.0 · source

    pub fn trim_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: DoubleEndedSearcher<'a>,

    Returns a string slice with all prefixes and suffixes that match a +

    1.0.0 · source

    pub fn trim_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: DoubleEndedSearcher<'a>,

    Returns a string slice with all prefixes and suffixes that match a pattern repeatedly removed.

    -

    The pattern can be a char, a slice of chars, or a function +

    The pattern can be a char, a slice of chars, or a function or closure that determines if a character matches.

    Examples

    Simple patterns:

    @@ -1030,10 +1033,10 @@
    Examples

    A more complex pattern, using a closure:

    assert_eq!("1foo1barXX".trim_matches(|c| c == '1' || c == 'X'), "foo1bar");
    -
    1.30.0 · source

    pub fn trim_start_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>,

    Returns a string slice with all prefixes that match a pattern +

    1.30.0 · source

    pub fn trim_start_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>,

    Returns a string slice with all prefixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. start in this context means the first @@ -1046,34 +1049,34 @@

    Examples
    let x: &[_] = &['1', '2']; assert_eq!("12foo1bar12".trim_start_matches(x), "foo1bar12");
    -
    1.45.0 · source

    pub fn strip_prefix<'a, P>(&'a self, prefix: P) -> Option<&'a str>where - P: Pattern<'a>,

    Returns a string slice with the prefix removed.

    +
    1.45.0 · source

    pub fn strip_prefix<'a, P>(&'a self, prefix: P) -> Option<&'a str>where + P: Pattern<'a>,

    Returns a string slice with the prefix removed.

    If the string starts with the pattern prefix, returns substring after the prefix, wrapped in Some. Unlike trim_start_matches, this method removes the prefix exactly once.

    If the string does not start with prefix, returns None.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    assert_eq!("foo:bar".strip_prefix("foo:"), Some("bar"));
     assert_eq!("foo:bar".strip_prefix("bar"), None);
     assert_eq!("foofoo".strip_prefix("foo"), Some("foo"));
    -
    1.45.0 · source

    pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with the suffix removed.

    +
    1.45.0 · source

    pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str>where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with the suffix removed.

    If the string ends with the pattern suffix, returns the substring before the suffix, wrapped in Some. Unlike trim_end_matches, this method removes the suffix exactly once.

    If the string does not end with suffix, returns None.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Examples
    assert_eq!("bar:foo".strip_suffix(":foo"), Some("bar"));
     assert_eq!("bar:foo".strip_suffix("bar"), None);
     assert_eq!("foofoo".strip_suffix("foo"), Some("foo"));
    -
    1.30.0 · source

    pub fn trim_end_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with all suffixes that match a pattern +

    1.30.0 · source

    pub fn trim_end_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    Returns a string slice with all suffixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. end in this context means the last @@ -1091,10 +1094,10 @@

    Examples

    A more complex pattern, using a closure:

    assert_eq!("1fooX".trim_end_matches(|c| c == '1' || c == 'X'), "1foo");
    -
    1.0.0 · source

    pub fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>,

    👎Deprecated since 1.33.0: superseded by trim_start_matches

    Returns a string slice with all prefixes that match a pattern +

    1.0.0 · source

    pub fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>,

    👎Deprecated since 1.33.0: superseded by trim_start_matches

    Returns a string slice with all prefixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. ‘Left’ in this context means the first @@ -1107,11 +1110,11 @@

    Examples
    let x: &[_] = &['1', '2']; assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
    -
    1.0.0 · source

    pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    👎Deprecated since 1.33.0: superseded by trim_end_matches

    Returns a string slice with all suffixes that match a pattern +

    1.0.0 · source

    pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a strwhere + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

    👎Deprecated since 1.33.0: superseded by trim_end_matches

    Returns a string slice with all suffixes that match a pattern repeatedly removed.

    -

    The pattern can be a &str, char, a slice of chars, or a +

    The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

    Text directionality

    A string is a sequence of bytes. ‘Right’ in this context means the last @@ -1129,16 +1132,16 @@

    Examples

    A more complex pattern, using a closure:

    assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
    -
    1.0.0 · source

    pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err>where - F: FromStr,

    Parses this string slice into another type.

    +
    1.0.0 · source

    pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err>where + F: FromStr,

    Parses this string slice into another type.

    Because parse is so general, it can cause problems with type inference. As such, parse is one of the few times you’ll see the syntax affectionately known as the ‘turbofish’: ::<>. This helps the inference algorithm understand specifically which type you’re trying to parse into.

    -

    parse can parse into any type that implements the FromStr trait.

    +

    parse can parse into any type that implements the FromStr trait.

    Errors
    -

    Will return Err if it’s not possible to parse this string slice into +

    Will return Err if it’s not possible to parse this string slice into the desired type.

    Examples

    Basic usage

    @@ -1156,23 +1159,23 @@
    Examples
    let nope = "j".parse::<u32>();
     
     assert!(nope.is_err());
    -
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all characters in this string are within the ASCII range.

    +
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all characters in this string are within the ASCII range.

    Examples
    let ascii = "hello!\n";
     let non_ascii = "Grüße, Jürgen ❤";
     
     assert!(ascii.is_ascii());
     assert!(!non_ascii.is_ascii());
    -
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this string slice is_ascii, returns it as a slice -of ASCII characters, otherwise returns None.

    -
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &str) -> bool

    Checks that two strings are an ASCII case-insensitive match.

    +
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this string slice is_ascii, returns it as a slice +of ASCII characters, otherwise returns None.

    +
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &str) -> bool

    Checks that two strings are an ASCII case-insensitive match.

    Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), but without allocating and copying temporaries.

    Examples
    assert!("Ferris".eq_ignore_ascii_case("FERRIS"));
     assert!("Ferrös".eq_ignore_ascii_case("FERRöS"));
     assert!(!"Ferrös".eq_ignore_ascii_case("FERRÖS"));
    -
    1.23.0 · source

    pub fn make_ascii_uppercase(&mut self)

    Converts this string to its ASCII upper case equivalent in-place.

    +
    1.23.0 · source

    pub fn make_ascii_uppercase(&mut self)

    Converts this string to its ASCII upper case equivalent in-place.

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

    To return a new uppercased value without modifying the existing one, use @@ -1183,7 +1186,7 @@

    Examples
    s.make_ascii_uppercase(); assert_eq!("GRüßE, JüRGEN ❤", s);
    -
    1.23.0 · source

    pub fn make_ascii_lowercase(&mut self)

    Converts this string to its ASCII lower case equivalent in-place.

    +
    1.23.0 · source

    pub fn make_ascii_lowercase(&mut self)

    Converts this string to its ASCII lower case equivalent in-place.

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

    To return a new lowercased value without modifying the existing one, use @@ -1194,7 +1197,7 @@

    Examples
    s.make_ascii_lowercase(); assert_eq!("grÜße, jÜrgen ❤", s);
    -
    1.34.0 · source

    pub fn escape_debug(&self) -> EscapeDebug<'_>

    Return an iterator that escapes each char in self with char::escape_debug.

    +
    1.34.0 · source

    pub fn escape_debug(&self) -> EscapeDebug<'_>

    Return an iterator that escapes each char in self with char::escape_debug.

    Note: only extended grapheme codepoints that begin the string will be escaped.

    Examples
    @@ -1213,7 +1216,7 @@
    Examples

    Using to_string:

    assert_eq!("❤\n!".escape_debug().to_string(), "❤\\n!");
    -
    1.34.0 · source

    pub fn escape_default(&self) -> EscapeDefault<'_>

    Return an iterator that escapes each char in self with char::escape_default.

    +
    1.34.0 · source

    pub fn escape_default(&self) -> EscapeDefault<'_>

    Return an iterator that escapes each char in self with char::escape_default.

    Examples

    As an iterator:

    @@ -1230,7 +1233,7 @@
    Examples

    Using to_string:

    assert_eq!("❤\n!".escape_default().to_string(), "\\u{2764}\\n!");
    -
    1.34.0 · source

    pub fn escape_unicode(&self) -> EscapeUnicode<'_>

    Return an iterator that escapes each char in self with char::escape_unicode.

    +
    1.34.0 · source

    pub fn escape_unicode(&self) -> EscapeUnicode<'_>

    Return an iterator that escapes each char in self with char::escape_unicode.

    Examples

    As an iterator:

    @@ -1247,9 +1250,9 @@
    Examples

    Using to_string:

    assert_eq!("❤\n!".escape_unicode().to_string(), "\\u{2764}\\u{a}\\u{21}");
    -
    1.0.0 · source

    pub fn replace<'a, P>(&'a self, from: P, to: &str) -> Stringwhere - P: Pattern<'a>,

    Replaces all matches of a pattern with another string.

    -

    replace creates a new String, and copies the data from this string slice into it. +

    1.0.0 · source

    pub fn replace<'a, P>(&'a self, from: P, to: &str) -> Stringwhere + P: Pattern<'a>,

    Replaces all matches of a pattern with another string.

    +

    replace creates a new String, and copies the data from this string slice into it. While doing so, it attempts to find matches of a pattern. If it finds any, it replaces them with the replacement string slice.

    Examples
    @@ -1259,13 +1262,13 @@
    Examples
    assert_eq!("this is new", s.replace("old", "new")); assert_eq!("than an old", s.replace("is", "an"));
    -

    When the pattern doesn’t match, it returns this string slice as String:

    +

    When the pattern doesn’t match, it returns this string slice as String:

    let s = "this is old";
     assert_eq!(s, s.replace("cookie monster", "little lamb"));
    -
    1.16.0 · source

    pub fn replacen<'a, P>(&'a self, pat: P, to: &str, count: usize) -> Stringwhere - P: Pattern<'a>,

    Replaces first N matches of a pattern with another string.

    -

    replacen creates a new String, and copies the data from this string slice into it. +

    1.16.0 · source

    pub fn replacen<'a, P>(&'a self, pat: P, to: &str, count: usize) -> Stringwhere + P: Pattern<'a>,

    Replaces first N matches of a pattern with another string.

    +

    replacen creates a new String, and copies the data from this string slice into it. While doing so, it attempts to find matches of a pattern. If it finds any, it replaces them with the replacement string slice at most count times.

    Examples
    @@ -1275,15 +1278,15 @@
    Examples
    assert_eq!("new new 123 foo", s.replacen("foo", "new", 2)); assert_eq!("faa fao 123 foo", s.replacen('o', "a", 3)); assert_eq!("foo foo new23 foo", s.replacen(char::is_numeric, "new", 1));
    -

    When the pattern doesn’t match, it returns this string slice as String:

    +

    When the pattern doesn’t match, it returns this string slice as String:

    let s = "this is old";
     assert_eq!(s, s.replacen("cookie monster", "little lamb", 10));
    -
    1.2.0 · source

    pub fn to_lowercase(&self) -> String

    Returns the lowercase equivalent of this string slice, as a new String.

    +
    1.2.0 · source

    pub fn to_lowercase(&self) -> String

    Returns the lowercase equivalent of this string slice, as a new String.

    ‘Lowercase’ is defined according to the terms of the Unicode Derived Core Property Lowercase.

    Since some characters can expand into multiple characters when changing -the case, this function returns a String instead of modifying the +the case, this function returns a String instead of modifying the parameter in-place.

    Examples

    Basic usage:

    @@ -1306,11 +1309,11 @@
    Examples
    let new_year = "农历新年";
     
     assert_eq!(new_year, new_year.to_lowercase());
    -
    1.2.0 · source

    pub fn to_uppercase(&self) -> String

    Returns the uppercase equivalent of this string slice, as a new String.

    +
    1.2.0 · source

    pub fn to_uppercase(&self) -> String

    Returns the uppercase equivalent of this string slice, as a new String.

    ‘Uppercase’ is defined according to the terms of the Unicode Derived Core Property Uppercase.

    Since some characters can expand into multiple characters when changing -the case, this function returns a String instead of modifying the +the case, this function returns a String instead of modifying the parameter in-place.

    Examples

    Basic usage:

    @@ -1328,8 +1331,8 @@
    Examples
    let s = "tschüß";
     
     assert_eq!("TSCHÜSS", s.to_uppercase());
    -
    1.16.0 · source

    pub fn repeat(&self, n: usize) -> String

    Creates a new String by repeating a string n times.

    -
    Panics
    +
    1.16.0 · source

    pub fn repeat(&self, n: usize) -> String

    Creates a new String by repeating a string n times.

    +
    Panics

    This function will panic if the capacity would overflow.

    Examples

    Basic usage:

    @@ -1339,98 +1342,98 @@
    Examples
    // this will panic at runtime
     let huge = "0123456789abcdef".repeat(usize::MAX);
    -
    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> String

    Returns a copy of this string where each character is mapped to its +

    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> String

    Returns a copy of this string where each character is mapped to its ASCII upper case equivalent.

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

    -

    To uppercase the value in-place, use make_ascii_uppercase.

    +

    To uppercase the value in-place, use make_ascii_uppercase.

    To uppercase ASCII characters in addition to non-ASCII characters, use to_uppercase.

    Examples
    let s = "Grüße, Jürgen ❤";
     
     assert_eq!("GRüßE, JüRGEN ❤", s.to_ascii_uppercase());
    -
    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> String

    Returns a copy of this string where each character is mapped to its +

    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> String

    Returns a copy of this string where each character is mapped to its ASCII lower case equivalent.

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

    -

    To lowercase the value in-place, use make_ascii_lowercase.

    +

    To lowercase the value in-place, use make_ascii_lowercase.

    To lowercase ASCII characters in addition to non-ASCII characters, use to_lowercase.

    Examples
    let s = "Grüße, Jürgen ❤";
     
     assert_eq!("grüße, jürgen ❤", s.to_ascii_lowercase());
    -

    Trait Implementations§

    §

    impl Add<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +

    Trait Implementations§

    §

    impl Add<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: &ImmutableString -) -> <&ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +) -> <&ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: &ImmutableString -) -> <ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <&ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +) -> <ImmutableString as Add<&ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <&ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: &str) -> <ImmutableString as Add<&str>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: ImmutableString -) -> <&ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( +) -> <&ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add( self, rhs: ImmutableString -) -> <ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <&ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <&ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<&ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<&str> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &str)

    Performs the += operation. Read more
    §

    impl AddAssign<ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<String> for ImmutableString

    §

    fn add_assign(&mut self, rhs: String)

    Performs the += operation. Read more
    §

    impl AddAssign<char> for ImmutableString

    §

    fn add_assign(&mut self, rhs: char)

    Performs the += operation. Read more
    §

    impl AsRef<SmartString<LazyCompact>> for ImmutableString

    §

    fn as_ref(&self) -> &SmartString<LazyCompact>

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl AsRef<str> for ImmutableString

    §

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<SmartString<LazyCompact>> for ImmutableString

    §

    fn borrow(&self) -> &SmartString<LazyCompact>

    Immutably borrows from an owned value. Read more
    §

    impl Borrow<str> for ImmutableString

    §

    fn borrow(&self) -> &str

    Immutably borrows from an owned value. Read more
    §

    impl Clone for ImmutableString

    §

    fn clone(&self) -> ImmutableString

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for ImmutableString

    §

    fn default() -> ImmutableString

    Returns the “default value” for a type. Read more
    §

    impl Deref for ImmutableString

    §

    type Target = SmartString<LazyCompact>

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<ImmutableString as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for ImmutableString

    §

    fn deserialize<D>( +) -> <ImmutableString as Add<ImmutableString>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <&ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: String) -> <ImmutableString as Add<String>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <&ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl Add<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: char) -> <ImmutableString as Add<char>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<&ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<&str> for ImmutableString

    §

    fn add_assign(&mut self, rhs: &str)

    Performs the += operation. Read more
    §

    impl AddAssign<ImmutableString> for ImmutableString

    §

    fn add_assign(&mut self, rhs: ImmutableString)

    Performs the += operation. Read more
    §

    impl AddAssign<String> for ImmutableString

    §

    fn add_assign(&mut self, rhs: String)

    Performs the += operation. Read more
    §

    impl AddAssign<char> for ImmutableString

    §

    fn add_assign(&mut self, rhs: char)

    Performs the += operation. Read more
    §

    impl AsRef<SmartString<LazyCompact>> for ImmutableString

    §

    fn as_ref(&self) -> &SmartString<LazyCompact>

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl AsRef<str> for ImmutableString

    §

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<SmartString<LazyCompact>> for ImmutableString

    §

    fn borrow(&self) -> &SmartString<LazyCompact>

    Immutably borrows from an owned value. Read more
    §

    impl Borrow<str> for ImmutableString

    §

    fn borrow(&self) -> &str

    Immutably borrows from an owned value. Read more
    §

    impl Clone for ImmutableString

    §

    fn clone(&self) -> ImmutableString

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for ImmutableString

    §

    fn default() -> ImmutableString

    Returns the “default value” for a type. Read more
    §

    impl Deref for ImmutableString

    §

    type Target = SmartString<LazyCompact>

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<ImmutableString as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for ImmutableString

    §

    fn deserialize<D>( deserializer: D -) -> Result<ImmutableString, <D as Deserializer<'de>>::Error>where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: &ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<&SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: &SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&String> for ImmutableString

    §

    fn from(value: &String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&str> for ImmutableString

    §

    fn from(value: &str) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<Box<str, Global>> for ImmutableString

    §

    fn from(value: Box<str, Global>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<String> for ImmutableString

    §

    fn from(value: String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl<'a> FromIterator<&'a char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = &'a char>,

    Creates a value from an iterator. Read more
    §

    impl<'a> FromIterator<&'a str> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = &'a str>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<SmartString<LazyCompact>> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = SmartString<LazyCompact>>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<String> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = String>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere - T: IntoIterator<Item = char>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for ImmutableString

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str( - s: &str -) -> Result<ImmutableString, <ImmutableString as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for ImmutableString

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for ImmutableString

    §

    fn cmp(&self, other: &ImmutableString) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<ImmutableString> for str

    §

    fn eq(&self, other: &ImmutableString) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl<S> PartialEq<S> for ImmutableStringwhere - S: AsRef<str>,

    §

    fn eq(&self, other: &S) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<ImmutableString> for str

    §

    fn partial_cmp(&self, other: &ImmutableString) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    §

    impl<S> PartialOrd<S> for ImmutableStringwhere - S: AsRef<str>,

    §

    fn partial_cmp(&self, other: &S) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    §

    impl Serialize for ImmutableString

    §

    fn serialize<S>( +) -> Result<ImmutableString, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for ImmutableString

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<&ImmutableString> for Dynamic

    §

    fn from(value: &ImmutableString) -> Dynamic

    Converts to this type from the input type.
    §

    impl From<&ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: &ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<&SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: &SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&String> for ImmutableString

    §

    fn from(value: &String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<&str> for ImmutableString

    §

    fn from(value: &str) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<Box<str, Global>> for ImmutableString

    §

    fn from(value: Box<str, Global>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<ImmutableString> for SmartString<LazyCompact>

    §

    fn from(value: ImmutableString) -> SmartString<LazyCompact>

    Converts to this type from the input type.
    §

    impl From<SmartString<LazyCompact>> for ImmutableString

    §

    fn from(value: SmartString<LazyCompact>) -> ImmutableString

    Converts to this type from the input type.
    §

    impl From<String> for ImmutableString

    §

    fn from(value: String) -> ImmutableString

    Converts to this type from the input type.
    §

    impl<'a> FromIterator<&'a char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = &'a char>,

    Creates a value from an iterator. Read more
    §

    impl<'a> FromIterator<&'a str> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = &'a str>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<SmartString<LazyCompact>> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = SmartString<LazyCompact>>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<String> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = String>,

    Creates a value from an iterator. Read more
    §

    impl FromIterator<char> for ImmutableString

    §

    fn from_iter<T>(iter: T) -> ImmutableStringwhere + T: IntoIterator<Item = char>,

    Creates a value from an iterator. Read more
    §

    impl FromStr for ImmutableString

    §

    type Err = ()

    The associated error which can be returned from parsing.
    §

    fn from_str( + s: &str +) -> Result<ImmutableString, <ImmutableString as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Hash for ImmutableString

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for ImmutableString

    §

    fn cmp(&self, other: &ImmutableString) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<ImmutableString> for str

    §

    fn eq(&self, other: &ImmutableString) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl<S> PartialEq<S> for ImmutableStringwhere + S: AsRef<str>,

    §

    fn eq(&self, other: &S) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<ImmutableString> for str

    §

    fn partial_cmp(&self, other: &ImmutableString) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    §

    impl<S> PartialOrd<S> for ImmutableStringwhere + S: AsRef<str>,

    §

    fn partial_cmp(&self, other: &S) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    §

    impl Serialize for ImmutableString

    §

    fn serialize<S>( &self, ser: S -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl Sub<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl Sub<&ImmutableString> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( self, rhs: &ImmutableString -) -> <&ImmutableString as Sub<&ImmutableString>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <&ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( +) -> <&ImmutableString as Sub<&ImmutableString>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <&ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<&str> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: &str) -> <ImmutableString as Sub<&str>>::Output

    Performs the - operation. Read more
    §

    impl Sub<ImmutableString> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub( self, rhs: ImmutableString -) -> <ImmutableString as Sub<ImmutableString>>::Output

    Performs the - operation. Read more
    §

    impl Sub<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <&ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <&ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl SubAssign<&ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<&str> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &str)

    Performs the -= operation. Read more
    §

    impl SubAssign<ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<String> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: String)

    Performs the -= operation. Read more
    §

    impl SubAssign<char> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: char)

    Performs the -= operation. Read more
    §

    impl TryFrom<ImmutableString> for FnPtr

    §

    type Error = Box<EvalAltResult, Global>

    The type returned in the event of a conversion error.
    §

    fn try_from(value: ImmutableString) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Performs the conversion.
    §

    impl Eq for ImmutableString

    §

    impl StructuralEq for ImmutableString

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> <ImmutableString as Sub<ImmutableString>>::Output
    Performs the - operation. Read more
    §

    impl Sub<String> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <&ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<String> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: String) -> <ImmutableString as Sub<String>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for &ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <&ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl Sub<char> for ImmutableString

    §

    type Output = ImmutableString

    The resulting type after applying the - operator.
    §

    fn sub(self, rhs: char) -> <ImmutableString as Sub<char>>::Output

    Performs the - operation. Read more
    §

    impl SubAssign<&ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<&str> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: &str)

    Performs the -= operation. Read more
    §

    impl SubAssign<ImmutableString> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: ImmutableString)

    Performs the -= operation. Read more
    §

    impl SubAssign<String> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: String)

    Performs the -= operation. Read more
    §

    impl SubAssign<char> for ImmutableString

    §

    fn sub_assign(&mut self, rhs: char)

    Performs the -= operation. Read more
    §

    impl TryFrom<ImmutableString> for FnPtr

    §

    type Error = Box<EvalAltResult, Global>

    The type returned in the event of a conversion error.
    §

    fn try_from(value: ImmutableString) -> Result<FnPtr, Box<EvalAltResult, Global>>

    Performs the conversion.
    §

    impl Eq for ImmutableString

    §

    impl StructuralEq for ImmutableString

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere - M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere + M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    \ No newline at end of file diff --git a/casbin/rhai/struct.Instant.html b/casbin/rhai/struct.Instant.html index e297c3e6..ac6e9770 100644 --- a/casbin/rhai/struct.Instant.html +++ b/casbin/rhai/struct.Instant.html @@ -1,5 +1,5 @@ -Instant in casbin::rhai - Rust

    Struct casbin::rhai::Instant

    1.8.0 · source ·
    pub struct Instant(_);
    Expand description

    A measurement of a monotonically nondecreasing clock. -Opaque and useful only with Duration.

    +Instant in casbin::rhai - Rust

    Struct casbin::rhai::Instant

    1.8.0 · source ·
    pub struct Instant(/* private fields */);
    Expand description

    A measurement of a monotonically nondecreasing clock. +Opaque and useful only with Duration.

    Instants are always guaranteed, barring platform bugs, to be no less than any previously measured instant when created, and are often useful for tasks such as measuring benchmarks or timing how long an operation takes.

    @@ -7,7 +7,9 @@ words, each tick of the underlying clock might not be the same length (e.g. some seconds may be longer than others). An instant may jump forwards or experience time dilation (slow down or speed up), but it will never go -backwards.

    +backwards. +As part of this non-guarantee it is also not specified whether system suspends count as +elapsed time or not. The behavior varies across platforms and rust versions.

    Instants are opaque types that can only be compared to one another. There is no method to get “the number of seconds” from an instant. Instead, it only allows measuring the duration between two instants (or comparing two @@ -39,7 +41,7 @@

    OS-specific beha let duration = Duration::new(max_seconds, 0); println!("{:?}", now + duration);

    Underlying System calls

    -

    The following system calls are currently being used by now() to find out +

    The following system calls are currently being used by now() to find out the current time:

    @@ -66,12 +68,12 @@

    Monotonicity

    where monotonicity is violated, or Instants are subtracted in the wrong order.

    This workaround obscures programming errors where earlier and later instants are accidentally swapped. For this reason future rust versions may reintroduce panics.

    -

    Implementations§

    source§

    impl Instant

    source

    pub fn now() -> Instant

    Returns an instant corresponding to “now”.

    +

    Implementations§

    source§

    impl Instant

    source

    pub fn now() -> Instant

    Returns an instant corresponding to “now”.

    Examples
    use std::time::Instant;
     
     let now = Instant::now();
    -
    source

    pub fn duration_since(&self, earlier: Instant) -> Duration

    Returns the amount of time elapsed from another instant to this one, +

    source

    pub fn duration_since(&self, earlier: Instant) -> Duration

    Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

    Panics

    Previous rust versions panicked when earlier was later than self. Currently this @@ -86,7 +88,7 @@

    Examples
    let new_now = Instant::now(); println!("{:?}", new_now.duration_since(now)); println!("{:?}", now.duration_since(new_now)); // 0ns
    -
    1.39.0 · source

    pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>

    Returns the amount of time elapsed from another instant to this one, +

    1.39.0 · source

    pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>

    Returns the amount of time elapsed from another instant to this one, or None if that instant is later than this one.

    Due to monotonicity bugs, even under correct logical ordering of the passed Instants, this method can return None.

    @@ -99,7 +101,7 @@
    Examples
    let new_now = Instant::now(); println!("{:?}", new_now.checked_duration_since(now)); println!("{:?}", now.checked_duration_since(new_now)); // None
    -
    1.39.0 · source

    pub fn saturating_duration_since(&self, earlier: Instant) -> Duration

    Returns the amount of time elapsed from another instant to this one, +

    1.39.0 · source

    pub fn saturating_duration_since(&self, earlier: Instant) -> Duration

    Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

    Examples
    use std::time::{Duration, Instant};
    @@ -110,7 +112,7 @@ 
    Examples
    let new_now = Instant::now(); println!("{:?}", new_now.saturating_duration_since(now)); println!("{:?}", now.saturating_duration_since(new_now)); // 0ns
    -
    source

    pub fn elapsed(&self) -> Duration

    Returns the amount of time elapsed since this instant.

    +
    source

    pub fn elapsed(&self) -> Duration

    Returns the amount of time elapsed since this instant.

    Panics

    Previous rust versions panicked when the current time was earlier than self. Currently this method returns a Duration of zero in that case. Future versions may reintroduce the panic. @@ -123,51 +125,51 @@

    Examples
    let three_secs = Duration::from_secs(3); sleep(three_secs); assert!(instant.elapsed() >= three_secs);
    -
    1.34.0 · source

    pub fn checked_add(&self, duration: Duration) -> Option<Instant>

    Returns Some(t) where t is the time self + duration if t can be represented as +

    1.34.0 · source

    pub fn checked_add(&self, duration: Duration) -> Option<Instant>

    Returns Some(t) where t is the time self + duration if t can be represented as Instant (which means it’s inside the bounds of the underlying data structure), None otherwise.

    -
    1.34.0 · source

    pub fn checked_sub(&self, duration: Duration) -> Option<Instant>

    Returns Some(t) where t is the time self - duration if t can be represented as +

    1.34.0 · source

    pub fn checked_sub(&self, duration: Duration) -> Option<Instant>

    Returns Some(t) where t is the time self - duration if t can be represented as Instant (which means it’s inside the bounds of the underlying data structure), None otherwise.

    -

    Trait Implementations§

    Trait Implementations§

    source§

    impl Add<Duration> for Instant

    source§

    fn add(self, other: Duration) -> Instant

    Panics

    This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

    -
    §

    type Output = Instant

    The resulting type after applying the + operator.
    1.9.0 · source§

    impl AddAssign<Duration> for Instant

    source§

    fn add_assign(&mut self, other: Duration)

    Performs the += operation. Read more
    source§

    impl Clone for Instant

    source§

    fn clone(&self) -> Instant

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Instant

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<Instant> for Dynamic

    §

    fn from(value: Instant) -> Dynamic

    Converts to this type from the input type.
    source§

    impl Hash for Instant

    source§

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl Ord for Instant

    source§

    fn cmp(&self, other: &Instant) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    source§

    impl PartialEq<Instant> for Instant

    source§

    fn eq(&self, other: &Instant) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialOrd<Instant> for Instant

    source§

    fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl Sub<Duration> for Instant

    §

    type Output = Instant

    The resulting type after applying the - operator.
    source§

    fn sub(self, other: Duration) -> Instant

    Performs the - operation. Read more
    source§

    impl Sub<Instant> for Instant

    source§

    fn sub(self, other: Instant) -> Duration

    Returns the amount of time elapsed from another instant to this one, +

    §

    type Output = Instant

    The resulting type after applying the + operator.
    1.9.0 · source§

    impl AddAssign<Duration> for Instant

    source§

    fn add_assign(&mut self, other: Duration)

    Performs the += operation. Read more
    source§

    impl Clone for Instant

    source§

    fn clone(&self) -> Instant

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Instant

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<Instant> for Dynamic

    §

    fn from(value: Instant) -> Dynamic

    Converts to this type from the input type.
    source§

    impl Hash for Instant

    source§

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl Ord for Instant

    source§

    fn cmp(&self, other: &Instant) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    source§

    impl PartialEq<Instant> for Instant

    source§

    fn eq(&self, other: &Instant) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialOrd<Instant> for Instant

    source§

    fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl Sub<Duration> for Instant

    §

    type Output = Instant

    The resulting type after applying the - operator.
    source§

    fn sub(self, other: Duration) -> Instant

    Performs the - operation. Read more
    source§

    impl Sub<Instant> for Instant

    source§

    fn sub(self, other: Instant) -> Duration

    Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

    Panics

    Previous rust versions panicked when other was later than self. Currently this method saturates. Future versions may reintroduce the panic in some circumstances. See Monotonicity.

    -
    §

    type Output = Duration

    The resulting type after applying the - operator.
    1.9.0 · source§

    impl SubAssign<Duration> for Instant

    source§

    fn sub_assign(&mut self, other: Duration)

    Performs the -= operation. Read more
    source§

    impl Copy for Instant

    source§

    impl Eq for Instant

    source§

    impl StructuralEq for Instant

    source§

    impl StructuralPartialEq for Instant

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +
    §

    type Output = Duration

    The resulting type after applying the - operator.
    1.9.0 · source§

    impl SubAssign<Duration> for Instant

    source§

    fn sub_assign(&mut self, other: Duration)

    Performs the -= operation. Read more
    source§

    impl Copy for Instant

    source§

    impl Eq for Instant

    source§

    impl StructuralEq for Instant

    source§

    impl StructuralPartialEq for Instant

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

    \ No newline at end of file diff --git a/casbin/rhai/struct.Locked.html b/casbin/rhai/struct.Locked.html index 22dd3853..3f8b2659 100644 --- a/casbin/rhai/struct.Locked.html +++ b/casbin/rhai/struct.Locked.html @@ -1,10 +1,10 @@ -Locked in casbin::rhai - Rust

    Struct casbin::rhai::Locked

    1.0.0 · source ·
    pub struct Locked<T>where
    -    T: ?Sized,{ /* private fields */ }
    Expand description

    A reader-writer lock

    +Locked in casbin::rhai - Rust

    Struct casbin::rhai::Locked

    1.0.0 · source ·
    pub struct Locked<T>where
    +    T: ?Sized,{ /* private fields */ }
    Expand description

    A reader-writer lock

    This type of lock allows a number of readers or at most one writer at any point in time. The write portion of this lock typically allows modification of the underlying data (exclusive access) and the read portion of this lock typically allows for read-only access (shared access).

    -

    In comparison, a Mutex does not distinguish between readers or writers +

    In comparison, a Mutex does not distinguish between readers or writers that acquire the lock, therefore blocking any threads waiting for the lock to become available. An RwLock will allow any number of readers to acquire the lock as long as a writer is not holding the lock.

    @@ -22,12 +22,12 @@ let _rg = lock.read(); |

    The type parameter T represents the data that this lock protects. It is -required that T satisfies Send to be shared across threads and -Sync to allow concurrent access through readers. The RAII guards -returned from the locking methods implement Deref (and DerefMut +required that T satisfies Send to be shared across threads and +Sync to allow concurrent access through readers. The RAII guards +returned from the locking methods implement Deref (and DerefMut for the write methods) to allow access to the content of the lock.

    Poisoning

    -

    An RwLock, like Mutex, will become poisoned on a panic. Note, however, +

    An RwLock, like Mutex, will become poisoned on a panic. Note, however, that an RwLock may only be poisoned if a panic occurs while it is locked exclusively (write mode). If a panic occurs in any reader, then the lock will not be poisoned.

    @@ -50,15 +50,15 @@

    Examples

    *w += 1; assert_eq!(*w, 6); } // write lock is dropped here
    -

    Implementations§

    source§

    impl<T> RwLock<T>

    const: 1.63.0 · source

    pub const fn new(t: T) -> RwLock<T>

    Creates a new instance of an RwLock<T> which is unlocked.

    +

    Implementations§

    source§

    impl<T> RwLock<T>

    const: 1.63.0 · source

    pub const fn new(t: T) -> RwLock<T>

    Creates a new instance of an RwLock<T> which is unlocked.

    Examples
    use std::sync::RwLock;
     
     let lock = RwLock::new(5);
    -
    source§

    impl<T> RwLock<T>where - T: ?Sized,

    source

    pub fn read( +

    source§

    impl<T> RwLock<T>where + T: ?Sized,

    source

    pub fn read( &self -) -> Result<RwLockReadGuard<'_, T>, PoisonError<RwLockReadGuard<'_, T>>>

    Locks this RwLock with shared read access, blocking the current thread +) -> Result<RwLockReadGuard<'_, T>, PoisonError<RwLockReadGuard<'_, T>>>

    Locks this RwLock with shared read access, blocking the current thread until it can be acquired.

    The calling thread will be blocked until there are no more writers which hold the lock. There may be other readers currently inside the lock when @@ -88,9 +88,9 @@

    Examples
    let r = c_lock.read(); assert!(r.is_ok()); }).join().unwrap();
    -
    source

    pub fn try_read( +

    source

    pub fn try_read( &self -) -> Result<RwLockReadGuard<'_, T>, TryLockError<RwLockReadGuard<'_, T>>>

    Attempts to acquire this RwLock with shared read access.

    +) -> Result<RwLockReadGuard<'_, T>, TryLockError<RwLockReadGuard<'_, T>>>

    Attempts to acquire this RwLock with shared read access.

    If the access could not be granted at this time, then Err is returned. Otherwise, an RAII guard is returned which will release the shared access when it is dropped.

    @@ -98,11 +98,11 @@
    Examples

    This function does not provide any guarantees with respect to the ordering of whether contentious readers or writers will acquire the lock first.

    Errors
    -

    This function will return the Poisoned error if the RwLock is +

    This function will return the Poisoned error if the RwLock is poisoned. An RwLock is poisoned whenever a writer panics while holding an exclusive lock. Poisoned will only be returned if the lock would have otherwise been acquired.

    -

    This function will return the WouldBlock error if the RwLock could +

    This function will return the WouldBlock error if the RwLock could not be acquired because it was already locked exclusively.

    Examples
    use std::sync::RwLock;
    @@ -113,9 +113,9 @@ 
    Examples
    Ok(n) => assert_eq!(*n, 1), Err(_) => unreachable!(), };
    -
    source

    pub fn write( +

    source

    pub fn write( &self -) -> Result<RwLockWriteGuard<'_, T>, PoisonError<RwLockWriteGuard<'_, T>>>

    Locks this RwLock with exclusive write access, blocking the current +) -> Result<RwLockWriteGuard<'_, T>, PoisonError<RwLockWriteGuard<'_, T>>>

    Locks this RwLock with exclusive write access, blocking the current thread until it can be acquired.

    This function will not return while other writers or other readers currently have access to the lock.

    @@ -136,9 +136,9 @@
    Examples
    *n = 2; assert!(lock.try_read().is_err());
    -
    source

    pub fn try_write( +

    source

    pub fn try_write( &self -) -> Result<RwLockWriteGuard<'_, T>, TryLockError<RwLockWriteGuard<'_, T>>>

    Attempts to lock this RwLock with exclusive write access.

    +) -> Result<RwLockWriteGuard<'_, T>, TryLockError<RwLockWriteGuard<'_, T>>>

    Attempts to lock this RwLock with exclusive write access.

    If the lock could not be acquired at this time, then Err is returned. Otherwise, an RAII guard is returned which will release the lock when it is dropped.

    @@ -146,11 +146,11 @@
    Examples

    This function does not provide any guarantees with respect to the ordering of whether contentious readers or writers will acquire the lock first.

    Errors
    -

    This function will return the Poisoned error if the RwLock is +

    This function will return the Poisoned error if the RwLock is poisoned. An RwLock is poisoned whenever a writer panics while holding an exclusive lock. Poisoned will only be returned if the lock would have otherwise been acquired.

    -

    This function will return the WouldBlock error if the RwLock could +

    This function will return the WouldBlock error if the RwLock could not be acquired because it was already locked exclusively.

    Examples
    use std::sync::RwLock;
    @@ -161,7 +161,7 @@ 
    Examples
    assert_eq!(*n, 1); assert!(lock.try_write().is_err());
    -
    1.2.0 · source

    pub fn is_poisoned(&self) -> bool

    Determines whether the lock is poisoned.

    +
    1.2.0 · source

    pub fn is_poisoned(&self) -> bool

    Determines whether the lock is poisoned.

    If another thread is active, the lock can still become poisoned at any time. You should not trust a false value for program correctness without additional synchronization.

    @@ -177,7 +177,7 @@
    Examples
    panic!(); // the lock gets poisoned }).join(); assert_eq!(lock.is_poisoned(), true);
    -
    source

    pub fn clear_poison(&self)

    🔬This is a nightly-only experimental API. (mutex_unpoison)

    Clear the poisoned state from a lock

    +
    source

    pub fn clear_poison(&self)

    🔬This is a nightly-only experimental API. (mutex_unpoison)

    Clear the poisoned state from a lock

    If the lock is poisoned, it will remain poisoned until this function is called. This allows recovering from a poisoned state and marking that it has recovered. For example, if the value is overwritten by a known-good value, then the mutex can be marked as un-poisoned. Or @@ -205,7 +205,7 @@

    Examples
    }); assert_eq!(lock.is_poisoned(), false); assert_eq!(*guard, 1);
    -
    1.6.0 · source

    pub fn into_inner(self) -> Result<T, PoisonError<T>>

    Consumes this RwLock, returning the underlying data.

    +
    1.6.0 · source

    pub fn into_inner(self) -> Result<T, PoisonError<T>>

    Consumes this RwLock, returning the underlying data.

    Errors

    This function will return an error if the RwLock is poisoned. An RwLock is poisoned whenever a writer panics while holding an exclusive @@ -220,7 +220,7 @@

    Examples
    *s = "modified".to_owned(); } assert_eq!(lock.into_inner().unwrap(), "modified");
    -
    1.6.0 · source

    pub fn get_mut(&mut self) -> Result<&mut T, PoisonError<&mut T>>

    Returns a mutable reference to the underlying data.

    +
    1.6.0 · source

    pub fn get_mut(&mut self) -> Result<&mut T, PoisonError<&mut T>>

    Returns a mutable reference to the underlying data.

    Since this call borrows the RwLock mutably, no actual locking needs to take place – the mutable borrow statically guarantees no locks exist.

    Errors
    @@ -234,34 +234,34 @@
    Examples
    let mut lock = RwLock::new(0); *lock.get_mut().unwrap() = 10; assert_eq!(*lock.read().unwrap(), 10);
    -

    Trait Implementations§

    source§

    impl<T> Debug for RwLock<T>where - T: Debug + ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    1.10.0 · source§

    impl<T> Default for RwLock<T>where - T: Default,

    source§

    fn default() -> RwLock<T>

    Creates a new RwLock<T>, with the Default value for T.

    -
    source§

    impl<'de, T> Deserialize<'de> for RwLock<T>where - T: Deserialize<'de>,

    Trait Implementations§

    source§

    impl<T> Debug for RwLock<T>where + T: Debug + ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    1.10.0 · source§

    impl<T> Default for RwLock<T>where + T: Default,

    source§

    fn default() -> RwLock<T>

    Creates a new RwLock<T>, with the Default value for T.

    +
    source§

    impl<'de, T> Deserialize<'de> for RwLock<T>where + T: Deserialize<'de>,

    source§

    fn deserialize<D>( deserializer: D -) -> Result<RwLock<T>, <D as Deserializer<'de>>::Error>where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    1.24.0 · source§

    impl<T> From<T> for RwLock<T>

    source§

    fn from(t: T) -> RwLock<T>

    Creates a new instance of an RwLock<T> which is unlocked. +) -> Result<RwLock<T>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    1.24.0 · source§

    impl<T> From<T> for RwLock<T>

    source§

    fn from(t: T) -> RwLock<T>

    Creates a new instance of an RwLock<T> which is unlocked. This is equivalent to RwLock::new.

    -
    source§

    impl<T> Serialize for RwLock<T>where - T: Serialize + ?Sized,

    source§

    impl<T> Serialize for RwLock<T>where + T: Serialize + ?Sized,

    source§

    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
    1.12.0 · source§

    impl<T> RefUnwindSafe for RwLock<T>where - T: ?Sized,

    source§

    impl<T> Send for RwLock<T>where - T: Send + ?Sized,

    source§

    impl<T> Sync for RwLock<T>where - T: Send + Sync + ?Sized,

    1.9.0 · source§

    impl<T> UnwindSafe for RwLock<T>where - T: ?Sized,

    Auto Trait Implementations§

    §

    impl<T: ?Sized> Unpin for RwLock<T>where - T: Unpin,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<!> for T

    source§

    fn from(t: !) -> T

    Converts to this type from the input type.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,
    Serialize this value into the given Serde serializer. Read more
    1.12.0 · source§

    impl<T> RefUnwindSafe for RwLock<T>where + T: ?Sized,

    source§

    impl<T> Send for RwLock<T>where + T: Send + ?Sized,

    source§

    impl<T> Sync for RwLock<T>where + T: Send + Sync + ?Sized,

    1.9.0 · source§

    impl<T> UnwindSafe for RwLock<T>where + T: ?Sized,

    Auto Trait Implementations§

    §

    impl<T: ?Sized> Unpin for RwLock<T>where + T: Unpin,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<!> for T

    source§

    fn from(t: !) -> T

    Converts to this type from the input type.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

    \ No newline at end of file diff --git a/casbin/rhai/struct.Module.html b/casbin/rhai/struct.Module.html index bb77555f..f9a4e4f0 100644 --- a/casbin/rhai/struct.Module.html +++ b/casbin/rhai/struct.Module.html @@ -1,20 +1,26 @@ -Module in casbin::rhai - Rust

    Struct casbin::rhai::Module

    pub struct Module { /* private fields */ }
    Expand description

    A module which may contain variables, sub-modules, external Rust functions, +Module in casbin::rhai - Rust

    Struct casbin::rhai::Module

    pub struct Module { /* private fields */ }
    Expand description

    A module which may contain variables, sub-modules, external Rust functions, and/or script-defined functions.

    -

    Implementations§

    §

    impl Module

    pub fn with_capacity(_capacity: usize) -> Module

    👎Deprecated since 1.12.0: use new instead

    Create a new Module with a pre-sized capacity for functions.

    +

    Implementations§

    §

    impl Module

    pub const fn with_capacity(_capacity: usize) -> Module

    👎Deprecated since 1.12.0: use new instead

    Create a new Module with a pre-sized capacity for functions.

    Deprecated
    -

    This method is deprecated. Use new instead.

    +

    This method is deprecated. +Use new instead.

    +

    This method will be removed in the next major version.

    +

    pub fn get_custom_type(&self, type_name: &str) -> Option<&str>

    👎Deprecated since 1.16.0: use get_custom_type_display_by_name instead

    Get the display name of a registered custom type.

    +
    Deprecated
    +

    This method is deprecated. +Use get_custom_type_display_by_name instead.

    This method will be removed in the next major version.

    §

    impl Module

    pub const fn new() -> Module

    Create a new Module.

    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var_value::<i64>("answer").expect("answer should exist"), 42);
    -

    pub fn id(&self) -> Option<&str>

    Get the ID of the Module, if any.

    +

    pub fn id(&self) -> Option<&str>

    Get the ID of the Module, if any.

    Example
    let mut module = Module::new();
     module.set_id("hello");
     assert_eq!(module.id(), Some("hello"));
    -

    pub fn set_id(&mut self, id: impl Into<ImmutableString>) -> &mut Module

    Set the ID of the Module.

    +

    pub fn set_id(&mut self, id: impl Into<ImmutableString>) -> &mut Module

    Set the ID of the Module.

    If the string is empty, it is equivalent to clearing the ID.

    Example
    let mut module = Module::new();
    @@ -28,7 +34,7 @@ 
    Example
    module.clear_id(); assert_eq!(module.id(), None);

    pub fn clear(&mut self)

    Clear the Module.

    -

    pub fn set_custom_type<T>(&mut self, name: &str) -> &mut Module

    Map a custom type to a friendly display name.

    +

    pub fn set_custom_type<T>(&mut self, name: &str) -> &mut Module

    Map a custom type to a friendly display name.

    Example
    #[derive(Clone)]
     struct TestStruct;
    @@ -39,11 +45,11 @@ 
    Example
    module.set_custom_type::<TestStruct>("MyType"); -assert_eq!(module.get_custom_type(name), Some("MyType"));
    +assert_eq!(module.get_custom_type_display_by_name(name), Some("MyType"));

    pub fn set_custom_type_raw( &mut self, - type_path: impl Into<SmartString<LazyCompact>>, - name: impl Into<SmartString<LazyCompact>> + type_name: impl Into<SmartString<LazyCompact>>, + display_name: impl Into<SmartString<LazyCompact>> ) -> &mut Module

    Map a custom type to a friendly display name.

    #[derive(Clone)]
    @@ -55,8 +61,8 @@ 
    Example
    module.set_custom_type_raw(name, "MyType"); -assert_eq!(module.get_custom_type(name), Some("MyType"));
    -

    pub fn get_custom_type(&self, key: &str) -> Option<&str>

    Get the display name of a registered custom type.

    +assert_eq!(module.get_custom_type_display_by_name(name), Some("MyType"));
    +

    pub fn get_custom_type_display_by_name(&self, type_name: &str) -> Option<&str>

    Get the display name of a registered custom type.

    Example
    #[derive(Clone)]
     struct TestStruct;
    @@ -67,14 +73,27 @@ 
    Example
    module.set_custom_type::<TestStruct>("MyType"); -assert_eq!(module.get_custom_type(name), Some("MyType"));
    -

    pub fn is_empty(&self) -> bool

    Returns true if this Module contains no items.

    +assert_eq!(module.get_custom_type_display_by_name(name), Some("MyType"));
    +

    pub fn get_custom_type_display<T>(&self) -> Option<&str>

    Get the display name of a registered custom type.

    Example
    +
    #[derive(Clone)]
    +struct TestStruct;
    +
    +let name = std::any::type_name::<TestStruct>();
    +
    +let mut module = Module::new();
    +
    +module.set_custom_type::<TestStruct>("MyType");
    +
    +assert_eq!(module.get_custom_type_display::<TestStruct>(), Some("MyType"));
    +

    pub fn get_custom_type_raw<T>(&self) -> Option<&CustomTypeInfo>

    Get a registered custom type .

    +

    pub fn is_empty(&self) -> bool

    Returns true if this Module contains no items.

    +
    Example
    let module = Module::new();
     assert!(module.is_empty());
    -

    pub const fn is_indexed(&self) -> bool

    Is the Module indexed?

    +

    pub const fn is_indexed(&self) -> bool

    Is the Module indexed?

    A module must be indexed before it can be used in an import statement.

    -
    Example
    +
    Example
    let mut module = Module::new();
     assert!(module.is_indexed());
     
    @@ -83,76 +102,76 @@ 
    Example
    module.build_index(); assert!(module.is_indexed());
    -

    pub fn contains_var(&self, name: &str) -> bool

    Does a variable exist in the Module?

    -
    Example
    +

    pub fn contains_var(&self, name: &str) -> bool

    Does a variable exist in the Module?

    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert!(module.contains_var("answer"));
    -

    pub fn get_var_value<T>(&self, name: &str) -> Option<T>where - T: Variant + Clone,

    Get the value of a Module variable.

    -
    Example
    +

    pub fn get_var_value<T>(&self, name: &str) -> Option<T>where + T: Variant + Clone,

    Get the value of a Module variable.

    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var_value::<i64>("answer").expect("answer should exist"), 42);
    -

    pub fn get_var(&self, name: &str) -> Option<Dynamic>

    Get a Module variable as a Dynamic.

    -
    Example
    +

    pub fn get_var(&self, name: &str) -> Option<Dynamic>

    Get a Module variable as a Dynamic.

    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var("answer").expect("answer should exist").cast::<i64>(), 42);

    pub fn set_var( &mut self, - name: impl Into<SmartString<LazyCompact>>, - value: impl Variant + Clone + name: impl Into<SmartString<LazyCompact>>, + value: impl Variant + Clone ) -> &mut Module

    Set a variable into the Module.

    If there is an existing variable of the same name, it is replaced.

    -
    Example
    +
    Example
    let mut module = Module::new();
     module.set_var("answer", 42_i64);
     assert_eq!(module.get_var_value::<i64>("answer").expect("answer should exist"), 42);
    -

    pub fn contains_sub_module(&self, name: &str) -> bool

    Does a sub-module exist in the Module?

    -
    Example
    +

    pub fn contains_sub_module(&self, name: &str) -> bool

    Does a sub-module exist in the Module?

    +
    Example
    let mut module = Module::new();
     let sub_module = Module::new();
     module.set_sub_module("question", sub_module);
     assert!(module.contains_sub_module("question"));
    -

    pub fn get_sub_module(&self, name: &str) -> Option<&Module>

    Get a sub-module in the Module.

    -
    Example
    +

    pub fn get_sub_module(&self, name: &str) -> Option<&Module>

    Get a sub-module in the Module.

    +
    Example
    let mut module = Module::new();
     let sub_module = Module::new();
     module.set_sub_module("question", sub_module);
     assert!(module.get_sub_module("question").is_some());

    pub fn set_sub_module( &mut self, - name: impl Into<SmartString<LazyCompact>>, - sub_module: impl Into<Arc<Module>> + name: impl Into<SmartString<LazyCompact>>, + sub_module: impl Into<Arc<Module, Global>> ) -> &mut Module

    Set a sub-module into the Module.

    If there is an existing sub-module of the same name, it is replaced.

    -
    Example
    +
    Example
    let mut module = Module::new();
     let sub_module = Module::new();
     module.set_sub_module("question", sub_module);
     assert!(module.get_sub_module("question").is_some());
    -

    pub fn contains_fn(&self, hash_fn: u64) -> bool

    Does the particular Rust function exist in the Module?

    -

    The u64 hash is returned by the set_native_fn call.

    -
    Example
    +

    pub fn contains_fn(&self, hash_fn: u64) -> bool

    Does the particular Rust function exist in the Module?

    +

    The u64 hash is returned by the set_native_fn call.

    +
    Example
    let mut module = Module::new();
     let hash = module.set_native_fn("calc", || Ok(42_i64));
     assert!(module.contains_fn(hash));

    pub fn update_fn_namespace( &mut self, - hash_fn: u64, + hash_fn: u64, namespace: FnNamespace ) -> &mut Module

    Update the namespace of a registered function.

    -

    The u64 hash is returned by the set_native_fn call.

    +

    The u64 hash is returned by the set_native_fn call.

    pub fn set_fn( &mut self, - name: impl AsRef<str>, + name: impl Into<SmartString<LazyCompact>>, namespace: FnNamespace, access: FnAccess, - arg_names: Option<&[&str]>, - arg_types: impl AsRef<[TypeId]>, + arg_names: Option<&[&str]>, + arg_types: impl AsRef<[TypeId]>, func: CallableFunction -) -> u64

    Set a native Rust function into the Module, returning a u64 hash key.

    +) -> u64

    Set a native Rust function into the Module, returning a u64 hash key.

    If there is an existing Rust function of the same hash, it is replaced.

    WARNING - Low Level API

    This function is very low level.

    @@ -163,13 +182,13 @@
    Return Type
    In other words, the number of entries should be one larger than the number of parameters.

    pub fn set_raw_fn<T>( &mut self, - name: impl AsRef<str>, + name: impl Into<SmartString<LazyCompact>>, namespace: FnNamespace, access: FnAccess, - arg_types: impl AsRef<[TypeId]>, - func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static -) -> u64where - T: Variant + Clone,

    Set a native Rust function into the Module, returning a u64 hash key.

    + arg_types: impl AsRef<[TypeId]>, + func: impl Fn(NativeCallContext<'_>, &mut [&mut Dynamic]) -> Result<T, Box<EvalAltResult, Global>> + SendSync + 'static +) -> u64where + T: Variant + Clone,

    Set a native Rust function into the Module, returning a u64 hash key.

    If there is a similar existing Rust function, it is replaced.

    WARNING - Low Level API

    This function is very low level.

    @@ -185,7 +204,7 @@
    Arguments

    To access the first mutable argument, use args.get_mut(0).unwrap()

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, FnNamespace, FnAccess};
     
     let mut module = Module::new();
    @@ -213,14 +232,14 @@ 
    Example
    }); assert!(module.contains_fn(hash));
    -

    pub fn set_native_fn<A, const N: usize, const C: bool, T, F>( +

    pub fn set_native_fn<A, const N: usize, const C: bool, T, F>( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + name: impl Into<SmartString<LazyCompact>>, func: F -) -> u64where +) -> u64where A: 'static, - T: Variant + Clone, - F: RegisterNativeFunction<A, N, C, T, true>,

    Set a native Rust function into the Module, returning a u64 hash key.

    + T: Variant + Clone, + F: RegisterNativeFunction<A, N, C, T, true> + SendSync + 'static,

    Set a native Rust function into the Module, returning a u64 hash key.

    If there is a similar existing Rust function, it is replaced.

    Function Namespace

    The default function namespace is FnNamespace::Internal. @@ -228,42 +247,42 @@

    Function Namespace
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    let mut module = Module::new();
     let hash = module.set_native_fn("calc", || Ok(42_i64));
     assert!(module.contains_fn(hash));
    -

    pub fn set_getter_fn<A, const C: bool, T, F>( +

    pub fn set_getter_fn<A, const C: bool, T, F>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, func: F -) -> u64where - A: Variant + Clone, - T: Variant + Clone, - F: RegisterNativeFunction<(Mut<A>,), 1, C, T, true> + SendSync + 'static,

    Set a Rust getter function taking one mutable parameter, returning a u64 hash key. +) -> u64where + A: Variant + Clone, + T: Variant + Clone, + F: RegisterNativeFunction<(Mut<A>,), 1, C, T, true> + SendSync + 'static,

    Set a Rust getter function taking one mutable parameter, returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing Rust getter function, it is replaced.

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    let mut module = Module::new();
     let hash = module.set_getter_fn("value", |x: &mut i64| { Ok(*x) });
     assert!(module.contains_fn(hash));
    -

    pub fn set_setter_fn<A, const C: bool, T, F>( +

    pub fn set_setter_fn<A, const C: bool, T, F>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, func: F -) -> u64where - A: Variant + Clone, - T: Variant + Clone, - F: RegisterNativeFunction<(Mut<A>, T), 2, C, (), true> + SendSync + 'static,

    Set a Rust setter function taking two parameters (the first one mutable) into the Module, -returning a u64 hash key. +) -> u64where + A: Variant + Clone, + T: Variant + Clone, + F: RegisterNativeFunction<(Mut<A>, T), 2, C, (), true> + SendSync + 'static,

    Set a Rust setter function taking two parameters (the first one mutable) into the Module, +returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing setter Rust function, it is replaced.

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -272,21 +291,21 @@ 
    Example
    Ok(()) }); assert!(module.contains_fn(hash));
    -

    pub fn set_getter_setter_fn<A, const C1: bool, const C2: bool, T>( +

    pub fn set_getter_setter_fn<A, const C1: bool, const C2: bool, T>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, getter: impl RegisterNativeFunction<(Mut<A>,), 1, C1, T, true> + SendSync + 'static, - setter: impl RegisterNativeFunction<(Mut<A>, T), 2, C2, (), true> + SendSync + 'static -) -> (u64, u64)where - A: Variant + Clone, - T: Variant + Clone,

    Set a pair of Rust getter and setter functions into the Module, returning both u64 hash keys. + setter: impl RegisterNativeFunction<(Mut<A>, T), 2, C2, (), true> + SendSync + 'static +) -> (u64, u64)where + A: Variant + Clone, + T: Variant + Clone,

    Set a pair of Rust getter and setter functions into the Module, returning both u64 hash keys. This is a short-hand for set_getter_fn and set_setter_fn.

    These function are automatically exposed to the global namespace.

    If there are similar existing Rust functions, they are replaced.

    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -299,12 +318,12 @@ 
    Example
    ); assert!(module.contains_fn(hash_get)); assert!(module.contains_fn(hash_set));
    -

    pub fn set_indexer_get_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where - A: Variant + Clone, - B: Variant + Clone, - T: Variant + Clone, +

    pub fn set_indexer_get_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where + A: Variant + Clone, + B: Variant + Clone, + T: Variant + Clone, F: RegisterNativeFunction<(Mut<A>, B), 2, C, T, true> + SendSync + 'static,

    Set a Rust index getter taking two parameters (the first one mutable) into the Module, -returning a u64 hash key. +returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing setter Rust function, it is replaced.

    Panics
    @@ -313,7 +332,7 @@
    Panics
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -321,12 +340,12 @@ 
    Example
    Ok(*x + y.len() as i64) }); assert!(module.contains_fn(hash));
    -

    pub fn set_indexer_set_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where - A: Variant + Clone, - B: Variant + Clone, - T: Variant + Clone, - F: RegisterNativeFunction<(Mut<A>, B, T), 3, C, (), true> + SendSync + 'static,

    Set a Rust index setter taking three parameters (the first one mutable) into the Module, -returning a u64 hash key. +

    pub fn set_indexer_set_fn<A, B, const C: bool, T, F>(&mut self, func: F) -> u64where + A: Variant + Clone, + B: Variant + Clone, + T: Variant + Clone, + F: RegisterNativeFunction<(Mut<A>, B, T), 3, C, (), true> + SendSync + 'static,

    Set a Rust index setter taking three parameters (the first one mutable) into the Module, +returning a u64 hash key. This function is automatically exposed to the global namespace.

    If there is a similar existing Rust function, it is replaced.

    Panics
    @@ -335,7 +354,7 @@
    Panics
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -343,14 +362,14 @@ 
    Example
    *x = y.len() as i64 + value; Ok(()) }); assert!(module.contains_fn(hash));
    -

    pub fn set_indexer_get_set_fn<A, B, const C1: bool, const C2: bool, T>( +

    pub fn set_indexer_get_set_fn<A, B, const C1: bool, const C2: bool, T>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<A>, B), 2, C1, T, true> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<A>, B, T), 3, C2, (), true> + SendSync + 'static -) -> (u64, u64)where - A: Variant + Clone, - B: Variant + Clone, - T: Variant + Clone,

    Set a pair of Rust index getter and setter functions into the Module, returning both u64 hash keys. + set_fn: impl RegisterNativeFunction<(Mut<A>, B, T), 3, C2, (), true> + SendSync + 'static +) -> (u64, u64)where + A: Variant + Clone, + B: Variant + Clone, + T: Variant + Clone,

    Set a pair of Rust index getter and setter functions into the Module, returning both u64 hash keys. This is a short-hand for set_indexer_get_fn and set_indexer_set_fn.

    These functions are automatically exposed to the global namespace.

    @@ -361,7 +380,7 @@
    Panics
    Function Metadata

    No metadata for the function is registered. Use [update_fn_metadata][Module::update_fn_metadata] to add metadata.

    -
    Example
    +
    Example
    use rhai::{Module, ImmutableString};
     
     let mut module = Module::new();
    @@ -375,8 +394,8 @@ 
    Example
    ); assert!(module.contains_fn(hash_get)); assert!(module.contains_fn(hash_set));
    -

    pub fn contains_qualified_fn(&self, hash_fn: u64) -> bool

    Does the particular namespace-qualified function exist in the Module?

    -

    The u64 hash is calculated by build_index.

    +

    pub fn contains_qualified_fn(&self, hash_fn: u64) -> bool

    Does the particular namespace-qualified function exist in the Module?

    +

    The u64 hash is calculated by build_index.

    pub fn combine(&mut self, other: Module) -> &mut Module

    Combine another Module into this Module. The other Module is consumed to merge into this Module.

    pub fn combine_flatten(&mut self, other: Module) -> &mut Module

    Combine another Module into this Module. @@ -385,51 +404,53 @@

    Example

    pub fn fill_with(&mut self, other: &Module) -> &mut Module

    Polyfill this Module with another Module. Only items not existing in this Module are added.

    pub fn merge(&mut self, other: &Module) -> &mut Module

    Merge another Module into this Module.

    -

    pub fn count(&self) -> (usize, usize, usize)

    Get the number of variables, functions and type iterators in the Module.

    -

    pub fn iter_sub_modules(&self) -> impl Iterator<Item = (&str, &Arc<Module>)>

    Get an iterator to the sub-modules in the Module.

    -

    pub fn iter_var(&self) -> impl Iterator<Item = (&str, &Dynamic)>

    Get an iterator to the variables in the Module.

    -

    pub fn contains_indexed_global_functions(&self) -> bool

    Does the Module contain indexed functions that have been exposed to the global namespace?

    +

    pub fn count(&self) -> (usize, usize, usize)

    Get the number of variables, functions and type iterators in the Module.

    +

    pub fn iter_sub_modules( + &self +) -> impl Iterator<Item = (&str, &Arc<Module, Global>)>

    Get an iterator to the sub-modules in the Module.

    +

    pub fn iter_var(&self) -> impl Iterator<Item = (&str, &Dynamic)>

    Get an iterator to the variables in the Module.

    +

    pub const fn contains_indexed_global_functions(&self) -> bool

    Does the Module contain indexed functions that have been exposed to the global namespace?

    Panics

    Panics if the Module is not yet indexed via build_index.

    pub fn build_index(&mut self) -> &mut Module

    Scan through all the sub-modules in the Module and build a hash index of all variables and functions as one flattened namespace.

    If the Module is already indexed, this method has no effect.

    -

    pub fn contains_qualified_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the entire module tree?

    -

    pub fn contains_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the module?

    +

    pub fn contains_qualified_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the entire module tree?

    +

    pub fn contains_iter(&self, id: TypeId) -> bool

    Does a type iterator exist in the module?

    pub fn set_iter( &mut self, type_id: TypeId, - func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Dynamic>, Global> + SendSync + 'static + func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Dynamic>, Global> + SendSync + 'static ) -> &mut Module

    Set a type iterator into the Module.

    pub fn set_iter_result( &mut self, type_id: TypeId, - func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + SendSync + 'static + func: impl Fn(Dynamic) -> Box<dyn Iterator<Item = Result<Dynamic, Box<EvalAltResult, Global>>>, Global> + SendSync + 'static ) -> &mut Module

    Set a fallible type iterator into the Module.

    pub fn set_iterable<T>(&mut self) -> &mut Modulewhere - T: Variant + Clone + IntoIterator, - <T as IntoIterator>::Item: Variant + Clone,

    Set a type iterator into the Module.

    + T: Variant + Clone + IntoIterator, + <T as IntoIterator>::Item: Variant + Clone,

    Set a type iterator into the Module.

    pub fn set_iterable_result<T, X>(&mut self) -> &mut Modulewhere - T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, - X: Variant + Clone,

    Set a fallible type iterator into the Module.

    + T: Variant + Clone + IntoIterator<Item = Result<X, Box<EvalAltResult, Global>>>, + X: Variant + Clone,

    Set a fallible type iterator into the Module.

    pub fn set_iterator<T>(&mut self) -> &mut Modulewhere - T: Variant + Clone + Iterator, - <T as Iterator>::Item: Variant + Clone,

    Set an iterator type into the Module as a type iterator.

    + T: Variant + Clone + Iterator, + <T as Iterator>::Item: Variant + Clone,

    Set an iterator type into the Module as a type iterator.

    pub fn set_iterator_result<T, X>(&mut self) -> &mut Modulewhere - T: Variant + Clone + Iterator<Item = Result<X, Box<EvalAltResult, Global>>>, - X: Variant + Clone,

    Set a iterator type into the Module as a fallible type iterator.

    -

    Trait Implementations§

    §

    impl<M> Add<M> for &Modulewhere - M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <&Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> Add<M> for Modulewhere - M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> AddAssign<M> for Modulewhere - M: Into<Module>,

    §

    fn add_assign(&mut self, rhs: M)

    Performs the += operation. Read more
    §

    impl Clone for Module

    §

    fn clone(&self) -> Module

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Module

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Module

    §

    fn default() -> Module

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Module

    §

    impl Send for Module

    §

    impl Sync for Module

    §

    impl Unpin for Module

    §

    impl !UnwindSafe for Module

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + T: Variant + Clone + Iterator<Item = Result<X, Box<EvalAltResult, Global>>>, + X: Variant + Clone,

    Set a iterator type into the Module as a fallible type iterator.

    +

    Trait Implementations§

    §

    impl<M> Add<M> for &Modulewhere + M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <&Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> Add<M> for Modulewhere + M: AsRef<Module>,

    §

    type Output = Module

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: M) -> <Module as Add<M>>::Output

    Performs the + operation. Read more
    §

    impl<M> AddAssign<M> for Modulewhere + M: Into<Module>,

    §

    fn add_assign(&mut self, rhs: M)

    Performs the += operation. Read more
    §

    impl Clone for Module

    §

    fn clone(&self) -> Module

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Module

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Module

    §

    fn default() -> Module

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl !RefUnwindSafe for Module

    §

    impl Send for Module

    §

    impl Sync for Module

    §

    impl Unpin for Module

    §

    impl !UnwindSafe for Module

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.NativeCallContext.html b/casbin/rhai/struct.NativeCallContext.html index cc42141e..eec84406 100644 --- a/casbin/rhai/struct.NativeCallContext.html +++ b/casbin/rhai/struct.NativeCallContext.html @@ -1,8 +1,8 @@ -NativeCallContext in casbin::rhai - Rust
    pub struct NativeCallContext<'a> { /* private fields */ }
    Expand description

    Context of a native Rust function call.

    +NativeCallContext in casbin::rhai - Rust
    pub struct NativeCallContext<'a> { /* private fields */ }
    Expand description

    Context of a native Rust function call.

    Implementations§

    §

    impl NativeCallContext<'_>

    pub fn new( engine: &Engine, - fn_name: &str, - lib: &[Arc<Module>] + fn_name: &str, + lib: &[Arc<Module, Global>] ) -> NativeCallContext<'_>

    👎Deprecated since 1.3.0: use FnPtr::call to call a function pointer directly.

    Create a new NativeCallContext.

    Unimplemented

    This method is deprecated. It is no longer implemented and always panics.

    @@ -10,42 +10,43 @@
    Unimplemented

    This method will be removed in the next major version.

    pub fn call_fn_dynamic_raw( &self, - fn_name: impl AsRef<str>, - is_method_call: bool, + fn_name: impl AsRef<str>, + is_method_call: bool, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    👎Deprecated since 1.2.0: use call_fn_raw instead

    Call a function inside the call context.

    +) -> Result<Dynamic, Box<EvalAltResult, Global>>
    👎Deprecated since 1.2.0: use call_fn_raw instead

    Call a function inside the call context.

    Deprecated
    -

    This method is deprecated. Use call_fn_raw instead.

    +

    This method is deprecated. +Use call_fn_raw instead.

    This method will be removed in the next major version.

    §

    impl<'a> NativeCallContext<'a>

    pub const fn engine(&self) -> &Engine

    The current Engine.

    -

    pub const fn fn_name(&self) -> &str

    Name of the function called.

    +

    pub const fn fn_name(&self) -> &str

    Name of the function called.

    pub const fn position(&self) -> Position

    Position of the function call.

    -

    pub const fn call_level(&self) -> usize

    Current nesting level of function calls.

    -

    pub const fn source(&self) -> Option<&str>

    The current source.

    -

    pub const fn tag(&self) -> Option<&Dynamic>

    Custom state kept in a Dynamic.

    +

    pub const fn call_level(&self) -> usize

    Current nesting level of function calls.

    +

    pub const fn source(&self) -> Option<&str>

    The current source.

    +

    pub const fn tag(&self) -> Option<&Dynamic>

    Custom state kept in a Dynamic.

    pub fn call_fn<T>( &self, - fn_name: impl AsRef<str>, + fn_name: impl AsRef<str>, args: impl FuncArgs -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Call a function inside the call context with the provided arguments.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Call a function inside the call context with the provided arguments.

    pub fn call_native_fn<T>( &self, - fn_name: impl AsRef<str>, + fn_name: impl AsRef<str>, args: impl FuncArgs -) -> Result<T, Box<EvalAltResult, Global>>where - T: Variant + Clone,

    Call a registered native Rust function inside the call context with the provided arguments.

    +) -> Result<T, Box<EvalAltResult, Global>>where + T: Variant + Clone,

    Call a registered native Rust function inside the call context with the provided arguments.

    This is often useful because Rust functions typically only want to cross-call other registered Rust functions and not have to worry about scripted functions hijacking the process unknowingly (or deliberately).

    pub fn call_fn_raw( &self, - fn_name: impl AsRef<str>, - is_ref_mut: bool, - is_method_call: bool, + fn_name: impl AsRef<str>, + is_ref_mut: bool, + is_method_call: bool, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a function (native Rust or scripted) inside the call context.

    -

    If is_method_call is true, the first argument is assumed to be the this pointer for +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a function (native Rust or scripted) inside the call context.

    +

    If is_method_call is true, the first argument is assumed to be the this pointer for a script-defined function (or the object of a method call).

    WARNING - Low Level API

    This function is very low level.

    @@ -54,14 +55,14 @@
    Arguments
    unnecessarily cloning the arguments.

    DO NOT reuse the arguments after this call. If they are needed afterwards, clone them before calling this function.

    -

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is +

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is not consumed.

    pub fn call_native_fn_raw( &self, - fn_name: impl AsRef<str>, - is_ref_mut: bool, + fn_name: impl AsRef<str>, + is_ref_mut: bool, args: &mut [&mut Dynamic] -) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a registered native Rust function inside the call context.

    +) -> Result<Dynamic, Box<EvalAltResult, Global>>

    Call a registered native Rust function inside the call context.

    This is often useful because Rust functions typically only want to cross-call other registered Rust functions and not have to worry about scripted functions hijacking the process unknowingly (or deliberately).

    @@ -72,18 +73,18 @@
    Arguments
    unnecessarily cloning the arguments.

    DO NOT reuse the arguments after this call. If they are needed afterwards, clone them before calling this function.

    -

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is +

    If is_ref_mut is true, the first argument is assumed to be passed by reference and is not consumed.

    -

    Trait Implementations§

    §

    impl<'a> Debug for NativeCallContext<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> From<(&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position)> for NativeCallContext<'a>

    §

    fn from( - value: (&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position) -) -> NativeCallContext<'a>

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for NativeCallContext<'a>

    §

    impl<'a> Send for NativeCallContext<'a>

    §

    impl<'a> Sync for NativeCallContext<'a>

    §

    impl<'a> Unpin for NativeCallContext<'a>

    §

    impl<'a> !UnwindSafe for NativeCallContext<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl<'a> Debug for NativeCallContext<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> From<(&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position)> for NativeCallContext<'a>

    §

    fn from( + value: (&'a Engine, &'a str, Option<&'a str>, &'a GlobalRuntimeState, Position) +) -> NativeCallContext<'a>

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for NativeCallContext<'a>

    §

    impl<'a> Send for NativeCallContext<'a>

    §

    impl<'a> Sync for NativeCallContext<'a>

    §

    impl<'a> Unpin for NativeCallContext<'a>

    §

    impl<'a> !UnwindSafe for NativeCallContext<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.ParseError.html b/casbin/rhai/struct.ParseError.html index e6729eaf..9415bf95 100644 --- a/casbin/rhai/struct.ParseError.html +++ b/casbin/rhai/struct.ParseError.html @@ -1,33 +1,31 @@ -ParseError in casbin::rhai - Rust

    Struct casbin::rhai::ParseError

    pub struct ParseError(pub Box<ParseErrorType, Global>, pub Position);
    Expand description

    Error when parsing a script.

    -

    Tuple Fields§

    §0: Box<ParseErrorType, Global>

    Parse error type.

    +ParseError in casbin::rhai - Rust

    Struct casbin::rhai::ParseError

    pub struct ParseError(pub Box<ParseErrorType, Global>, pub Position);
    Expand description

    Error when parsing a script.

    +

    Tuple Fields§

    §0: Box<ParseErrorType, Global>

    Parse error type.

    §1: Position

    Position of the parse error.

    Implementations§

    §

    impl ParseError

    pub const fn err_type(&self) -> &ParseErrorType

    Get the type of this parse error.

    pub const fn position(&self) -> Position

    Get the position of this parse error.

    -

    Trait Implementations§

    §

    impl Clone for ParseError

    §

    fn clone(&self) -> ParseError

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for ParseError

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Display for ParseError

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Error for ParseError

    1.30.0 · source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    1.0.0 · source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn provide<'a>(&'a self, demand: &mut Demand<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more
    source§

    impl From<ParseError> for Error

    source§

    fn from(source: ParseError) -> Self

    Converts to this type from the input type.
    §

    impl From<ParseError> for EvalAltResult

    §

    fn from(err: ParseError) -> EvalAltResult

    Converts to this type from the input type.
    §

    impl Hash for ParseError

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl PartialEq<ParseError> for ParseError

    §

    fn eq(&self, other: &ParseError) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl Eq for ParseError

    §

    impl StructuralEq for ParseError

    §

    impl StructuralPartialEq for ParseError

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl Clone for ParseError

    §

    fn clone(&self) -> ParseError

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for ParseError

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Display for ParseError

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Error for ParseError

    1.30.0 · source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    1.0.0 · source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more
    source§

    impl From<ParseError> for Error

    source§

    fn from(source: ParseError) -> Self

    Converts to this type from the input type.
    §

    impl From<ParseError> for EvalAltResult

    §

    fn from(err: ParseError) -> EvalAltResult

    Converts to this type from the input type.
    §

    impl Hash for ParseError

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl PartialEq<ParseError> for ParseError

    §

    fn eq(&self, other: &ParseError) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl Eq for ParseError

    §

    impl StructuralEq for ParseError

    §

    impl StructuralPartialEq for ParseError

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<E> Provider for Ewhere - E: Error + ?Sized,

    source§

    fn provide<'a>(&'a self, demand: &mut Demand<'a>)

    🔬This is a nightly-only experimental API. (provide_any)
    Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    \ No newline at end of file diff --git a/casbin/rhai/struct.Position.html b/casbin/rhai/struct.Position.html index 2c865521..791a4919 100644 --- a/casbin/rhai/struct.Position.html +++ b/casbin/rhai/struct.Position.html @@ -1,63 +1,64 @@ -Position in casbin::rhai - Rust

    Struct casbin::rhai::Position

    pub struct Position { /* private fields */ }
    Expand description

    A location (line number + character position) in the input script.

    +Position in casbin::rhai - Rust

    Struct casbin::rhai::Position

    pub struct Position { /* private fields */ }
    Expand description

    A location (line number + character position) in the input script.

    Limitations

    In order to keep footprint small, both line number and character position have 16-bit resolution, meaning they go up to a maximum of 65,535 lines and 65,535 characters per line.

    Advancing beyond the maximum line length or maximum number of lines is not an error but has no effect.

    -

    Implementations§

    §

    impl Position

    pub const fn new_const(line: u16, position: u16) -> Option<Position>

    👎Deprecated since 1.6.0: use new instead

    Create a new Position.

    -

    If line is zero, then None is returned.

    +

    Implementations§

    §

    impl Position

    pub const fn new_const(line: u16, position: u16) -> Option<Position>

    👎Deprecated since 1.6.0: use new instead

    Create a new Position.

    +

    If line is zero, then None is returned.

    If position is zero, then it is at the beginning of a line.

    Deprecated
    -

    This function is deprecated. Use new (which panics when line is zero) instead.

    +

    This function is deprecated. +Use new (which panics when line is zero) instead.

    This method will be removed in the next major version.

    -
    §

    impl Position

    pub const NONE: Position = Self{ line: 0, pos: 0,}

    A Position representing no position.

    -

    pub const START: Position = Self{ line: 1, pos: 0,}

    A Position representing the first position.

    -

    pub const fn new(line: u16, position: u16) -> Position

    Create a new Position.

    +
    §

    impl Position

    pub const NONE: Position = _

    A Position representing no position.

    +

    pub const START: Position = _

    A Position representing the first position.

    +

    pub const fn new(line: u16, position: u16) -> Position

    Create a new Position.

    line must not be zero.

    If position is zero, then it is at the beginning of a line.

    Panics

    Panics if line is zero.

    -

    pub const fn line(self) -> Option<usize>

    Get the line number (1-based), or None if there is no position.

    -

    Always returns None under no_position.

    -

    pub const fn position(self) -> Option<usize>

    Get the character position (1-based), or None if at beginning of a line.

    -

    Always returns None under no_position.

    -

    pub const fn is_beginning_of_line(self) -> bool

    Is this Position at the beginning of a line?

    +

    pub const fn line(self) -> Option<usize>

    Get the line number (1-based), or None if there is no position.

    +

    Always returns None under no_position.

    +

    pub const fn position(self) -> Option<usize>

    Get the character position (1-based), or None if at beginning of a line.

    +

    Always returns None under no_position.

    +

    pub const fn is_beginning_of_line(self) -> bool

    Is this Position at the beginning of a line?

    Always returns false under no_position.

    -

    pub const fn is_none(self) -> bool

    Is there no Position?

    +

    pub const fn is_none(self) -> bool

    Is there no Position?

    Always returns true under no_position.

    pub const fn or_else(self, pos: Position) -> Position

    Returns an fallback Position if it is NONE?

    Always returns the fallback under no_position.

    -

    Trait Implementations§

    §

    impl Add<Position> for Position

    §

    type Output = Position

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: Position) -> <Position as Add<Position>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<Position> for Position

    §

    fn add_assign(&mut self, rhs: Position)

    Performs the += operation. Read more
    §

    impl Clone for Position

    §

    fn clone(&self) -> Position

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Position

    §

    fn default() -> Position

    Returns the “default value” for a type. Read more
    §

    impl Display for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Hash for Position

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for Position

    §

    fn cmp(&self, other: &Position) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<Position> for Position

    §

    fn eq(&self, other: &Position) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<Position> for Position

    §

    fn partial_cmp(&self, other: &Position) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    §

    impl Copy for Position

    §

    impl Eq for Position

    §

    impl StructuralEq for Position

    §

    impl StructuralPartialEq for Position

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl Add<Position> for Position

    §

    type Output = Position

    The resulting type after applying the + operator.
    §

    fn add(self, rhs: Position) -> <Position as Add<Position>>::Output

    Performs the + operation. Read more
    §

    impl AddAssign<Position> for Position

    §

    fn add_assign(&mut self, rhs: Position)

    Performs the += operation. Read more
    §

    impl Clone for Position

    §

    fn clone(&self) -> Position

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Default for Position

    §

    fn default() -> Position

    Returns the “default value” for a type. Read more
    §

    impl Display for Position

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Hash for Position

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for Position

    §

    fn cmp(&self, other: &Position) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq<Position> for Position

    §

    fn eq(&self, other: &Position) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    §

    impl PartialOrd<Position> for Position

    §

    fn partial_cmp(&self, other: &Position) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    §

    impl Copy for Position

    §

    impl Eq for Position

    §

    impl StructuralEq for Position

    §

    impl StructuralPartialEq for Position

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere - M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    source§

    impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    source§

    impl<M> Measure for Mwhere + M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

    source§

    impl<N> NodeTrait for Nwhere + N: Copy + Ord + Hash,

    \ No newline at end of file diff --git a/casbin/rhai/struct.Scope.html b/casbin/rhai/struct.Scope.html index 9f228bf6..95704909 100644 --- a/casbin/rhai/struct.Scope.html +++ b/casbin/rhai/struct.Scope.html @@ -1,4 +1,4 @@ -Scope in casbin::rhai - Rust

    Struct casbin::rhai::Scope

    pub struct Scope<'a, const N: usize = rhai::::types::scope::Scope::{constant#0}> { /* private fields */ }
    Expand description

    Type containing information about the current scope. Useful for keeping state between +Scope in casbin::rhai - Rust

    Struct casbin::rhai::Scope

    pub struct Scope<'a> { /* private fields */ }
    Expand description

    Type containing information about the current scope. Useful for keeping state between Engine evaluation runs.

    Lifetime

    Currently the lifetime parameter is not used, but it is not guaranteed to remain unused for @@ -9,8 +9,8 @@

    Consta The default is 8.

    A larger value makes Scope larger, but reduces the chance of allocations.

    Thread Safety

    -

    Currently, Scope is neither Send nor Sync. Turn on the sync feature to make it -Send + Sync.

    +

    Currently, Scope is neither Send nor Sync. Turn on the sync feature to make it +Send + Sync.

    Example

    use rhai::{Engine, Scope};
     
    @@ -28,7 +28,7 @@ 

    Example

    assert_eq!(my_scope.get_value::<i64>("z").expect("z should exist"), 0);

    When searching for entries, newly-added entries are found before similarly-named but older entries, allowing for automatic shadowing.

    -

    Implementations§

    §

    impl Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    pub const fn new() -> Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Create a new Scope.

    +

    Implementations§

    §

    impl Scope<'_>

    pub const fn new() -> Scope<'_>

    Create a new Scope.

    Example
    use rhai::Scope;
     
    @@ -36,9 +36,7 @@ 
    Example
    my_scope.push("x", 42_i64); assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);
    -

    pub fn with_capacity( - capacity: usize -) -> Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Create a new Scope with a particular capacity.

    +

    pub fn with_capacity(capacity: usize) -> Scope<'_>

    Create a new Scope with a particular capacity.

    Example
    use rhai::Scope;
     
    @@ -46,9 +44,7 @@ 
    Example
    my_scope.push("x", 42_i64); assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);
    -

    pub fn clear( - &mut self -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Empty the Scope.

    +

    pub fn clear(&mut self) -> &mut Scope<'_>

    Empty the Scope.

    Example
    use rhai::Scope;
     
    @@ -63,7 +59,7 @@ 
    Example
    assert!(!my_scope.contains("x")); assert_eq!(my_scope.len(), 0); assert!(my_scope.is_empty());
    -

    pub fn len(&self) -> usize

    Get the number of entries inside the Scope.

    +

    pub fn len(&self) -> usize

    Get the number of entries inside the Scope.

    Example
    use rhai::Scope;
     
    @@ -72,7 +68,7 @@ 
    Example
    my_scope.push("x", 42_i64); assert_eq!(my_scope.len(), 1);
    -

    pub fn is_empty(&self) -> bool

    Returns true if this Scope contains no variables.

    +

    pub fn is_empty(&self) -> bool

    Returns true if this Scope contains no variables.

    Example
    use rhai::Scope;
     
    @@ -83,9 +79,9 @@ 
    Example
    assert!(!my_scope.is_empty());

    pub fn push( &mut self, - name: impl Into<SmartString<LazyCompact>>, - value: impl Variant + Clone -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Add (push) a new entry to the Scope.

    + name: impl Into<SmartString<LazyCompact>>, + value: impl Variant + Clone +) -> &mut Scope<'_>

    Add (push) a new entry to the Scope.

    Example
    use rhai::Scope;
     
    @@ -95,9 +91,9 @@ 
    Example
    assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);

    pub fn push_dynamic( &mut self, - name: impl Into<SmartString<LazyCompact>>, + name: impl Into<SmartString<LazyCompact>>, value: Dynamic -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Add (push) a new Dynamic entry to the Scope.

    +) -> &mut Scope<'_>

    Add (push) a new Dynamic entry to the Scope.

    Example
    use rhai::{Dynamic,  Scope};
     
    @@ -107,9 +103,9 @@ 
    Example
    assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);

    pub fn push_constant( &mut self, - name: impl Into<SmartString<LazyCompact>>, - value: impl Variant + Clone -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Add (push) a new constant to the Scope.

    + name: impl Into<SmartString<LazyCompact>>, + value: impl Variant + Clone +) -> &mut Scope<'_>

    Add (push) a new constant to the Scope.

    Constants are immutable and cannot be assigned to. Their values never change. Constants propagation is a technique used to optimize an AST.

    Example
    @@ -121,9 +117,9 @@
    Example
    assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);

    pub fn push_constant_dynamic( &mut self, - name: impl Into<SmartString<LazyCompact>>, + name: impl Into<SmartString<LazyCompact>>, value: Dynamic -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Add (push) a new constant with a Dynamic value to the Scope.

    +) -> &mut Scope<'_>

    Add (push) a new constant with a Dynamic value to the Scope.

    Constants are immutable and cannot be assigned to. Their values never change. Constants propagation is a technique used to optimize an AST.

    Example
    @@ -133,9 +129,7 @@
    Example
    my_scope.push_constant_dynamic("x", Dynamic::from(42_i64)); assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);
    -

    pub fn pop( - &mut self -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Remove the last entry from the Scope.

    +

    pub fn pop(&mut self) -> &mut Scope<'_>

    Remove the last entry from the Scope.

    Panics

    Panics is the Scope is empty.

    Example
    @@ -159,10 +153,7 @@
    Example
    assert!(!my_scope.contains("y")); assert_eq!(my_scope.len(), 0); assert!(my_scope.is_empty());
    -

    pub fn rewind( - &mut self, - size: usize -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Truncate (rewind) the Scope to a previous size.

    +

    pub fn rewind(&mut self, size: usize) -> &mut Scope<'_>

    Truncate (rewind) the Scope to a previous size.

    Example
    use rhai::Scope;
     
    @@ -184,7 +175,7 @@ 
    Example
    assert!(!my_scope.contains("y")); assert_eq!(my_scope.len(), 0); assert!(my_scope.is_empty());
    -

    pub fn contains(&self, name: &str) -> bool

    Does the Scope contain the entry?

    +

    pub fn contains(&self, name: &str) -> bool

    Does the Scope contain the entry?

    Example
    use rhai::Scope;
     
    @@ -193,8 +184,8 @@ 
    Example
    my_scope.push("x", 42_i64); assert!(my_scope.contains("x")); assert!(!my_scope.contains("y"));
    -

    pub fn get_value<T>(&self, name: &str) -> Option<T>where - T: Variant + Clone,

    Get the value of an entry in the Scope, starting from the last.

    +

    pub fn get_value<T>(&self, name: &str) -> Option<T>where + T: Variant + Clone,

    Get the value of an entry in the Scope, starting from the last.

    Example
    use rhai::Scope;
     
    @@ -202,9 +193,9 @@ 
    Example
    my_scope.push("x", 42_i64); assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 42);
    -

    pub fn is_constant(&self, name: &str) -> Option<bool>

    Check if the named entry in the Scope is constant.

    +

    pub fn is_constant(&self, name: &str) -> Option<bool>

    Check if the named entry in the Scope is constant.

    Search starts backwards from the last, stopping at the first entry matching the specified name.

    -

    Returns None if no entry matching the specified name is found.

    +

    Returns None if no entry matching the specified name is found.

    Example
    use rhai::Scope;
     
    @@ -215,9 +206,9 @@ 
    Example
    assert_eq!(my_scope.is_constant("y"), None);

    pub fn set_or_push( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - value: impl Variant + Clone -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Update the value of the named entry in the Scope if it already exists and is not constant. + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + value: impl Variant + Clone +) -> &mut Scope<'_>

    Update the value of the named entry in the Scope if it already exists and is not constant. Push a new entry with the value into the Scope if the name doesn’t exist or if the existing entry is constant.

    Search starts backwards from the last, and only the first entry matching the specified name is updated.

    @@ -239,9 +230,9 @@
    Example
    assert_eq!(my_scope.len(), 2);

    pub fn set_value( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - value: impl Variant + Clone -) -> &mut Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Update the value of the named entry in the Scope.

    + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + value: impl Variant + Clone +) -> &mut Scope<'_>

    Update the value of the named entry in the Scope.

    Search starts backwards from the last, and only the first entry matching the specified name is updated. If no entry matching the specified name is found, a new one is added.

    Panics
    @@ -256,8 +247,8 @@
    Example
    my_scope.set_value("x", 0_i64); assert_eq!(my_scope.get_value::<i64>("x").expect("x should exist"), 0);
    -

    pub fn get(&self, name: &str) -> Option<&Dynamic>

    Get a reference to an entry in the Scope.

    -

    If the entry by the specified name is not found, None is returned.

    +

    pub fn get(&self, name: &str) -> Option<&Dynamic>

    Get a reference to an entry in the Scope.

    +

    If the entry by the specified name is not found, None is returned.

    Example
    use rhai::Scope;
     
    @@ -270,9 +261,9 @@ 
    Example
    assert_eq!(value.as_int().unwrap(), 42); assert!(my_scope.get("z").is_none());
    -

    pub fn remove<T>(&mut self, name: &str) -> Option<T>where - T: Variant + Clone,

    Remove the last entry in the Scope by the specified name and return its value.

    -

    If the entry by the specified name is not found, None is returned.

    +

    pub fn remove<T>(&mut self, name: &str) -> Option<T>where + T: Variant + Clone,

    Remove the last entry in the Scope by the specified name and return its value.

    +

    If the entry by the specified name is not found, None is returned.

    Example
    use rhai::Scope;
     
    @@ -292,9 +283,9 @@ 
    Example
    let value = my_scope.get_value::<i64>("x").expect("x should still exist"); assert_eq!(value, 123);
    -

    pub fn get_mut(&mut self, name: &str) -> Option<&mut Dynamic>

    Get a mutable reference to the value of an entry in the Scope.

    +

    pub fn get_mut(&mut self, name: &str) -> Option<&mut Dynamic>

    Get a mutable reference to the value of an entry in the Scope.

    If the entry by the specified name is not found, or if it is read-only, -None is returned.

    +None is returned.

    Example
    use rhai::Scope;
     
    @@ -310,11 +301,9 @@ 
    Example
    my_scope.push_constant("z", 1_i64); assert!(my_scope.get_mut("z").is_none());
    -

    pub fn clone_visible( - &self -) -> Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Clone the Scope, keeping only the last instances of each variable name. +

    pub fn clone_visible(&self) -> Scope<'_>

    Clone the Scope, keeping only the last instances of each variable name. Shadowed variables are omitted in the copy.

    -

    pub fn iter(&self) -> impl Iterator<Item = (&str, bool, Dynamic)>

    Get an iterator to entries in the Scope. +

    pub fn iter(&self) -> impl Iterator<Item = (&str, bool, Dynamic)>

    Get an iterator to entries in the Scope. Shared values are flatten-cloned.

    Example
    use rhai::{Dynamic, Scope};
    @@ -335,43 +324,39 @@ 
    Example
    assert_eq!(name, "foo"); assert!(is_constant); assert_eq!(value.cast::<String>(), "hello");
    -

    pub fn iter_raw(&self) -> impl Iterator<Item = (&str, bool, &Dynamic)>

    Get an iterator to entries in the Scope. +

    pub fn iter_raw(&self) -> impl Iterator<Item = (&str, bool, &Dynamic)>

    Get an iterator to entries in the Scope. Shared values are not expanded.

    -

    Trait Implementations§

    §

    impl Clone for Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    §

    fn clone(&self) -> Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl<'a, const N: usize> Debug for Scope<'a, N>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a, const N: usize> Default for Scope<'a, N>

    §

    fn default() -> Scope<'a, N>

    Returns the “default value” for a type. Read more
    §

    impl<'de> Deserialize<'de> for Scope<'de, rhai::::types::scope::Scope::{constant#0}>

    §

    fn deserialize<D>( +

    Trait Implementations§

    §

    impl Clone for Scope<'_>

    §

    fn clone(&self) -> Scope<'_>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl<'a> Debug for Scope<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> Default for Scope<'a>

    §

    fn default() -> Scope<'a>

    Returns the “default value” for a type. Read more
    §

    impl<'de> Deserialize<'de> for Scope<'de>

    §

    fn deserialize<D>( deserializer: D -) -> Result<Scope<'de, rhai::::types::scope::Scope::{constant#0}>, <D as Deserializer<'de>>::Error>where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<K> Extend<(K, Dynamic)> for Scope<'_, rhai::::types::scope::Scope::{constant#0}>where - K: Into<SmartString<LazyCompact>>,

    §

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = (K, Dynamic)>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<K> Extend<(K, bool, Dynamic)> for Scope<'_, rhai::::types::scope::Scope::{constant#0}>where - K: Into<SmartString<LazyCompact>>,

    §

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = (K, bool, Dynamic)>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<K> FromIterator<(K, Dynamic)> for Scope<'_, rhai::::types::scope::Scope::{constant#0}>where - K: Into<SmartString<LazyCompact>>,

    §

    fn from_iter<T>(iter: T) -> Scope<'_, rhai::::types::scope::Scope::{constant#0}>where - T: IntoIterator<Item = (K, Dynamic)>,

    Creates a value from an iterator. Read more
    §

    impl<K> FromIterator<(K, bool, Dynamic)> for Scope<'_, rhai::::types::scope::Scope::{constant#0}>where - K: Into<SmartString<LazyCompact>>,

    §

    fn from_iter<T>(iter: T) -> Scope<'_, rhai::::types::scope::Scope::{constant#0}>where - T: IntoIterator<Item = (K, bool, Dynamic)>,

    Creates a value from an iterator. Read more
    §

    impl<'a, const N: usize> Hash for Scope<'a, N>

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl<'a> IntoIterator for &'a Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    §

    type Item = (&'a SmartString<LazyCompact>, &'a Dynamic, &'a Vec<ImmutableString, Global>)

    The type of the elements being iterated over.
    §

    type IntoIter = Box<dyn Iterator<Item = <&'a Scope<'_, rhai::::types::scope::Scope::{constant#0}> as IntoIterator>::Item> + 'a, Global>

    Which kind of iterator are we turning this into?
    §

    fn into_iter( - self -) -> <&'a Scope<'_, rhai::::types::scope::Scope::{constant#0}> as IntoIterator>::IntoIter

    Creates an iterator from a value. Read more
    §

    impl IntoIterator for Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    §

    type Item = (String, Dynamic, Vec<ImmutableString, Global>)

    The type of the elements being iterated over.
    §

    type IntoIter = Box<dyn Iterator<Item = <Scope<'_, rhai::::types::scope::Scope::{constant#0}> as IntoIterator>::Item>, Global>

    Which kind of iterator are we turning this into?
    §

    fn into_iter( - self -) -> <Scope<'_, rhai::::types::scope::Scope::{constant#0}> as IntoIterator>::IntoIter

    Creates an iterator from a value. Read more
    §

    impl Serialize for Scope<'_, rhai::::types::scope::Scope::{constant#0}>

    §

    fn serialize<S>( +) -> Result<Scope<'de>, <D as Deserializer<'de>>::Error>where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Scope<'_>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<K> Extend<(K, Dynamic)> for Scope<'_>where + K: Into<SmartString<LazyCompact>>,

    §

    fn extend<T>(&mut self, iter: T)where + T: IntoIterator<Item = (K, Dynamic)>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<K> Extend<(K, bool, Dynamic)> for Scope<'_>where + K: Into<SmartString<LazyCompact>>,

    §

    fn extend<T>(&mut self, iter: T)where + T: IntoIterator<Item = (K, bool, Dynamic)>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    §

    impl<K> FromIterator<(K, Dynamic)> for Scope<'_>where + K: Into<SmartString<LazyCompact>>,

    §

    fn from_iter<T>(iter: T) -> Scope<'_>where + T: IntoIterator<Item = (K, Dynamic)>,

    Creates a value from an iterator. Read more
    §

    impl<K> FromIterator<(K, bool, Dynamic)> for Scope<'_>where + K: Into<SmartString<LazyCompact>>,

    §

    fn from_iter<T>(iter: T) -> Scope<'_>where + T: IntoIterator<Item = (K, bool, Dynamic)>,

    Creates a value from an iterator. Read more
    §

    impl<'a> Hash for Scope<'a>

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl<'a> IntoIterator for &'a Scope<'_>

    §

    type Item = (&'a str, &'a Dynamic, &'a [ImmutableString])

    The type of the elements being iterated over.
    §

    type IntoIter = Box<dyn Iterator<Item = <&'a Scope<'_> as IntoIterator>::Item> + 'a, Global>

    Which kind of iterator are we turning this into?
    §

    fn into_iter(self) -> <&'a Scope<'_> as IntoIterator>::IntoIter

    Creates an iterator from a value. Read more
    §

    impl IntoIterator for Scope<'_>

    §

    type Item = (String, Dynamic, Vec<ImmutableString, Global>)

    The type of the elements being iterated over.
    §

    type IntoIter = Box<dyn Iterator<Item = <Scope<'_> as IntoIterator>::Item>, Global>

    Which kind of iterator are we turning this into?
    §

    fn into_iter(self) -> <Scope<'_> as IntoIterator>::IntoIter

    Creates an iterator from a value. Read more
    §

    impl Serialize for Scope<'_>

    §

    fn serialize<S>( &self, ser: S -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    §

    impl<'a, const N: usize = rhai::::types::scope::Scope::{constant#0}> !RefUnwindSafe for Scope<'a, N>

    §

    impl<'a, const N: usize> Send for Scope<'a, N>

    §

    impl<'a, const N: usize> Sync for Scope<'a, N>

    §

    impl<'a, const N: usize> Unpin for Scope<'a, N>

    §

    impl<'a, const N: usize = rhai::::types::scope::Scope::{constant#0}> !UnwindSafe for Scope<'a, N>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where + S: Serializer,
    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    §

    impl<'a> !RefUnwindSafe for Scope<'a>

    §

    impl<'a> Send for Scope<'a>

    §

    impl<'a> Sync for Scope<'a>

    §

    impl<'a> Unpin for Scope<'a>

    §

    impl<'a> !UnwindSafe for Scope<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.Shared.html b/casbin/rhai/struct.Shared.html index 1edb6c3a..eeb82564 100644 --- a/casbin/rhai/struct.Shared.html +++ b/casbin/rhai/struct.Shared.html @@ -1,8 +1,9 @@ -Shared in casbin::rhai - Rust

    Struct casbin::rhai::Shared

    1.0.0 · source ·
    pub struct Shared<T>where
    -    T: ?Sized,{ /* private fields */ }
    Expand description

    A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically +Shared in casbin::rhai - Rust

    Struct casbin::rhai::Shared

    1.0.0 · source ·
    pub struct Shared<T, A = Global>where
    +    A: Allocator,
    +    T: ?Sized,{ /* private fields */ }
    Expand description

    A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.

    The type Arc<T> provides shared ownership of a value of type T, -allocated in the heap. Invoking clone on Arc produces +allocated in the heap. Invoking clone on Arc produces a new Arc instance, which points to the same allocation on the heap as the source Arc, while increasing a reference count. When the last Arc pointer to a given allocation is destroyed, the value stored in that allocation (often @@ -10,47 +11,47 @@

    Shared references in Rust disallow mutation by default, and Arc is no exception: you cannot generally obtain a mutable reference to something inside an Arc. If you need to mutate through an Arc, use -Mutex, RwLock, or one of the Atomic +Mutex, RwLock, or one of the Atomic types.

    Note: This type is only available on platforms that support atomic loads and stores of pointers, which includes all platforms that support -the std crate but not all those which only support alloc. +the std crate but not all those which only support alloc. This may be detected at compile time using #[cfg(target_has_atomic = "ptr")].

    Thread Safety

    -

    Unlike Rc<T>, Arc<T> uses atomic operations for its reference +

    Unlike Rc<T>, Arc<T> uses atomic operations for its reference counting. This means that it is thread-safe. The disadvantage is that atomic operations are more expensive than ordinary memory accesses. If you are not sharing reference-counted allocations between threads, consider using -Rc<T> for lower overhead. Rc<T> is a safe default, because the -compiler will catch any attempt to send an Rc<T> between threads. +Rc<T> for lower overhead. Rc<T> is a safe default, because the +compiler will catch any attempt to send an Rc<T> between threads. However, a library might choose Arc<T> in order to give library consumers more flexibility.

    -

    Arc<T> will implement Send and Sync as long as the T implements -Send and Sync. Why can’t you put a non-thread-safe type T in an +

    Arc<T> will implement Send and Sync as long as the T implements +Send and Sync. Why can’t you put a non-thread-safe type T in an Arc<T> to make it thread-safe? This may be a bit counter-intuitive at first: after all, isn’t the point of Arc<T> thread safety? The key is this: Arc<T> makes it thread safe to have multiple ownership of the same data, but it doesn’t add thread safety to its data. Consider -Arc<RefCell<T>>. RefCell<T> isn’t Sync, and if Arc<T> was always -Send, Arc<RefCell<T>> would be as well. But then we’d have a problem: -RefCell<T> is not thread safe; it keeps track of the borrowing count using +Arc<RefCell<T>>. RefCell<T> isn’t Sync, and if Arc<T> was always +Send, Arc<RefCell<T>> would be as well. But then we’d have a problem: +RefCell<T> is not thread safe; it keeps track of the borrowing count using non-atomic operations.

    In the end, this means that you may need to pair Arc<T> with some sort of std::sync type, usually Mutex<T>.

    Breaking cycles with Weak

    The downgrade method can be used to create a non-owning -Weak pointer. A Weak pointer can be upgraded -to an Arc, but this will return None if the value stored in the allocation has +Weak pointer. A Weak pointer can be upgraded +to an Arc, but this will return None if the value stored in the allocation has already been dropped. In other words, Weak pointers do not keep the value inside the allocation alive; however, they do keep the allocation (the backing store for the value) alive.

    A cycle between Arc pointers will never be deallocated. For this reason, -Weak is used to break cycles. For example, a tree could have -strong Arc pointers from parent nodes to children, and Weak +Weak is used to break cycles. For example, a tree could have +strong Arc pointers from parent nodes to children, and Weak pointers from children back to their parents.

    Cloning references

    Creating a new reference from an existing reference-counted pointer is done using the -Clone trait implemented for Arc<T> and Weak<T>.

    +Clone trait implemented for Arc<T> and Weak<T>.

    use std::sync::Arc;
     let foo = Arc::new(vec![1.0, 2.0, 3.0]);
    @@ -59,7 +60,7 @@ 

    Cloning references let b = Arc::clone(&foo); // a, b, and foo are all Arcs that point to the same memory location

    Deref behavior

    -

    Arc<T> automatically dereferences to T (via the Deref trait), +

    Arc<T> automatically dereferences to T (via the Deref trait), so you can call T’s methods on a value of type Arc<T>. To avoid name clashes with T’s methods, the methods of Arc<T> itself are associated functions, called using fully qualified syntax:

    @@ -79,7 +80,7 @@

    Deref behaviorlet arc2 = arc.clone(); // Fully qualified syntax let arc3 = Arc::clone(&arc);

    -

    Weak<T> does not auto-dereference to T, because the inner value may have +

    Weak<T> does not auto-dereference to T, because the inner value may have already been dropped.

    Examples

    Sharing some immutable data between threads:

    @@ -96,7 +97,7 @@

    Examples

    println!("{five:?}"); }); }
    -

    Sharing a mutable AtomicUsize:

    +

    Sharing a mutable AtomicUsize:

    use std::sync::Arc;
     use std::sync::atomic::{AtomicUsize, Ordering};
    @@ -112,15 +113,15 @@ 

    Examples

    println!("{v:?}"); }); }
    -

    See the rc documentation for more examples of reference +

    See the rc documentation for more examples of reference counting in general.

    -

    Implementations§

    source§

    impl<T> Arc<T>

    source

    pub fn new(data: T) -> Arc<T>

    Constructs a new Arc<T>.

    +

    Implementations§

    source§

    impl<T> Arc<T, Global>

    source

    pub fn new(data: T) -> Arc<T, Global>

    Constructs a new Arc<T>.

    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
    -
    1.60.0 · source

    pub fn new_cyclic<F>(data_fn: F) -> Arc<T>where - F: FnOnce(&Weak<T>) -> T,

    Constructs a new Arc<T> while giving you a Weak<T> to the allocation, +

    1.60.0 · source

    pub fn new_cyclic<F>(data_fn: F) -> Arc<T, Global>where + F: FnOnce(&Weak<T, Global>) -> T,

    Constructs a new Arc<T> while giving you a Weak<T> to the allocation, to allow you to construct a T which holds a weak pointer to itself.

    Generally, a structure circularly referencing itself, either directly or indirectly, should not hold a strong reference to itself to prevent a memory leak. @@ -132,11 +133,11 @@

    Examples
    and only afterwards completes the construction of the Arc<T> by placing the T returned from your closure into the allocation.

    Since the new Arc<T> is not fully-constructed until Arc<T>::new_cyclic -returns, calling upgrade on the weak reference inside your closure will +returns, calling upgrade on the weak reference inside your closure will fail and result in a None value.

    Panics

    If data_fn panics, the panic is propagated to the caller, and the -temporary Weak<T> is dropped normally.

    +temporary Weak<T> is dropped normally.

    Example
    use std::sync::{Arc, Weak};
     
    @@ -160,7 +161,7 @@ 
    Example
    self.me.upgrade().unwrap() } }
    -
    source

    pub fn new_uninit() -> Arc<MaybeUninit<T>>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new Arc with uninitialized contents.

    +
    source

    pub fn new_uninit() -> Arc<MaybeUninit<T>, Global>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new Arc with uninitialized contents.

    Examples
    #![feature(new_uninit)]
     #![feature(get_mut_unchecked)]
    @@ -175,7 +176,7 @@ 
    Examples
    let five = unsafe { five.assume_init() }; assert_eq!(*five, 5)
    -
    source

    pub fn new_zeroed() -> Arc<MaybeUninit<T>>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new Arc with uninitialized contents, with the memory +

    source

    pub fn new_zeroed() -> Arc<MaybeUninit<T>, Global>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new Arc with uninitialized contents, with the memory being filled with 0 bytes.

    See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

    @@ -188,16 +189,16 @@
    Examples
    let zero = unsafe { zero.assume_init() }; assert_eq!(*zero, 0)
    -
    1.33.0 · source

    pub fn pin(data: T) -> Pin<Arc<T>>

    Constructs a new Pin<Arc<T>>. If T does not implement Unpin, then +

    1.33.0 · source

    pub fn pin(data: T) -> Pin<Arc<T, Global>>

    Constructs a new Pin<Arc<T>>. If T does not implement Unpin, then data will be pinned in memory and unable to be moved.

    -
    source

    pub fn try_pin(data: T) -> Result<Pin<Arc<T>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Pin<Arc<T>>, return an error if allocation fails.

    -
    source

    pub fn try_new(data: T) -> Result<Arc<T>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc<T>, returning an error if allocation fails.

    +
    source

    pub fn try_pin(data: T) -> Result<Pin<Arc<T, Global>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Pin<Arc<T>>, return an error if allocation fails.

    +
    source

    pub fn try_new(data: T) -> Result<Arc<T, Global>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc<T>, returning an error if allocation fails.

    Examples
    #![feature(allocator_api)]
     use std::sync::Arc;
     
     let five = Arc::try_new(5)?;
    -
    source

    pub fn try_new_uninit() -> Result<Arc<MaybeUninit<T>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, returning an error +

    source

    pub fn try_new_uninit() -> Result<Arc<MaybeUninit<T>, Global>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, returning an error if allocation fails.

    Examples
    #![feature(new_uninit, allocator_api)]
    @@ -213,7 +214,7 @@ 
    Examples
    let five = unsafe { five.assume_init() }; assert_eq!(*five, 5);
    -
    source

    pub fn try_new_zeroed() -> Result<Arc<MaybeUninit<T>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, with the memory +

    source

    pub fn try_new_zeroed() -> Result<Arc<MaybeUninit<T>, Global>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, with the memory being filled with 0 bytes, returning an error if allocation fails.

    See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

    @@ -226,21 +227,114 @@
    Examples
    let zero = unsafe { zero.assume_init() }; assert_eq!(*zero, 0);
    -
    1.4.0 · source

    pub fn try_unwrap(this: Arc<T>) -> Result<T, Arc<T>>

    Returns the inner value, if the Arc has exactly one strong reference.

    -

    Otherwise, an Err is returned with the same Arc that was +

    source§

    impl<T, A> Arc<T, A>where + A: Allocator,

    source

    pub fn allocator(this: &Arc<T, A>) -> &A

    🔬This is a nightly-only experimental API. (allocator_api)

    Returns a reference to the underlying allocator.

    +

    Note: this is an associated function, which means that you have +to call it as Arc::allocator(&a) instead of a.allocator(). This +is so that there is no conflict with a method on the inner type.

    +
    source

    pub fn new_in(data: T, alloc: A) -> Arc<T, A>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc<T> in the provided allocator.

    +
    Examples
    +
    #![feature(allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let five = Arc::new_in(5, System);
    +
    source

    pub fn new_uninit_in(alloc: A) -> Arc<MaybeUninit<T>, A>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents in the provided allocator.

    +
    Examples
    +
    #![feature(new_uninit)]
    +#![feature(get_mut_unchecked)]
    +#![feature(allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let mut five = Arc::<u32, _>::new_uninit_in(System);
    +
    +let five = unsafe {
    +    // Deferred initialization:
    +    Arc::get_mut_unchecked(&mut five).as_mut_ptr().write(5);
    +
    +    five.assume_init()
    +};
    +
    +assert_eq!(*five, 5)
    +
    source

    pub fn new_zeroed_in(alloc: A) -> Arc<MaybeUninit<T>, A>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, with the memory +being filled with 0 bytes, in the provided allocator.

    +

    See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

    +
    Examples
    +
    #![feature(new_uninit)]
    +#![feature(allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let zero = Arc::<u32, _>::new_zeroed_in(System);
    +let zero = unsafe { zero.assume_init() };
    +
    +assert_eq!(*zero, 0)
    +
    source

    pub fn pin_in(data: T, alloc: A) -> Pin<Arc<T, A>>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Pin<Arc<T, A>> in the provided allocator. If T does not implement Unpin, +then data will be pinned in memory and unable to be moved.

    +
    source

    pub fn try_pin_in(data: T, alloc: A) -> Result<Pin<Arc<T, A>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Pin<Arc<T, A>> in the provided allocator, return an error if allocation +fails.

    +
    source

    pub fn try_new_in(data: T, alloc: A) -> Result<Arc<T, A>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc<T, A> in the provided allocator, returning an error if allocation fails.

    +
    Examples
    +
    #![feature(allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let five = Arc::try_new_in(5, System)?;
    +
    source

    pub fn try_new_uninit_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, in the provided allocator, returning an +error if allocation fails.

    +
    Examples
    +
    #![feature(new_uninit, allocator_api)]
    +#![feature(get_mut_unchecked)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let mut five = Arc::<u32, _>::try_new_uninit_in(System)?;
    +
    +let five = unsafe {
    +    // Deferred initialization:
    +    Arc::get_mut_unchecked(&mut five).as_mut_ptr().write(5);
    +
    +    five.assume_init()
    +};
    +
    +assert_eq!(*five, 5);
    +
    source

    pub fn try_new_zeroed_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs a new Arc with uninitialized contents, with the memory +being filled with 0 bytes, in the provided allocator, returning an error if allocation +fails.

    +

    See MaybeUninit::zeroed for examples of correct and incorrect usage +of this method.

    +
    Examples
    +
    #![feature(new_uninit, allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let zero = Arc::<u32, _>::try_new_zeroed_in(System)?;
    +let zero = unsafe { zero.assume_init() };
    +
    +assert_eq!(*zero, 0);
    +
    1.4.0 · source

    pub fn try_unwrap(this: Arc<T, A>) -> Result<T, Arc<T, A>>

    Returns the inner value, if the Arc has exactly one strong reference.

    +

    Otherwise, an Err is returned with the same Arc that was passed in.

    This will succeed even if there are outstanding weak references.

    It is strongly recommended to use Arc::into_inner instead if you don’t -want to keep the Arc in the Err case. -Immediately dropping the Err payload, like in the expression +want to keep the Arc in the Err case. +Immediately dropping the Err payload, like in the expression Arc::try_unwrap(this).ok(), can still cause the strong count to drop to zero and the inner value of the Arc to be dropped: For instance if two threads each execute this expression in parallel, then there is a race condition. The threads could first both check whether they have the last clone of their Arc via Arc::try_unwrap, and then -both drop their Arc in the call to ok, +both drop their Arc in the call to ok, taking the strong count from two down to zero.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let x = Arc::new(3);
    @@ -249,8 +343,8 @@ 
    Examples
    let x = Arc::new(4); let _y = Arc::clone(&x); assert_eq!(*Arc::try_unwrap(x).unwrap_err(), 4);
    -
    1.70.0 · source

    pub fn into_inner(this: Arc<T>) -> Option<T>

    Returns the inner value, if the Arc has exactly one strong reference.

    -

    Otherwise, None is returned and the Arc is dropped.

    +
    1.70.0 · source

    pub fn into_inner(this: Arc<T, A>) -> Option<T>

    Returns the inner value, if the Arc has exactly one strong reference.

    +

    Otherwise, None is returned and the Arc is dropped.

    This will succeed even if there are outstanding weak references.

    If Arc::into_inner is called on every clone of this Arc, it is guaranteed that exactly one of the calls returns the inner value. @@ -258,7 +352,7 @@

    Examples

    The similar expression Arc::try_unwrap(this).ok() does not offer such a guarantee. See the last example below and the documentation of Arc::try_unwrap.

    -
    Examples
    +
    Examples

    Minimal example demonstrating the guarantee that Arc::into_inner gives.

    use std::sync::Arc;
    @@ -324,8 +418,8 @@ 
    Examples
    let y_thread = std::thread::spawn(|| drop(y)); x_thread.join().unwrap(); y_thread.join().unwrap();
    -
    source§

    impl<T> Arc<[T]>

    source

    pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new atomically reference-counted slice with uninitialized contents.

    -
    Examples
    +
    source§

    impl<T> Arc<[T], Global>

    source

    pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>], Global>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new atomically reference-counted slice with uninitialized contents.

    +
    Examples
    #![feature(new_uninit)]
     #![feature(get_mut_unchecked)]
     
    @@ -342,11 +436,11 @@ 
    Examples
    let values = unsafe { values.assume_init() }; assert_eq!(*values, [1, 2, 3])
    -
    source

    pub fn new_zeroed_slice(len: usize) -> Arc<[MaybeUninit<T>]>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new atomically reference-counted slice with uninitialized contents, with the memory being +

    source

    pub fn new_zeroed_slice(len: usize) -> Arc<[MaybeUninit<T>], Global>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new atomically reference-counted slice with uninitialized contents, with the memory being filled with 0 bytes.

    See MaybeUninit::zeroed for examples of correct and incorrect usage of this method.

    -
    Examples
    +
    Examples
    #![feature(new_uninit)]
     
     use std::sync::Arc;
    @@ -355,14 +449,54 @@ 
    Examples
    let values = unsafe { values.assume_init() }; assert_eq!(*values, [0, 0, 0])
    -
    source§

    impl<T> Arc<MaybeUninit<T>>

    source

    pub unsafe fn assume_init(self) -> Arc<T>

    🔬This is a nightly-only experimental API. (new_uninit)

    Converts to Arc<T>.

    +
    source§

    impl<T, A> Arc<[T], A>where + A: Allocator,

    source

    pub fn new_uninit_slice_in(len: usize, alloc: A) -> Arc<[MaybeUninit<T>], A>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new atomically reference-counted slice with uninitialized contents in the +provided allocator.

    +
    Examples
    +
    #![feature(new_uninit)]
    +#![feature(get_mut_unchecked)]
    +#![feature(allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let mut values = Arc::<[u32], _>::new_uninit_slice_in(3, System);
    +
    +let values = unsafe {
    +    // Deferred initialization:
    +    Arc::get_mut_unchecked(&mut values)[0].as_mut_ptr().write(1);
    +    Arc::get_mut_unchecked(&mut values)[1].as_mut_ptr().write(2);
    +    Arc::get_mut_unchecked(&mut values)[2].as_mut_ptr().write(3);
    +
    +    values.assume_init()
    +};
    +
    +assert_eq!(*values, [1, 2, 3])
    +
    source

    pub fn new_zeroed_slice_in(len: usize, alloc: A) -> Arc<[MaybeUninit<T>], A>

    🔬This is a nightly-only experimental API. (new_uninit)

    Constructs a new atomically reference-counted slice with uninitialized contents, with the memory being +filled with 0 bytes, in the provided allocator.

    +

    See MaybeUninit::zeroed for examples of correct and +incorrect usage of this method.

    +
    Examples
    +
    #![feature(new_uninit)]
    +#![feature(allocator_api)]
    +
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let values = Arc::<[u32], _>::new_zeroed_slice_in(3, System);
    +let values = unsafe { values.assume_init() };
    +
    +assert_eq!(*values, [0, 0, 0])
    +
    source§

    impl<T, A> Arc<MaybeUninit<T>, A>where + A: Allocator,

    source

    pub unsafe fn assume_init(self) -> Arc<T, A>where + A: Clone,

    🔬This is a nightly-only experimental API. (new_uninit)

    Converts to Arc<T>.

    Safety

    As with MaybeUninit::assume_init, it is up to the caller to guarantee that the inner value really is in an initialized state. Calling this when the content is not yet fully initialized causes immediate undefined behavior.

    -
    Examples
    +
    Examples
    #![feature(new_uninit)]
     #![feature(get_mut_unchecked)]
     
    @@ -376,14 +510,16 @@ 
    Examples
    let five = unsafe { five.assume_init() }; assert_eq!(*five, 5)
    -
    source§

    impl<T> Arc<[MaybeUninit<T>]>

    source

    pub unsafe fn assume_init(self) -> Arc<[T]>

    🔬This is a nightly-only experimental API. (new_uninit)

    Converts to Arc<[T]>.

    +
    source§

    impl<T, A> Arc<[MaybeUninit<T>], A>where + A: Allocator,

    source

    pub unsafe fn assume_init(self) -> Arc<[T], A>where + A: Clone,

    🔬This is a nightly-only experimental API. (new_uninit)

    Converts to Arc<[T]>.

    Safety

    As with MaybeUninit::assume_init, it is up to the caller to guarantee that the inner value really is in an initialized state. Calling this when the content is not yet fully initialized causes immediate undefined behavior.

    -
    Examples
    +
    Examples
    #![feature(new_uninit)]
     #![feature(get_mut_unchecked)]
     
    @@ -400,20 +536,93 @@ 
    Examples
    let values = unsafe { values.assume_init() }; assert_eq!(*values, [1, 2, 3])
    -
    source§

    impl<T> Arc<T>where - T: ?Sized,

    1.17.0 · source

    pub fn into_raw(this: Arc<T>) -> *const T

    Consumes the Arc, returning the wrapped pointer.

    +
    source§

    impl<T> Arc<T, Global>where + T: ?Sized,

    1.17.0 · source

    pub unsafe fn from_raw(ptr: *const T) -> Arc<T, Global>

    Constructs an Arc<T> from a raw pointer.

    +

    The raw pointer must have been previously returned by a call to +Arc<U>::into_raw where U must have the same size and +alignment as T. This is trivially true if U is T. +Note that if U is not T but has the same size and alignment, this is +basically like transmuting references of different types. See +mem::transmute for more information on what +restrictions apply in this case.

    +

    The user of from_raw has to make sure a specific value of T is only +dropped once.

    +

    This function is unsafe because improper use may lead to memory unsafety, +even if the returned Arc<T> is never accessed.

    +
    Examples
    +
    use std::sync::Arc;
    +
    +let x = Arc::new("hello".to_owned());
    +let x_ptr = Arc::into_raw(x);
    +
    +unsafe {
    +    // Convert back to an `Arc` to prevent leak.
    +    let x = Arc::from_raw(x_ptr);
    +    assert_eq!(&*x, "hello");
    +
    +    // Further calls to `Arc::from_raw(x_ptr)` would be memory-unsafe.
    +}
    +
    +// The memory was freed when `x` went out of scope above, so `x_ptr` is now dangling!
    +
    1.51.0 · source

    pub unsafe fn increment_strong_count(ptr: *const T)

    Increments the strong reference count on the Arc<T> associated with the +provided pointer by one.

    +
    Safety
    +

    The pointer must have been obtained through Arc::into_raw, and the +associated Arc instance must be valid (i.e. the strong count must be at +least 1) for the duration of this method.

    +
    Examples
    +
    use std::sync::Arc;
    +
    +let five = Arc::new(5);
    +
    +unsafe {
    +    let ptr = Arc::into_raw(five);
    +    Arc::increment_strong_count(ptr);
    +
    +    // This assertion is deterministic because we haven't shared
    +    // the `Arc` between threads.
    +    let five = Arc::from_raw(ptr);
    +    assert_eq!(2, Arc::strong_count(&five));
    +}
    +
    1.51.0 · source

    pub unsafe fn decrement_strong_count(ptr: *const T)

    Decrements the strong reference count on the Arc<T> associated with the +provided pointer by one.

    +
    Safety
    +

    The pointer must have been obtained through Arc::into_raw, and the +associated Arc instance must be valid (i.e. the strong count must be at +least 1) when invoking this method. This method can be used to release the final +Arc and backing storage, but should not be called after the final Arc has been +released.

    +
    Examples
    +
    use std::sync::Arc;
    +
    +let five = Arc::new(5);
    +
    +unsafe {
    +    let ptr = Arc::into_raw(five);
    +    Arc::increment_strong_count(ptr);
    +
    +    // Those assertions are deterministic because we haven't shared
    +    // the `Arc` between threads.
    +    let five = Arc::from_raw(ptr);
    +    assert_eq!(2, Arc::strong_count(&five));
    +    Arc::decrement_strong_count(ptr);
    +    assert_eq!(1, Arc::strong_count(&five));
    +}
    +
    source§

    impl<T, A> Arc<T, A>where + A: Allocator, + T: ?Sized,

    1.17.0 · source

    pub fn into_raw(this: Arc<T, A>) -> *const T

    Consumes the Arc, returning the wrapped pointer.

    To avoid a memory leak the pointer must be converted back to an Arc using Arc::from_raw.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let x = Arc::new("hello".to_owned());
     let x_ptr = Arc::into_raw(x);
     assert_eq!(unsafe { &*x_ptr }, "hello");
    -
    1.45.0 · source

    pub fn as_ptr(this: &Arc<T>) -> *const T

    Provides a raw pointer to the data.

    +
    1.45.0 · source

    pub fn as_ptr(this: &Arc<T, A>) -> *const T

    Provides a raw pointer to the data.

    The counts are not affected in any way and the Arc is not consumed. The pointer is valid for as long as there are strong counts in the Arc.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let x = Arc::new("hello".to_owned());
    @@ -421,46 +630,51 @@ 
    Examples
    let x_ptr = Arc::as_ptr(&x); assert_eq!(x_ptr, Arc::as_ptr(&y)); assert_eq!(unsafe { &*x_ptr }, "hello");
    -
    1.17.0 · source

    pub unsafe fn from_raw(ptr: *const T) -> Arc<T>

    Constructs an Arc<T> from a raw pointer.

    +
    source

    pub unsafe fn from_raw_in(ptr: *const T, alloc: A) -> Arc<T, A>

    🔬This is a nightly-only experimental API. (allocator_api)

    Constructs an Arc<T, A> from a raw pointer.

    The raw pointer must have been previously returned by a call to -Arc<U>::into_raw where U must have the same size and +Arc<U, A>::into_raw where U must have the same size and alignment as T. This is trivially true if U is T. Note that if U is not T but has the same size and alignment, this is basically like transmuting references of different types. See mem::transmute for more information on what restrictions apply in this case.

    +

    The raw pointer must point to a block of memory allocated by alloc

    The user of from_raw has to make sure a specific value of T is only dropped once.

    This function is unsafe because improper use may lead to memory unsafety, even if the returned Arc<T> is never accessed.

    -
    Examples
    -
    use std::sync::Arc;
    +
    Examples
    +
    #![feature(allocator_api)]
     
    -let x = Arc::new("hello".to_owned());
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let x = Arc::new_in("hello".to_owned(), System);
     let x_ptr = Arc::into_raw(x);
     
     unsafe {
         // Convert back to an `Arc` to prevent leak.
    -    let x = Arc::from_raw(x_ptr);
    +    let x = Arc::from_raw_in(x_ptr, System);
         assert_eq!(&*x, "hello");
     
         // Further calls to `Arc::from_raw(x_ptr)` would be memory-unsafe.
     }
     
     // The memory was freed when `x` went out of scope above, so `x_ptr` is now dangling!
    -
    1.4.0 · source

    pub fn downgrade(this: &Arc<T>) -> Weak<T>

    Creates a new Weak pointer to this allocation.

    -
    Examples
    +
    1.4.0 · source

    pub fn downgrade(this: &Arc<T, A>) -> Weak<T, A>where + A: Clone,

    Creates a new Weak pointer to this allocation.

    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     let weak_five = Arc::downgrade(&five);
    -
    1.15.0 · source

    pub fn weak_count(this: &Arc<T>) -> usize

    Gets the number of Weak pointers to this allocation.

    -
    Safety
    +
    1.15.0 · source

    pub fn weak_count(this: &Arc<T, A>) -> usize

    Gets the number of Weak pointers to this allocation.

    +
    Safety

    This method by itself is safe, but using it correctly requires extra care. Another thread can change the weak count at any time, including potentially between calling this method and acting on the result.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
    @@ -469,12 +683,12 @@ 
    Examples
    // This assertion is deterministic because we haven't shared // the `Arc` or `Weak` between threads. assert_eq!(1, Arc::weak_count(&five));
    -
    1.15.0 · source

    pub fn strong_count(this: &Arc<T>) -> usize

    Gets the number of strong (Arc) pointers to this allocation.

    -
    Safety
    +
    1.15.0 · source

    pub fn strong_count(this: &Arc<T, A>) -> usize

    Gets the number of strong (Arc) pointers to this allocation.

    +
    Safety

    This method by itself is safe, but using it correctly requires extra care. Another thread can change the strong count at any time, including potentially between calling this method and acting on the result.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
    @@ -483,53 +697,62 @@ 
    Examples
    // This assertion is deterministic because we haven't shared // the `Arc` between threads. assert_eq!(2, Arc::strong_count(&five));
    -
    1.51.0 · source

    pub unsafe fn increment_strong_count(ptr: *const T)

    Increments the strong reference count on the Arc<T> associated with the +

    source

    pub unsafe fn increment_strong_count_in(ptr: *const T, alloc: A)where + A: Clone,

    🔬This is a nightly-only experimental API. (allocator_api)

    Increments the strong reference count on the Arc<T> associated with the provided pointer by one.

    -
    Safety
    +
    Safety

    The pointer must have been obtained through Arc::into_raw, and the associated Arc instance must be valid (i.e. the strong count must be at -least 1) for the duration of this method.

    -
    Examples
    -
    use std::sync::Arc;
    +least 1) for the duration of this method,, and ptr must point to a block of memory
    +allocated by alloc.

    +
    Examples
    +
    #![feature(allocator_api)]
     
    -let five = Arc::new(5);
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let five = Arc::new_in(5, System);
     
     unsafe {
         let ptr = Arc::into_raw(five);
    -    Arc::increment_strong_count(ptr);
    +    Arc::increment_strong_count_in(ptr, System);
     
         // This assertion is deterministic because we haven't shared
         // the `Arc` between threads.
    -    let five = Arc::from_raw(ptr);
    +    let five = Arc::from_raw_in(ptr, System);
         assert_eq!(2, Arc::strong_count(&five));
     }
    -
    1.51.0 · source

    pub unsafe fn decrement_strong_count(ptr: *const T)

    Decrements the strong reference count on the Arc<T> associated with the +

    source

    pub unsafe fn decrement_strong_count_in(ptr: *const T, alloc: A)

    🔬This is a nightly-only experimental API. (allocator_api)

    Decrements the strong reference count on the Arc<T> associated with the provided pointer by one.

    -
    Safety
    -

    The pointer must have been obtained through Arc::into_raw, and the +

    Safety
    +

    The pointer must have been obtained through Arc::into_raw, the associated Arc instance must be valid (i.e. the strong count must be at -least 1) when invoking this method. This method can be used to release the final +least 1) when invoking this method, and ptr must point to a block of memory +allocated by alloc. This method can be used to release the final Arc and backing storage, but should not be called after the final Arc has been released.

    -
    Examples
    -
    use std::sync::Arc;
    +
    Examples
    +
    #![feature(allocator_api)]
     
    -let five = Arc::new(5);
    +use std::sync::Arc;
    +use std::alloc::System;
    +
    +let five = Arc::new_in(5, System);
     
     unsafe {
         let ptr = Arc::into_raw(five);
    -    Arc::increment_strong_count(ptr);
    +    Arc::increment_strong_count_in(ptr, System);
     
         // Those assertions are deterministic because we haven't shared
         // the `Arc` between threads.
    -    let five = Arc::from_raw(ptr);
    +    let five = Arc::from_raw_in(ptr, System);
         assert_eq!(2, Arc::strong_count(&five));
    -    Arc::decrement_strong_count(ptr);
    +    Arc::decrement_strong_count_in(ptr, System);
         assert_eq!(1, Arc::strong_count(&five));
     }
    -
    1.17.0 · source

    pub fn ptr_eq(this: &Arc<T>, other: &Arc<T>) -> bool

    Returns true if the two Arcs point to the same allocation in a vein similar to -ptr::eq. This function ignores the metadata of dyn Trait pointers.

    -
    Examples
    +
    1.17.0 · source

    pub fn ptr_eq(this: &Arc<T, A>, other: &Arc<T, A>) -> bool

    Returns true if the two Arcs point to the same allocation in a vein similar to +ptr::eq. This function ignores the metadata of dyn Trait pointers.

    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
    @@ -538,17 +761,18 @@ 
    Examples
    assert!(Arc::ptr_eq(&five, &same_five)); assert!(!Arc::ptr_eq(&five, &other_five));
    -
    source§

    impl<T> Arc<T>where - T: Clone,

    1.4.0 · source

    pub fn make_mut(this: &mut Arc<T>) -> &mut T

    Makes a mutable reference into the given Arc.

    +
    source§

    impl<T, A> Arc<T, A>where + T: Clone, + A: Allocator + Clone,

    1.4.0 · source

    pub fn make_mut(this: &mut Arc<T, A>) -> &mut T

    Makes a mutable reference into the given Arc.

    If there are other Arc pointers to the same allocation, then make_mut will -clone the inner value to a new allocation to ensure unique ownership. This is also +clone the inner value to a new allocation to ensure unique ownership. This is also referred to as clone-on-write.

    -

    However, if there are no other Arc pointers to this allocation, but some Weak -pointers, then the Weak pointers will be dissociated and the inner value will not +

    However, if there are no other Arc pointers to this allocation, but some Weak +pointers, then the Weak pointers will be dissociated and the inner value will not be cloned.

    See also get_mut, which will fail rather than cloning the inner value -or dissociating Weak pointers.

    -
    Examples
    +or dissociating Weak pointers.

    +
    Examples
    use std::sync::Arc;
     
     let mut data = Arc::new(5);
    @@ -562,7 +786,7 @@ 
    Examples
    // Now `data` and `other_data` point to different allocations. assert_eq!(*data, 8); assert_eq!(*other_data, 12);
    -

    Weak pointers will be dissociated:

    +

    Weak pointers will be dissociated:

    use std::sync::Arc;
     
    @@ -576,11 +800,11 @@ 
    Examples
    assert!(76 == *data); assert!(weak.upgrade().is_none());
    -
    source

    pub fn unwrap_or_clone(this: Arc<T>) -> T

    🔬This is a nightly-only experimental API. (arc_unwrap_or_clone)

    If we have the only reference to T then unwrap it. Otherwise, clone T and return the +

    source

    pub fn unwrap_or_clone(this: Arc<T, A>) -> T

    🔬This is a nightly-only experimental API. (arc_unwrap_or_clone)

    If we have the only reference to T then unwrap it. Otherwise, clone T and return the clone.

    Assuming arc_t is of type Arc<T>, this function is functionally equivalent to (*arc_t).clone(), but will avoid cloning the inner value where possible.

    -
    Examples
    +
    Examples
    #![feature(arc_unwrap_or_clone)]
     let inner = String::from("test");
     let ptr = inner.as_ptr();
    @@ -599,14 +823,15 @@ 
    Examples
    // the original `String`. let inner = Arc::unwrap_or_clone(arc2); assert!(ptr::eq(ptr, inner.as_ptr()));
    -
    source§

    impl<T> Arc<T>where - T: ?Sized,

    1.4.0 · source

    pub fn get_mut(this: &mut Arc<T>) -> Option<&mut T>

    Returns a mutable reference into the given Arc, if there are -no other Arc or Weak pointers to the same allocation.

    -

    Returns None otherwise, because it is not safe to +

    source§

    impl<T, A> Arc<T, A>where + A: Allocator, + T: ?Sized,

    1.4.0 · source

    pub fn get_mut(this: &mut Arc<T, A>) -> Option<&mut T>

    Returns a mutable reference into the given Arc, if there are +no other Arc or Weak pointers to the same allocation.

    +

    Returns None otherwise, because it is not safe to mutate a shared value.

    -

    See also make_mut, which will clone +

    See also make_mut, which will clone the inner value when there are other Arc pointers.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let mut x = Arc::new(3);
    @@ -615,16 +840,16 @@ 
    Examples
    let _y = Arc::clone(&x); assert!(Arc::get_mut(&mut x).is_none());
    -
    source

    pub unsafe fn get_mut_unchecked(this: &mut Arc<T>) -> &mut T

    🔬This is a nightly-only experimental API. (get_mut_unchecked)

    Returns a mutable reference into the given Arc, +

    source

    pub unsafe fn get_mut_unchecked(this: &mut Arc<T, A>) -> &mut T

    🔬This is a nightly-only experimental API. (get_mut_unchecked)

    Returns a mutable reference into the given Arc, without any check.

    See also get_mut, which is safe and does appropriate checks.

    -
    Safety
    -

    If any other Arc or Weak pointers to the same allocation exist, then +

    Safety
    +

    If any other Arc or Weak pointers to the same allocation exist, then they must not be dereferenced or have active borrows for the duration of the returned borrow, and their inner type must be exactly the same as the inner type of this Rc (including lifetimes). This is trivially the case if no such pointers exist, for example immediately after Arc::new.

    -
    Examples
    +
    Examples
    #![feature(get_mut_unchecked)]
     
     use std::sync::Arc;
    @@ -664,9 +889,10 @@ 
    Examples
    } } println!("{}", &*x); // Use-after-free
    -
    source§

    impl Arc<dyn Any + Send + Sync>

    1.29.0 · source

    pub fn downcast<T>(self) -> Result<Arc<T>, Arc<dyn Any + Send + Sync>>where - T: Any + Send + Sync,

    Attempt to downcast the Arc<dyn Any + Send + Sync> to a concrete type.

    -
    Examples
    +
    source§

    impl<A> Arc<dyn Any + Sync + Send, A>where + A: Allocator + Clone,

    1.29.0 · source

    pub fn downcast<T>(self) -> Result<Arc<T, A>, Arc<dyn Any + Sync + Send, A>>where + T: Any + Send + Sync,

    Attempt to downcast the Arc<dyn Any + Send + Sync> to a concrete type.

    +
    Examples
    use std::any::Any;
     use std::sync::Arc;
     
    @@ -679,10 +905,10 @@ 
    Examples
    let my_string = "Hello World".to_string(); print_if_string(Arc::new(my_string)); print_if_string(Arc::new(0i8));
    -
    source

    pub unsafe fn downcast_unchecked<T>(self) -> Arc<T>where - T: Any + Send + Sync,

    🔬This is a nightly-only experimental API. (downcast_unchecked)

    Downcasts the Arc<dyn Any + Send + Sync> to a concrete type.

    +
    source

    pub unsafe fn downcast_unchecked<T>(self) -> Arc<T, A>where + T: Any + Send + Sync,

    🔬This is a nightly-only experimental API. (downcast_unchecked)

    Downcasts the Arc<dyn Any + Send + Sync> to a concrete type.

    For a safe alternative see downcast.

    -
    Examples
    +
    Examples
    #![feature(downcast_unchecked)]
     
     use std::any::Any;
    @@ -693,11 +919,11 @@ 
    Examples
    unsafe { assert_eq!(*x.downcast_unchecked::<usize>(), 1); }
    -
    Safety
    +
    Safety

    The contained value must be of type T. Calling this method with the incorrect type is undefined behavior.

    -

    Trait Implementations§

    1.64.0 · source§

    impl<T> AsFd for Arc<T>where - T: AsFd,

    This impl allows implementing traits that require AsFd on Arc.

    +

    Trait Implementations§

    1.64.0 · source§

    impl<T> AsFd for Arc<T, Global>where + T: AsFd,

    This impl allows implementing traits that require AsFd on Arc.

    use std::net::UdpSocket;
     use std::sync::Arc;
    @@ -705,8 +931,8 @@ 
    Safety
    trait MyTrait: AsFd {} impl MyTrait for Arc<UdpSocket> {} impl MyTrait for Box<UdpSocket> {}
    -
    source§

    fn as_fd(&self) -> BorrowedFd<'_>

    Borrows the file descriptor. Read more
    1.63.0 · source§

    impl<T> AsRawFd for Arc<T>where - T: AsRawFd,

    This impl allows implementing traits that require AsRawFd on Arc.

    +
    source§

    fn as_fd(&self) -> BorrowedFd<'_>

    Borrows the file descriptor. Read more
    1.63.0 · source§

    impl<T> AsRawFd for Arc<T, Global>where + T: AsRawFd,

    This impl allows implementing traits that require AsRawFd on Arc.

    use std::net::UdpSocket;
     use std::sync::Arc;
    @@ -714,34 +940,41 @@ 
    Safety
    } impl MyTrait for Arc<UdpSocket> {} impl MyTrait for Box<UdpSocket> {}
    -
    source§

    fn as_raw_fd(&self) -> i32

    Extracts the raw file descriptor. Read more
    1.5.0 · source§

    impl<T> AsRef<T> for Arc<T>where - T: ?Sized,

    source§

    fn as_ref(&self) -> &T

    Converts this type into a shared reference of the (usually inferred) input type.
    source§

    impl<T> Borrow<T> for Arc<T>where - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> Clone for Arc<T>where - T: ?Sized,

    source§

    fn clone(&self) -> Arc<T>

    Makes a clone of the Arc pointer.

    +
    source§

    fn as_raw_fd(&self) -> i32

    Extracts the raw file descriptor. Read more
    1.5.0 · source§

    impl<T, A> AsRef<T> for Arc<T, A>where + A: Allocator, + T: ?Sized,

    source§

    fn as_ref(&self) -> &T

    Converts this type into a shared reference of the (usually inferred) input type.
    source§

    impl<T, A> Borrow<T> for Arc<T, A>where + A: Allocator, + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T, A> Clone for Arc<T, A>where + A: Allocator + Clone, + T: ?Sized,

    source§

    fn clone(&self) -> Arc<T, A>

    Makes a clone of the Arc pointer.

    This creates another pointer to the same allocation, increasing the strong reference count.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     let _ = Arc::clone(&five);
    -
    source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl<T> Debug for Arc<T>where - T: Debug + ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Default for Arc<T>where - T: Default,

    source§

    fn default() -> Arc<T>

    Creates a new Arc<T>, with the Default value for T.

    -
    Examples
    +
    source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl<T, A> Debug for Arc<T, A>where + T: Debug + ?Sized, + A: Allocator,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Default for Arc<T, Global>where + T: Default,

    source§

    fn default() -> Arc<T, Global>

    Creates a new Arc<T>, with the Default value for T.

    +
    Examples
    use std::sync::Arc;
     
     let x: Arc<i32> = Default::default();
     assert_eq!(*x, 0);
    -
    source§

    impl<T> Deref for Arc<T>where - T: ?Sized,

    §

    type Target = T

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &T

    Dereferences the value.
    source§

    impl<T> Display for Arc<T>where - T: Display + ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T> Drop for Arc<T>where - T: ?Sized,

    source§

    fn drop(&mut self)

    Drops the Arc.

    +
    source§

    impl<T, A> Deref for Arc<T, A>where + A: Allocator, + T: ?Sized,

    §

    type Target = T

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &T

    Dereferences the value.
    source§

    impl<T, A> Display for Arc<T, A>where + T: Display + ?Sized, + A: Allocator,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    source§

    impl<T, A> Drop for Arc<T, A>where + A: Allocator, + T: ?Sized,

    source§

    fn drop(&mut self)

    Drops the Arc.

    This will decrement the strong reference count. If the strong reference count reaches zero then the only other references (if any) are -Weak, so we drop the inner value.

    -
    Examples
    +Weak, so we drop the inner value.

    +
    Examples
    use std::sync::Arc;
     
     struct Foo;
    @@ -757,67 +990,75 @@ 
    Examples
    drop(foo); // Doesn't print anything drop(foo2); // Prints "dropped!"
    -
    1.52.0 · source§

    impl<T> Error for Arc<T>where - T: Error + ?Sized,

    source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    source§

    fn provide<'a>(&'a self, req: &mut Demand<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more
    1.21.0 · source§

    impl<T> From<&[T]> for Arc<[T]>where - T: Clone,

    source§

    fn from(v: &[T]) -> Arc<[T]>

    Allocate a reference-counted slice and fill it by cloning v’s items.

    -
    Example
    +
    1.52.0 · source§

    impl<T> Error for Arc<T, Global>where + T: Error + ?Sized,

    source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    source§

    fn provide<'a>(&'a self, req: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more
    1.21.0 · source§

    impl<T> From<&[T]> for Arc<[T], Global>where + T: Clone,

    source§

    fn from(v: &[T]) -> Arc<[T], Global>

    Allocate a reference-counted slice and fill it by cloning v’s items.

    +
    Example
    let original: &[i32] = &[1, 2, 3];
     let shared: Arc<[i32]> = Arc::from(original);
     assert_eq!(&[1, 2, 3], &shared[..]);
    -
    1.24.0 · source§

    impl From<&CStr> for Arc<CStr>

    source§

    fn from(s: &CStr) -> Arc<CStr>

    Converts a &CStr into a Arc<CStr>, +

    1.24.0 · source§

    impl From<&CStr> for Arc<CStr, Global>

    source§

    fn from(s: &CStr) -> Arc<CStr, Global>

    Converts a &CStr into a Arc<CStr>, by copying the contents into a newly allocated Arc.

    -
    1.24.0 · source§

    impl From<&OsStr> for Arc<OsStr>

    source§

    fn from(s: &OsStr) -> Arc<OsStr>

    Copies the string into a newly allocated Arc<OsStr>.

    -
    1.24.0 · source§

    impl From<&Path> for Arc<Path>

    source§

    fn from(s: &Path) -> Arc<Path>

    Converts a Path into an Arc by copying the Path data into a new Arc buffer.

    -
    1.21.0 · source§

    impl From<&str> for Arc<str>

    source§

    fn from(v: &str) -> Arc<str>

    Allocate a reference-counted str and copy v into it.

    -
    Example
    +
    1.24.0 · source§

    impl From<&OsStr> for Arc<OsStr, Global>

    source§

    fn from(s: &OsStr) -> Arc<OsStr, Global>

    Copies the string into a newly allocated Arc<OsStr>.

    +
    1.24.0 · source§

    impl From<&Path> for Arc<Path, Global>

    source§

    fn from(s: &Path) -> Arc<Path, Global>

    Converts a Path into an Arc by copying the Path data into a new Arc buffer.

    +
    1.21.0 · source§

    impl From<&str> for Arc<str, Global>

    source§

    fn from(v: &str) -> Arc<str, Global>

    Allocate a reference-counted str and copy v into it.

    +
    Example
    let shared: Arc<str> = Arc::from("eggplant");
     assert_eq!("eggplant", &shared[..]);
    -
    §

    impl From<Arc<dyn PluginFunction + Send + Sync>> for CallableFunction

    §

    fn from(func: Arc<dyn PluginFunction + Send + Sync>) -> CallableFunction

    Converts to this type from the input type.
    1.62.0 · source§

    impl From<Arc<str>> for Arc<[u8]>

    source§

    fn from(rc: Arc<str>) -> Arc<[u8]>

    Converts an atomically reference-counted string slice into a byte slice.

    -
    Example
    +
    1.74.0 · source§

    impl<T, const N: usize> From<[T; N]> for Arc<[T], Global>

    source§

    fn from(v: [T; N]) -> Arc<[T], Global>

    Converts a [T; N] into an Arc<[T]>.

    +

    The conversion moves the array into a newly allocated Arc.

    +
    Example
    +
    let original: [i32; 3] = [1, 2, 3];
    +let shared: Arc<[i32]> = Arc::from(original);
    +assert_eq!(&[1, 2, 3], &shared[..]);
    +
    §

    impl From<Arc<dyn PluginFunction + Sync + Send, Global>> for CallableFunction

    §

    fn from(func: Arc<dyn PluginFunction + Sync + Send, Global>) -> CallableFunction

    Converts to this type from the input type.
    1.62.0 · source§

    impl From<Arc<str, Global>> for Arc<[u8], Global>

    source§

    fn from(rc: Arc<str, Global>) -> Arc<[u8], Global>

    Converts an atomically reference-counted string slice into a byte slice.

    +
    Example
    let string: Arc<str> = Arc::from("eggplant");
     let bytes: Arc<[u8]> = Arc::from(string);
     assert_eq!("eggplant".as_bytes(), bytes.as_ref());
    -
    1.21.0 · source§

    impl<T> From<Box<T, Global>> for Arc<T>where - T: ?Sized,

    source§

    fn from(v: Box<T, Global>) -> Arc<T>

    Move a boxed object to a new, reference-counted allocation.

    -
    Example
    +
    1.21.0 · source§

    impl<T, A> From<Box<T, A>> for Arc<T, A>where + A: Allocator, + T: ?Sized,

    source§

    fn from(v: Box<T, A>) -> Arc<T, A>

    Move a boxed object to a new, reference-counted allocation.

    +
    Example
    let unique: Box<str> = Box::from("eggplant");
     let shared: Arc<str> = Arc::from(unique);
     assert_eq!("eggplant", &shared[..]);
    -
    1.24.0 · source§

    impl From<CString> for Arc<CStr>

    source§

    fn from(s: CString) -> Arc<CStr>

    Converts a CString into an Arc<CStr> by moving the CString +

    1.24.0 · source§

    impl From<CString> for Arc<CStr, Global>

    source§

    fn from(s: CString) -> Arc<CStr, Global>

    Converts a CString into an Arc<CStr> by moving the CString data into a new Arc buffer.

    -
    1.45.0 · source§

    impl<'a, B> From<Cow<'a, B>> for Arc<B>where - B: ToOwned + ?Sized, - Arc<B>: From<&'a B> + From<<B as ToOwned>::Owned>,

    source§

    fn from(cow: Cow<'a, B>) -> Arc<B>

    Create an atomically reference-counted pointer from +

    1.45.0 · source§

    impl<'a, B> From<Cow<'a, B>> for Arc<B, Global>where + B: ToOwned + ?Sized, + Arc<B, Global>: From<&'a B> + From<<B as ToOwned>::Owned>,

    source§

    fn from(cow: Cow<'a, B>) -> Arc<B, Global>

    Create an atomically reference-counted pointer from a clone-on-write pointer by copying its content.

    -
    Example
    +
    Example
    let cow: Cow<'_, str> = Cow::Borrowed("eggplant");
     let shared: Arc<str> = Arc::from(cow);
     assert_eq!("eggplant", &shared[..]);
    -
    1.24.0 · source§

    impl From<OsString> for Arc<OsStr>

    source§

    fn from(s: OsString) -> Arc<OsStr>

    Converts an OsString into an Arc<OsStr> by moving the OsString +

    1.24.0 · source§

    impl From<OsString> for Arc<OsStr, Global>

    source§

    fn from(s: OsString) -> Arc<OsStr, Global>

    Converts an OsString into an Arc<OsStr> by moving the OsString data into a new Arc buffer.

    -
    1.24.0 · source§

    impl From<PathBuf> for Arc<Path>

    source§

    fn from(s: PathBuf) -> Arc<Path>

    Converts a PathBuf into an Arc<Path> by moving the PathBuf data +

    1.24.0 · source§

    impl From<PathBuf> for Arc<Path, Global>

    source§

    fn from(s: PathBuf) -> Arc<Path, Global>

    Converts a PathBuf into an Arc<Path> by moving the PathBuf data into a new Arc buffer.

    -
    1.21.0 · source§

    impl From<String> for Arc<str>

    source§

    fn from(v: String) -> Arc<str>

    Allocate a reference-counted str and copy v into it.

    -
    Example
    +
    1.21.0 · source§

    impl From<String> for Arc<str, Global>

    source§

    fn from(v: String) -> Arc<str, Global>

    Allocate a reference-counted str and copy v into it.

    +
    Example
    let unique: String = "eggplant".to_owned();
     let shared: Arc<str> = Arc::from(unique);
     assert_eq!("eggplant", &shared[..]);
    -
    1.6.0 · source§

    impl<T> From<T> for Arc<T>

    source§

    fn from(t: T) -> Arc<T>

    Converts a T into an Arc<T>

    +
    1.6.0 · source§

    impl<T> From<T> for Arc<T, Global>

    source§

    fn from(t: T) -> Arc<T, Global>

    Converts a T into an Arc<T>

    The conversion moves the value into a newly allocated Arc. It is equivalent to calling Arc::new(t).

    -
    Example
    +
    Example
    let x = 5;
     let arc = Arc::new(5);
     
     assert_eq!(Arc::from(x), arc);
    -
    1.21.0 · source§

    impl<T> From<Vec<T, Global>> for Arc<[T]>

    source§

    fn from(v: Vec<T, Global>) -> Arc<[T]>

    Allocate a reference-counted slice and move v’s items into it.

    -
    Example
    +
    1.21.0 · source§

    impl<T, A> From<Vec<T, A>> for Arc<[T], A>where + A: Allocator + Clone,

    source§

    fn from(v: Vec<T, A>) -> Arc<[T], A>

    Allocate a reference-counted slice and move v’s items into it.

    +
    Example
    let unique: Vec<i32> = vec![1, 2, 3];
     let shared: Arc<[i32]> = Arc::from(unique);
     assert_eq!(&[1, 2, 3], &shared[..]);
    -
    1.37.0 · source§

    impl<T> FromIterator<T> for Arc<[T]>

    source§

    fn from_iter<I>(iter: I) -> Arc<[T]>where - I: IntoIterator<Item = T>,

    Takes each element in the Iterator and collects it into an Arc<[T]>.

    +
    1.37.0 · source§

    impl<T> FromIterator<T> for Arc<[T], Global>

    source§

    fn from_iter<I>(iter: I) -> Arc<[T], Global>where + I: IntoIterator<Item = T>,

    Takes each element in the Iterator and collects it into an Arc<[T]>.

    Performance characteristics
    The general case

    In the general case, collecting into Arc<[T]> is done by first collecting into a Vec<T>. That is, when writing the following:

    @@ -835,122 +1076,144 @@
    Iterator a single allocation will be made for the Arc<[T]>. For example:

    let evens: Arc<[u8]> = (0..10).collect(); // Just a single allocation happens here.
    -
    source§

    impl<T> Hash for Arc<T>where - T: Hash + ?Sized,

    source§

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl<T> Ord for Arc<T>where - T: Ord + ?Sized,

    source§

    fn cmp(&self, other: &Arc<T>) -> Ordering

    Comparison for two Arcs.

    +
    source§

    impl<T, A> Hash for Arc<T, A>where + T: Hash + ?Sized, + A: Allocator,

    source§

    fn hash<H>(&self, state: &mut H)where + H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl<T, A> Ord for Arc<T, A>where + T: Ord + ?Sized, + A: Allocator,

    source§

    fn cmp(&self, other: &Arc<T, A>) -> Ordering

    Comparison for two Arcs.

    The two are compared by calling cmp() on their inner values.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     use std::cmp::Ordering;
     
     let five = Arc::new(5);
     
     assert_eq!(Ordering::Less, five.cmp(&Arc::new(6)));
    -
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    source§

    impl<T> PartialEq<Arc<T>> for Arc<T>where - T: PartialEq<T> + ?Sized,

    source§

    fn eq(&self, other: &Arc<T>) -> bool

    Equality for two Arcs.

    +
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere + Self: Sized + PartialOrd<Self>,

    Restrict a value to a certain interval. Read more
    source§

    impl<T, A> PartialEq<Arc<T, A>> for Arc<T, A>where + T: PartialEq<T> + ?Sized, + A: Allocator,

    source§

    fn eq(&self, other: &Arc<T, A>) -> bool

    Equality for two Arcs.

    Two Arcs are equal if their inner values are equal, even if they are stored in different allocation.

    If T also implements Eq (implying reflexivity of equality), two Arcs that point to the same allocation are always equal.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     assert!(five == Arc::new(5));
    -
    source§

    fn ne(&self, other: &Arc<T>) -> bool

    Inequality for two Arcs.

    +
    source§

    fn ne(&self, other: &Arc<T, A>) -> bool

    Inequality for two Arcs.

    Two Arcs are not equal if their inner values are not equal.

    If T also implements Eq (implying reflexivity of equality), two Arcs that point to the same value are always equal.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     assert!(five != Arc::new(6));
    -
    source§

    impl<T> PartialOrd<Arc<T>> for Arc<T>where - T: PartialOrd<T> + ?Sized,

    source§

    fn partial_cmp(&self, other: &Arc<T>) -> Option<Ordering>

    Partial comparison for two Arcs.

    +
    source§

    impl<T, A> PartialOrd<Arc<T, A>> for Arc<T, A>where + T: PartialOrd<T> + ?Sized, + A: Allocator,

    source§

    fn partial_cmp(&self, other: &Arc<T, A>) -> Option<Ordering>

    Partial comparison for two Arcs.

    The two are compared by calling partial_cmp() on their inner values.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     use std::cmp::Ordering;
     
     let five = Arc::new(5);
     
     assert_eq!(Some(Ordering::Less), five.partial_cmp(&Arc::new(6)));
    -
    source§

    fn lt(&self, other: &Arc<T>) -> bool

    Less-than comparison for two Arcs.

    +
    source§

    fn lt(&self, other: &Arc<T, A>) -> bool

    Less-than comparison for two Arcs.

    The two are compared by calling < on their inner values.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     assert!(five < Arc::new(6));
    -
    source§

    fn le(&self, other: &Arc<T>) -> bool

    ‘Less than or equal to’ comparison for two Arcs.

    +
    source§

    fn le(&self, other: &Arc<T, A>) -> bool

    ‘Less than or equal to’ comparison for two Arcs.

    The two are compared by calling <= on their inner values.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     assert!(five <= Arc::new(5));
    -
    source§

    fn gt(&self, other: &Arc<T>) -> bool

    Greater-than comparison for two Arcs.

    +
    source§

    fn gt(&self, other: &Arc<T, A>) -> bool

    Greater-than comparison for two Arcs.

    The two are compared by calling > on their inner values.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     assert!(five > Arc::new(4));
    -
    source§

    fn ge(&self, other: &Arc<T>) -> bool

    ‘Greater than or equal to’ comparison for two Arcs.

    +
    source§

    fn ge(&self, other: &Arc<T, A>) -> bool

    ‘Greater than or equal to’ comparison for two Arcs.

    The two are compared by calling >= on their inner values.

    -
    Examples
    +
    Examples
    use std::sync::Arc;
     
     let five = Arc::new(5);
     
     assert!(five >= Arc::new(5));
    -
    source§

    impl<T> Pointer for Arc<T>where - T: ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter.
    1.43.0 · source§

    impl<T, const N: usize> TryFrom<Arc<[T]>> for Arc<[T; N]>

    §

    type Error = Arc<[T]>

    The type returned in the event of a conversion error.
    source§

    fn try_from( - boxed_slice: Arc<[T]> -) -> Result<Arc<[T; N]>, <Arc<[T; N]> as TryFrom<Arc<[T]>>>::Error>

    Performs the conversion.
    source§

    impl<T, U> CoerceUnsized<Arc<U>> for Arc<T>where - T: Unsize<U> + ?Sized, - U: ?Sized,

    source§

    impl<T, U> DispatchFromDyn<Arc<U>> for Arc<T>where - T: Unsize<U> + ?Sized, - U: ?Sized,

    source§

    impl<T> Eq for Arc<T>where - T: Eq + ?Sized,

    source§

    impl<T> Send for Arc<T>where - T: Sync + Send + ?Sized,

    source§

    impl<T> Sync for Arc<T>where - T: Sync + Send + ?Sized,

    1.33.0 · source§

    impl<T> Unpin for Arc<T>where - T: ?Sized,

    1.9.0 · source§

    impl<T> UnwindSafe for Arc<T>where - T: RefUnwindSafe + ?Sized,

    Auto Trait Implementations§

    §

    impl<T: ?Sized> RefUnwindSafe for Arc<T>where - T: RefUnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere - Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<!> for T

    source§

    fn from(t: !) -> T

    Converts to this type from the input type.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +
    source§

    impl<T, A> Pointer for Arc<T, A>where + A: Allocator, + T: ?Sized,

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter.
    1.73.0 · source§

    impl Read for Arc<File, Global>

    source§

    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

    Pull some bytes from this source into the specified buffer, returning +how many bytes were read. Read more
    source§

    fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

    Like read, except that it reads into a slice of buffers. Read more
    source§

    fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

    🔬This is a nightly-only experimental API. (read_buf)
    Pull some bytes from this source into the specified buffer. Read more
    source§

    fn is_read_vectored(&self) -> bool

    🔬This is a nightly-only experimental API. (can_vector)
    Determines if this Reader has an efficient read_vectored +implementation. Read more
    source§

    fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>

    Read all bytes until EOF in this source, placing them into buf. Read more
    source§

    fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

    Read all bytes until EOF in this source, appending them to buf. Read more
    1.6.0 · source§

    fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

    Read the exact number of bytes required to fill buf. Read more
    source§

    fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

    🔬This is a nightly-only experimental API. (read_buf)
    Read the exact number of bytes required to fill cursor. Read more
    source§

    fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

    Creates a “by reference” adaptor for this instance of Read. Read more
    source§

    fn bytes(self) -> Bytes<Self>where + Self: Sized,

    Transforms this Read instance to an Iterator over its bytes. Read more
    source§

    fn chain<R>(self, next: R) -> Chain<Self, R>where + R: Read, + Self: Sized,

    Creates an adapter which will chain this stream with another. Read more
    source§

    fn take(self, limit: u64) -> Take<Self>where + Self: Sized,

    Creates an adapter which will read at most limit bytes from it. Read more
    1.73.0 · source§

    impl Seek for Arc<File, Global>

    source§

    fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>

    Seek to an offset, in bytes, in a stream. Read more
    1.55.0 · source§

    fn rewind(&mut self) -> Result<(), Error>

    Rewind to the beginning of a stream. Read more
    source§

    fn stream_len(&mut self) -> Result<u64, Error>

    🔬This is a nightly-only experimental API. (seek_stream_len)
    Returns the length of this stream (in bytes). Read more
    1.51.0 · source§

    fn stream_position(&mut self) -> Result<u64, Error>

    Returns the current seek position from the start of the stream. Read more
    1.43.0 · source§

    impl<T, A, const N: usize> TryFrom<Arc<[T], A>> for Arc<[T; N], A>where + A: Allocator + Clone,

    §

    type Error = Arc<[T], A>

    The type returned in the event of a conversion error.
    source§

    fn try_from( + boxed_slice: Arc<[T], A> +) -> Result<Arc<[T; N], A>, <Arc<[T; N], A> as TryFrom<Arc<[T], A>>>::Error>

    Performs the conversion.
    1.73.0 · source§

    impl Write for Arc<File, Global>

    source§

    fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

    Write a buffer into this writer, returning how many bytes were written. Read more
    source§

    fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

    Like write, except that it writes from a slice of buffers. Read more
    source§

    fn is_write_vectored(&self) -> bool

    🔬This is a nightly-only experimental API. (can_vector)
    Determines if this Writer has an efficient write_vectored +implementation. Read more
    source§

    fn flush(&mut self) -> Result<(), Error>

    Flush this output stream, ensuring that all intermediately buffered +contents reach their destination. Read more
    source§

    fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

    Attempts to write an entire buffer into this writer. Read more
    source§

    fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

    🔬This is a nightly-only experimental API. (write_all_vectored)
    Attempts to write multiple buffers into this writer. Read more
    source§

    fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

    Writes a formatted string into this writer, returning any error +encountered. Read more
    source§

    fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

    Creates a “by reference” adapter for this instance of Write. Read more
    source§

    impl<T, U, A> CoerceUnsized<Arc<U, A>> for Arc<T, A>where + T: Unsize<U> + ?Sized, + A: Allocator, + U: ?Sized,

    source§

    impl<T, U> DispatchFromDyn<Arc<U, Global>> for Arc<T, Global>where + T: Unsize<U> + ?Sized, + U: ?Sized,

    source§

    impl<T, A> Eq for Arc<T, A>where + T: Eq + ?Sized, + A: Allocator,

    source§

    impl<T, A> Send for Arc<T, A>where + T: Sync + Send + ?Sized, + A: Allocator + Send,

    source§

    impl<T, A> Sync for Arc<T, A>where + T: Sync + Send + ?Sized, + A: Allocator + Sync,

    1.33.0 · source§

    impl<T, A> Unpin for Arc<T, A>where + A: Allocator, + T: ?Sized,

    1.9.0 · source§

    impl<T, A> UnwindSafe for Arc<T, A>where + T: RefUnwindSafe + ?Sized, + A: Allocator + UnwindSafe,

    Auto Trait Implementations§

    §

    impl<T: ?Sized, A> RefUnwindSafe for Arc<T, A>where + A: RefUnwindSafe, + T: RefUnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    §

    impl<Q, K> Comparable<K> for Qwhere + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    §

    impl<Q, K> Equivalent<K> for Qwhere + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

    §

    fn equivalent(&self, key: &K) -> bool

    Compare self to key and return true if they are equal.
    source§

    impl<T> From<!> for T

    source§

    fn from(t: !) -> T

    Converts to this type from the input type.
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<E> Provider for Ewhere - E: Error + ?Sized,

    source§

    fn provide<'a>(&'a self, demand: &mut Demand<'a>)

    🔬This is a nightly-only experimental API. (provide_any)
    Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere - T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq<T> + Eq + Send + Sync,

    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T> ToString for Twhere + T: Display + ?Sized,

    source§

    default fn to_string(&self) -> String

    Converts the given value to a String. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq<T> + Eq + Send + Sync,

    \ No newline at end of file diff --git a/casbin/rhai/struct.TypeBuilder.html b/casbin/rhai/struct.TypeBuilder.html index 809e8180..8b317628 100644 --- a/casbin/rhai/struct.TypeBuilder.html +++ b/casbin/rhai/struct.TypeBuilder.html @@ -1,137 +1,150 @@ -TypeBuilder in casbin::rhai - Rust

    Struct casbin::rhai::TypeBuilder

    pub struct TypeBuilder<'a, T>where
    -    T: Variant + Clone,{ /* private fields */ }
    Expand description

    Builder to build the API of a custom type for use with an Engine.

    +TypeBuilder in casbin::rhai - Rust

    Struct casbin::rhai::TypeBuilder

    pub struct TypeBuilder<'a, T>where
    +    T: Variant + Clone,{ /* private fields */ }
    Expand description

    Builder to build the API of a custom type for use with an Engine.

    The type is automatically registered when this builder is dropped.

    Pretty-Print Name

    By default the type is registered with Engine::register_type (i.e. without a pretty-print name).

    To define a pretty-print name, call with_name, to use Engine::register_type_with_name instead.

    Implementations§

    §

    impl<'a, T> TypeBuilder<'a, T>where - T: Variant + Clone,

    pub fn with_name(&mut self, name: &'static str) -> &mut TypeBuilder<'a, T>

    Set a pretty-print name for the type_of function.

    -

    pub fn with_fn<A, const N: usize, const C: bool, R, const L: bool>( + T: Variant + Clone,

    pub fn with_name(&mut self, name: &'static str) -> &mut TypeBuilder<'a, T>

    Set a pretty-print name for the type_of function.

    +

    pub fn on_print( &mut self, - name: impl AsRef<str> + Into<SmartString<LazyCompact>>, - method: impl RegisterNativeFunction<A, N, C, R, L> + on_print: impl Fn(&mut T) -> String + SendSync + 'static +) -> &mut TypeBuilder<'a, T>

    Pretty-print this custom type.

    +

    pub fn on_debug( + &mut self, + on_print: impl Fn(&mut T) -> String + SendSync + 'static +) -> &mut TypeBuilder<'a, T>

    Debug-print this custom type.

    +

    pub fn with_fn<A, const N: usize, const C: bool, R, const L: bool>( + &mut self, + name: impl AsRef<str> + Into<SmartString<LazyCompact>>, + method: impl RegisterNativeFunction<A, N, C, R, L> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where A: 'static, - R: Variant + Clone,

    Register a custom function.

    + R: Variant + Clone,

    Register a custom function.

    §

    impl<'a, T> TypeBuilder<'a, T>where - T: Variant + Clone + IntoIterator, - <T as IntoIterator>::Item: Variant + Clone,

    pub fn is_iterable(&mut self) -> &mut TypeBuilder<'a, T>

    Register a type iterator. + T: Variant + Clone + IntoIterator, + <T as IntoIterator>::Item: Variant + Clone,

    pub fn is_iterable(&mut self) -> &mut TypeBuilder<'a, T>

    Register a type iterator. This is an advanced API.

    §

    impl<'a, T> TypeBuilder<'a, T>where - T: Variant + Clone,

    pub fn with_get<const C: bool, V, const L: bool>( + T: Variant + Clone,

    pub fn with_get<const C: bool, V, const L: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C, V, L> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - V: Variant + Clone,

    Register a getter function.

    + V: Variant + Clone,

    Register a getter function.

    The function signature must start with &mut self and not &self.

    Not available under no_object.

    -

    pub fn with_set<const C: bool, V, const L: bool>( +

    pub fn with_set<const C: bool, V, const L: bool>( &mut self, - name: impl AsRef<str>, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), L> + SendSync + 'static + name: impl AsRef<str>, + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), L> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - V: Variant + Clone,

    Register a setter function.

    + V: Variant + Clone,

    Register a setter function.

    Not available under no_object.

    -

    pub fn with_get_set<const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( +

    pub fn with_get_set<const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C1, V, L1> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C2, (), L2> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C2, (), L2> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - V: Variant + Clone,

    Short-hand for registering both getter and setter functions.

    + V: Variant + Clone,

    Short-hand for registering both getter and setter functions.

    All function signatures must start with &mut self and not &self.

    Not available under no_object.

    §

    impl<'a, T> TypeBuilder<'a, T>where - T: Variant + Clone,

    pub fn with_indexer_get<X, const C: bool, V, const L: bool>( + T: Variant + Clone,

    pub fn with_indexer_get<X, const C: bool, V, const L: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C, V, L> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - X: Variant + Clone, - V: Variant + Clone,

    Register an index getter.

    + X: Variant + Clone, + V: Variant + Clone,

    Register an index getter.

    The function signature must start with &mut self and not &self.

    Not available under both no_index and no_object.

    -

    pub fn with_indexer_set<X, const C: bool, V, const L: bool>( +

    pub fn with_indexer_set<X, const C: bool, V, const L: bool>( &mut self, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), L> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), L> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - X: Variant + Clone, - V: Variant + Clone,

    Register an index setter.

    + X: Variant + Clone, + V: Variant + Clone,

    Register an index setter.

    Not available under both no_index and no_object.

    -

    pub fn with_indexer_get_set<X, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( +

    pub fn with_indexer_get_set<X, const C1: bool, const C2: bool, V, const L1: bool, const L2: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C1, V, L1> + SendSync + 'static, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C2, (), L2> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C2, (), L2> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - X: Variant + Clone, - V: Variant + Clone,

    Short-hand for registering both index getter and setter functions.

    + X: Variant + Clone, + V: Variant + Clone,

    Short-hand for registering both index getter and setter functions.

    Not available under both no_index and no_object.

    §

    impl<'a, T> TypeBuilder<'a, T>where - T: Variant + Clone,

    pub fn with_result_fn<S, A, const N: usize, const C: bool, R, F>( + T: Variant + Clone,

    pub fn with_result_fn<S, A, const N: usize, const C: bool, R, F>( &mut self, name: S, method: F ) -> &mut TypeBuilder<'a, T>where A: 'static, - S: AsRef<str> + Into<SmartString<LazyCompact>>, - R: Variant + Clone, - F: RegisterNativeFunction<A, N, C, R, true>,

    👎Deprecated since 1.9.1: use with_fn instead

    Register a custom fallible function.

    + S: AsRef<str> + Into<SmartString<LazyCompact>>, + R: Variant + Clone, + F: RegisterNativeFunction<A, N, C, R, true> + SendSync + 'static,
    👎Deprecated since 1.9.1: use with_fn instead

    Register a custom fallible function.

    Deprecated
    -

    This method is deprecated. Use with_fn instead.

    +

    This method is deprecated. +Use with_fn instead.

    This method will be removed in the next major version.

    -

    pub fn with_get_result<V, const C: bool>( +

    pub fn with_get_result<V, const C: bool>( &mut self, - name: impl AsRef<str>, + name: impl AsRef<str>, get_fn: impl RegisterNativeFunction<(Mut<T>,), 1, C, V, true> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - V: Variant + Clone,

    👎Deprecated since 1.9.1: use with_get instead

    Register a fallible getter function.

    + V: Variant + Clone,
    👎Deprecated since 1.9.1: use with_get instead

    Register a fallible getter function.

    The function signature must start with &mut self and not &self.

    Not available under no_object.

    Deprecated
    -

    This method is deprecated. Use with_get instead.

    +

    This method is deprecated. +Use with_get instead.

    This method will be removed in the next major version.

    -

    pub fn with_set_result<V, const C: bool>( +

    pub fn with_set_result<V, const C: bool>( &mut self, - name: impl AsRef<str>, - set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), true> + SendSync + 'static + name: impl AsRef<str>, + set_fn: impl RegisterNativeFunction<(Mut<T>, V), 2, C, (), true> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - V: Variant + Clone,

    👎Deprecated since 1.9.1: use with_set instead

    Register a fallible setter function.

    + V: Variant + Clone,
    👎Deprecated since 1.9.1: use with_set instead

    Register a fallible setter function.

    Not available under no_object.

    Deprecated
    -

    This method is deprecated. Use with_set instead.

    +

    This method is deprecated. +Use with_set instead.

    This method will be removed in the next major version.

    -

    pub fn with_indexer_get_result<X, V, const C: bool>( +

    pub fn with_indexer_get_result<X, V, const C: bool>( &mut self, get_fn: impl RegisterNativeFunction<(Mut<T>, X), 2, C, V, true> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - X: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use with_indexer_get instead

    Register an fallible index getter.

    + X: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use with_indexer_get instead

    Register an fallible index getter.

    The function signature must start with &mut self and not &self.

    Not available under both no_index and no_object.

    Deprecated
    -

    This method is deprecated. Use with_indexer_get instead.

    +

    This method is deprecated. +Use with_indexer_get instead.

    This method will be removed in the next major version.

    -

    pub fn with_indexer_set_result<X, V, const C: bool>( +

    pub fn with_indexer_set_result<X, V, const C: bool>( &mut self, - set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), true> + SendSync + 'static + set_fn: impl RegisterNativeFunction<(Mut<T>, X, V), 3, C, (), true> + SendSync + 'static ) -> &mut TypeBuilder<'a, T>where - X: Variant + Clone, - V: Variant + Clone,

    👎Deprecated since 1.9.1: use with_indexer_set instead

    Register an fallible index setter.

    + X: Variant + Clone, + V: Variant + Clone,
    👎Deprecated since 1.9.1: use with_indexer_set instead

    Register an fallible index setter.

    Not available under both no_index and no_object.

    Deprecated
    -

    This method is deprecated. Use with_indexer_set instead.

    +

    This method is deprecated. +Use with_indexer_set instead.

    This method will be removed in the next major version.

    -

    Trait Implementations§

    §

    impl<'a, T> Drop for TypeBuilder<'a, T>where - T: Variant + Clone,

    §

    fn drop(&mut self)

    Executes the destructor for this type. Read more

    Auto Trait Implementations§

    §

    impl<'a, T> !RefUnwindSafe for TypeBuilder<'a, T>

    §

    impl<'a, T> Send for TypeBuilder<'a, T>

    §

    impl<'a, T> Sync for TypeBuilder<'a, T>

    §

    impl<'a, T> Unpin for TypeBuilder<'a, T>where - T: Unpin,

    §

    impl<'a, T> !UnwindSafe for TypeBuilder<'a, T>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Trait Implementations§

    §

    impl<'a, T> Drop for TypeBuilder<'a, T>where + T: Variant + Clone,

    §

    fn drop(&mut self)

    Executes the destructor for this type. Read more

    Auto Trait Implementations§

    §

    impl<'a, T> !RefUnwindSafe for TypeBuilder<'a, T>

    §

    impl<'a, T> Send for TypeBuilder<'a, T>

    §

    impl<'a, T> Sync for TypeBuilder<'a, T>

    §

    impl<'a, T> Unpin for TypeBuilder<'a, T>where + T: Unpin,

    §

    impl<'a, T> !UnwindSafe for TypeBuilder<'a, T>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/struct.VarDefInfo.html b/casbin/rhai/struct.VarDefInfo.html index ad452fba..88397511 100644 --- a/casbin/rhai/struct.VarDefInfo.html +++ b/casbin/rhai/struct.VarDefInfo.html @@ -1,27 +1,40 @@ -VarDefInfo in casbin::rhai - Rust

    Struct casbin::rhai::VarDefInfo

    pub struct VarDefInfo<'a> {
    -    pub name: &'a str,
    -    pub is_const: bool,
    -    pub nesting_level: usize,
    -    pub will_shadow: bool,
    +VarDefInfo in casbin::rhai - Rust

    Struct casbin::rhai::VarDefInfo

    pub struct VarDefInfo<'a> {
    +    pub name: &'a str,
    +    pub is_const: bool,
    +    pub nesting_level: usize,
    +    pub will_shadow: bool,
     }
    Expand description

    Information on a variable definition.

    -

    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.
    §name: &'a str

    Name of the variable to be defined.

    -
    §is_const: bool

    true if the statement is const, otherwise it is let.

    -
    §nesting_level: usize

    The current nesting level, with zero being the global level.

    -
    §will_shadow: bool

    Will the variable shadow an existing variable?

    -

    Trait Implementations§

    §

    impl<'a> Debug for VarDefInfo<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> Hash for VarDefInfo<'a>

    §

    fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more

    Auto Trait Implementations§

    §

    impl<'a> RefUnwindSafe for VarDefInfo<'a>

    §

    impl<'a> Send for VarDefInfo<'a>

    §

    impl<'a> Sync for VarDefInfo<'a>

    §

    impl<'a> Unpin for VarDefInfo<'a>

    §

    impl<'a> UnwindSafe for VarDefInfo<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere - T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where - H: Hash + ?Sized, - B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §name: &'a str
    👎Deprecated since 1.16.0: VarDefInfo fields will be private in the next major version. Use name() instead.

    Name of the variable to be defined.

    +

    Deprecated API

    +

    VarDefInfo fields will be private in the next major version. Use name() instead.

    +
    §is_const: bool
    👎Deprecated since 1.16.0: VarDefInfo fields will be private in the next major version. Use is_const() instead.

    true if the statement is const, otherwise it is let.

    +

    Deprecated API

    +

    VarDefInfo fields will be private in the next major version. Use is_const() instead.

    +
    §nesting_level: usize
    👎Deprecated since 1.16.0: VarDefInfo fields will be private in the next major version. Use nesting_level() instead.

    The current nesting level, with zero being the global level.

    +

    Deprecated API

    +

    VarDefInfo fields will be private in the next major version. Use nesting_level() instead.

    +
    §will_shadow: bool
    👎Deprecated since 1.16.0: VarDefInfo fields will be private in the next major version. Use will_shadow_other_variables() instead.

    Will the variable shadow an existing variable?

    +

    Deprecated API

    +

    VarDefInfo fields will be private in the next major version. Use will_shadow_other_variables() instead.

    +

    Implementations§

    §

    impl<'a> VarDefInfo<'a>

    pub const fn name(&self) -> &str

    Name of the variable to be defined.

    +

    pub const fn is_const(&self) -> bool

    true if the statement is const, otherwise it is let.

    +

    pub const fn nesting_level(&self) -> usize

    The current nesting level, with zero being the global level.

    +

    pub const fn will_shadow_other_variables(&self) -> bool

    Will the variable shadow an existing variable?

    +

    Trait Implementations§

    §

    impl<'a> Clone for VarDefInfo<'a>

    §

    fn clone(&self) -> VarDefInfo<'a>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl<'a> Debug for VarDefInfo<'a>

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'a> Hash for VarDefInfo<'a>

    §

    fn hash<__H>(&self, state: &mut __H)where + __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more

    Auto Trait Implementations§

    §

    impl<'a> RefUnwindSafe for VarDefInfo<'a>

    §

    impl<'a> Send for VarDefInfo<'a>

    §

    impl<'a> Sync for VarDefInfo<'a>

    §

    impl<'a> Unpin for VarDefInfo<'a>

    §

    impl<'a> UnwindSafe for VarDefInfo<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    §

    impl<T> CallHasher for Twhere + T: Hash + ?Sized,

    §

    fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where + H: Hash + ?Sized, + B: BuildHasher,

    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/rhai/trait.CustomType.html b/casbin/rhai/trait.CustomType.html index 7cc1fae5..d06108fd 100644 --- a/casbin/rhai/trait.CustomType.html +++ b/casbin/rhai/trait.CustomType.html @@ -1,4 +1,4 @@ -CustomType in casbin::rhai - Rust

    Trait casbin::rhai::CustomType

    pub trait CustomType: Variant + Clone {
    +CustomType in casbin::rhai - Rust

    Trait casbin::rhai::CustomType

    pub trait CustomType: Variant + Clone {
         // Required method
         fn build(builder: TypeBuilder<'_, Self>);
     }
    Expand description

    Trait to build the API of a custom type for use with an Engine @@ -29,21 +29,27 @@

    Example

    impl CustomType for TestStruct { fn build(mut builder: TypeBuilder<Self>) { builder - .with_name("TestStruct") - .with_fn("new_ts", Self::new) - .with_fn("update", Self::update); + // Register pretty-print name of the type + .with_name("TestStruct") + // Register display functions + .on_print(|v| format!("TestStruct({})", v.field)) + .on_debug(|v| format!("{v:?}")) + // Register a constructor function + .with_fn("new_ts", Self::new) + // Register the 'update' method + .with_fn("update", Self::update) + // Register the 'value' property + .with_get_set("value", Self::get_value, Self::set_value); } } - let mut engine = Engine::new(); // Register API for the custom type. engine.build_type::<TestStruct>(); - assert_eq!( - engine.eval::<TestStruct>("let x = new_ts(); x.update(41); x")?, + engine.eval::<TestStruct>("let x = new_ts(); x.update(41); print(x); x")?, TestStruct { field: 42 } );

    Required Methods§

    fn build(builder: TypeBuilder<'_, Self>)

    Builds the custom type for use with the Engine.

    diff --git a/casbin/rhai/trait.FuncArgs.html b/casbin/rhai/trait.FuncArgs.html index d5432cbc..c3d1b215 100644 --- a/casbin/rhai/trait.FuncArgs.html +++ b/casbin/rhai/trait.FuncArgs.html @@ -1,12 +1,12 @@ -FuncArgs in casbin::rhai - Rust

    Trait casbin::rhai::FuncArgs

    pub trait FuncArgs {
    +FuncArgs in casbin::rhai - Rust

    Trait casbin::rhai::FuncArgs

    pub trait FuncArgs {
         // Required method
    -    fn parse<ARGS>(self, args: &mut ARGS)
    -       where ARGS: Extend<Dynamic>;
    +    fn parse<ARGS>(self, args: &mut ARGS)
    +       where ARGS: Extend<Dynamic>;
     }
    Expand description

    Trait that parses arguments to a function call.

    Any data type can implement this trait in order to pass arguments to [Engine::call_fn][crate::Engine::call_fn].

    -

    Required Methods§

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    Parse function call arguments into a container.

    +

    Required Methods§

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    Parse function call arguments into a container.

    Example
    use rhai::{Engine, Dynamic, FuncArgs, Scope};
     
    @@ -40,239 +40,239 @@ 
    Example
    let result: String = engine.call_fn(&mut scope, &ast, "hello", options)?; assert_eq!(result, "world42");
    -

    Implementations on Foreign Types§

    §

    impl<H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (H, J, K, L, M, N, P, Q, R, S, T, U, V)where - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (J, K, L, M, N, P, Q, R, S, T, U, V)where - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<P, Q, R, S, T, U, V> FuncArgs for (P, Q, R, S, T, U, V)where - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (K, L, M, N, P, Q, R, S, T, U, V)where - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<N, P, Q, R, S, T, U, V> FuncArgs for (N, P, Q, R, S, T, U, V)where - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<R, S, T, U, V> FuncArgs for (R, S, T, U, V)where - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<T, const N: usize> FuncArgs for [T; N]where - T: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl FuncArgs for ()

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<U, V> FuncArgs for (U, V)where - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<M, N, P, Q, R, S, T, U, V> FuncArgs for (M, N, P, Q, R, S, T, U, V)where - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<Q, R, S, T, U, V> FuncArgs for (Q, R, S, T, U, V)where - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<T, U, V> FuncArgs for (T, U, V)where - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<V> FuncArgs for (V,)where - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<S, T, U, V> FuncArgs for (S, T, U, V)where - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<L, M, N, P, Q, R, S, T, U, V> FuncArgs for (L, M, N, P, Q, R, S, T, U, V)where - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    §

    impl<T> FuncArgs for Vec<T, Global>where - T: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where - ARGS: Extend<Dynamic>,

    Implementors§

    \ No newline at end of file +

    Implementations on Foreign Types§

    §

    impl<N, P, Q, R, S, T, U, V> FuncArgs for (N, P, Q, R, S, T, U, V)where + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (K, L, M, N, P, Q, R, S, T, U, V)where + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl FuncArgs for ()

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<Q, R, S, T, U, V> FuncArgs for (Q, R, S, T, U, V)where + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (H, J, K, L, M, N, P, Q, R, S, T, U, V)where + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<T, U, V> FuncArgs for (T, U, V)where + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<M, N, P, Q, R, S, T, U, V> FuncArgs for (M, N, P, Q, R, S, T, U, V)where + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<V> FuncArgs for (V,)where + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (J, K, L, M, N, P, Q, R, S, T, U, V)where + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<U, V> FuncArgs for (U, V)where + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<S, T, U, V> FuncArgs for (S, T, U, V)where + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V> FuncArgs for (A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)where + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<T, const N: usize> FuncArgs for [T; N]where + T: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<P, Q, R, S, T, U, V> FuncArgs for (P, Q, R, S, T, U, V)where + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<L, M, N, P, Q, R, S, T, U, V> FuncArgs for (L, M, N, P, Q, R, S, T, U, V)where + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<T> FuncArgs for Vec<T, Global>where + T: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    §

    impl<R, S, T, U, V> FuncArgs for (R, S, T, U, V)where + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    Implementors§

    \ No newline at end of file diff --git a/casbin/rhai/trait.RegisterNativeFunction.html b/casbin/rhai/trait.RegisterNativeFunction.html index 7ef96699..deaaeeb1 100644 --- a/casbin/rhai/trait.RegisterNativeFunction.html +++ b/casbin/rhai/trait.RegisterNativeFunction.html @@ -1,17 +1,17 @@ -RegisterNativeFunction in casbin::rhai - Rust
    pub trait RegisterNativeFunction<A, const N: usize, const X: bool, R, const F: bool>where
    +RegisterNativeFunction in casbin::rhai - Rust
    pub trait RegisterNativeFunction<A, const N: usize, const X: bool, R, const F: bool>where
         A: 'static,
         R: 'static,{
         // Required methods
         fn into_callable_function(
             self,
             name: SmartString<LazyCompact>,
    -        is_pure: bool
    +        is_pure: bool
         ) -> CallableFunction;
    -    fn param_types() -> [TypeId; N];
    +    fn param_types() -> [TypeId; N];
     
         // Provided methods
    -    fn num_params() -> usize { ... }
    -    fn has_context() -> bool { ... }
    +    fn num_params() -> usize { ... }
    +    fn has_context() -> bool { ... }
     }
    Expand description

    Trait to register custom Rust functions.

    Type Parameters

    Required Methods§

    fn into_callable_function( self, name: SmartString<LazyCompact>, - is_pure: bool + is_pure: bool ) -> CallableFunction

    Convert this function into a CallableFunction.

    -

    fn param_types() -> [TypeId; N]

    Get the type ID’s of this function’s parameters.

    -

    Provided Methods§

    fn num_params() -> usize

    Get the number of parameters for this function.

    -

    fn has_context() -> bool

    Is there a NativeCallContext parameter for this function?

    +

    fn param_types() -> [TypeId; N]

    Get the type ID’s of this function’s parameters.

    +

    Provided Methods§

    fn num_params() -> usize

    Get the number of parameters for this function.

    +

    fn has_context() -> bool

    Is there a NativeCallContext parameter for this function?

    Implementors§

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, false> for FNwhere - FN: Fn(&mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, true> for FNwhere - FN: Fn(&mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, false> for FNwhere - FN: Fn(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, true> for FNwhere - FN: Fn(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - A: Variant + Clone, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, false> for FNwhere - FN: Fn(&mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, true> for FNwhere - FN: Fn(&mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, false> for FNwhere - FN: Fn(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, true> for FNwhere - FN: Fn(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - B: Variant + Clone, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, false> for FNwhere - FN: Fn(&mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, true> for FNwhere - FN: Fn(&mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, false> for FNwhere - FN: Fn(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, true> for FNwhere - FN: Fn(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - C: Variant + Clone, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, false> for FNwhere - FN: Fn(&mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, true> for FNwhere - FN: Fn(&mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, false> for FNwhere - FN: Fn(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, true> for FNwhere - FN: Fn(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - D: Variant + Clone, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, false> for FNwhere - FN: Fn(&mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, true> for FNwhere - FN: Fn(&mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, false> for FNwhere - FN: Fn(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, true> for FNwhere - FN: Fn(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - E: Variant + Clone, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, false> for FNwhere - FN: Fn(&mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, true> for FNwhere - FN: Fn(&mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, false> for FNwhere - FN: Fn(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, true> for FNwhere - FN: Fn(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - F: Variant + Clone, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, false> for FNwhere - FN: Fn(&mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, true> for FNwhere - FN: Fn(&mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, false> for FNwhere - FN: Fn(G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, true> for FNwhere - FN: Fn(G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - G: Variant + Clone, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, false> for FNwhere - FN: Fn(&mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, true> for FNwhere - FN: Fn(&mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, false> for FNwhere - FN: Fn(H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, true> for FNwhere - FN: Fn(H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - H: Variant + Clone, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, false> for FNwhere - FN: Fn(&mut J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, true> for FNwhere - FN: Fn(&mut J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, false> for FNwhere - FN: Fn(J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, true> for FNwhere - FN: Fn(J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - J: Variant + Clone, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, false> for FNwhere - FN: Fn(&mut K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, true> for FNwhere - FN: Fn(&mut K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, false> for FNwhere - FN: Fn(K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, true> for FNwhere - FN: Fn(K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - K: Variant + Clone, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, false, RET, false> for FNwhere - FN: Fn(&mut L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, false, RET, true> for FNwhere - FN: Fn(&mut L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, false, RET, false> for FNwhere - FN: Fn(L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, false, RET, true> for FNwhere - FN: Fn(L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - L: Variant + Clone, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, false, RET, false> for FNwhere - FN: Fn(&mut M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, false, RET, true> for FNwhere - FN: Fn(&mut M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, false, RET, false> for FNwhere - FN: Fn(M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, false, RET, true> for FNwhere - FN: Fn(M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - M: Variant + Clone, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, false, RET, false> for FNwhere - FN: Fn(&mut N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, false, RET, true> for FNwhere - FN: Fn(&mut N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, false, RET, false> for FNwhere - FN: Fn(N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, false, RET, true> for FNwhere - FN: Fn(N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - N: Variant + Clone, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, false, RET, false> for FNwhere - FN: Fn(&mut P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, false, RET, true> for FNwhere - FN: Fn(&mut P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, false, RET, false> for FNwhere - FN: Fn(P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, false, RET, true> for FNwhere - FN: Fn(P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - P: Variant + Clone, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, false, RET, false> for FNwhere - FN: Fn(&mut Q, R, S, T, U, V) -> RET + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, false, RET, true> for FNwhere - FN: Fn(&mut Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut Q, R, S, T, U, V) -> RET + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, false, RET, false> for FNwhere - FN: Fn(Q, R, S, T, U, V) -> RET + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, false, RET, true> for FNwhere - FN: Fn(Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, Q, R, S, T, U, V) -> RET + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - Q: Variant + Clone, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, false, RET, false> for FNwhere - FN: Fn(&mut R, S, T, U, V) -> RET + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, false, RET, true> for FNwhere - FN: Fn(&mut R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut R, S, T, U, V) -> RET + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, false, RET, false> for FNwhere - FN: Fn(R, S, T, U, V) -> RET + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, false, RET, true> for FNwhere - FN: Fn(R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, R, S, T, U, V) -> RET + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - R: Variant + Clone, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, false, RET, false> for FNwhere - FN: Fn() -> RET + SendSync + 'static, - RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, false, RET, true> for FNwhere - FN: Fn() -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>) -> RET + SendSync + 'static, - RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, false, RET, false> for FNwhere - FN: Fn(&mut S, T, U, V) -> RET + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, false, RET, true> for FNwhere - FN: Fn(&mut S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut S, T, U, V) -> RET + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, false, RET, false> for FNwhere - FN: Fn(S, T, U, V) -> RET + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, false, RET, true> for FNwhere - FN: Fn(S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, S, T, U, V) -> RET + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - S: Variant + Clone, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, false, RET, false> for FNwhere - FN: Fn(&mut T, U, V) -> RET + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, false, RET, true> for FNwhere - FN: Fn(&mut T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut T, U, V) -> RET + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, false, RET, false> for FNwhere - FN: Fn(T, U, V) -> RET + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, false, RET, true> for FNwhere - FN: Fn(T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, T, U, V) -> RET + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - T: Variant + Clone, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, false, RET, false> for FNwhere - FN: Fn(&mut U, V) -> RET + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, false, RET, true> for FNwhere - FN: Fn(&mut U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut U, V) -> RET + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, false, RET, false> for FNwhere - FN: Fn(U, V) -> RET + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, false, RET, true> for FNwhere - FN: Fn(U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, U, V) -> RET + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - U: Variant + Clone, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, false, RET, false> for FNwhere - FN: Fn(&mut V) -> RET + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, false, RET, true> for FNwhere - FN: Fn(&mut V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut V) -> RET + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, &mut V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, false, RET, false> for FNwhere - FN: Fn(V) -> RET + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, false, RET, true> for FNwhere - FN: Fn(V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, true, RET, false> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, V) -> RET + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, true, RET, true> for FNwhere - FN: for<'a> Fn(NativeCallContext<'a>, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, - V: Variant + Clone, - RET: Variant + Clone,

    \ No newline at end of file + FN: Fn(&mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,
    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, true> for FNwhere + FN: Fn(&mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<A>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, false> for FNwhere + FN: Fn(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, false, RET, true> for FNwhere + FN: Fn(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 20, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + A: Variant + Clone, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, false> for FNwhere + FN: Fn(&mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, true> for FNwhere + FN: Fn(&mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<B>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, false> for FNwhere + FN: Fn(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, false, RET, true> for FNwhere + FN: Fn(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 19, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + B: Variant + Clone, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, false> for FNwhere + FN: Fn(&mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, true> for FNwhere + FN: Fn(&mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<C>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, false> for FNwhere + FN: Fn(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, false, RET, true> for FNwhere + FN: Fn(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 18, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + C: Variant + Clone, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, false> for FNwhere + FN: Fn(&mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, true> for FNwhere + FN: Fn(&mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<D>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, false> for FNwhere + FN: Fn(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, false, RET, true> for FNwhere + FN: Fn(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 17, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + D: Variant + Clone, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, false> for FNwhere + FN: Fn(&mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, true> for FNwhere + FN: Fn(&mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<E>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, false> for FNwhere + FN: Fn(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, false, RET, true> for FNwhere + FN: Fn(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 16, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + E: Variant + Clone, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, false> for FNwhere + FN: Fn(&mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, true> for FNwhere + FN: Fn(&mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<F>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, false> for FNwhere + FN: Fn(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, false, RET, true> for FNwhere + FN: Fn(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 15, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + F: Variant + Clone, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, false> for FNwhere + FN: Fn(&mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, true> for FNwhere + FN: Fn(&mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<G>, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, false> for FNwhere + FN: Fn(G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, false, RET, true> for FNwhere + FN: Fn(G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(G, H, J, K, L, M, N, P, Q, R, S, T, U, V), 14, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, G, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + G: Variant + Clone, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, false> for FNwhere + FN: Fn(&mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, true> for FNwhere + FN: Fn(&mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<H>, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, false> for FNwhere + FN: Fn(H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, false, RET, true> for FNwhere + FN: Fn(H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, H, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(H, J, K, L, M, N, P, Q, R, S, T, U, V), 13, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, H, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + H: Variant + Clone, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, false> for FNwhere + FN: Fn(&mut J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, true> for FNwhere + FN: Fn(&mut J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<J>, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, false> for FNwhere + FN: Fn(J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, false, RET, true> for FNwhere + FN: Fn(J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, J, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, J, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(J, K, L, M, N, P, Q, R, S, T, U, V), 12, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, J, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + J: Variant + Clone, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, false> for FNwhere + FN: Fn(&mut K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, true> for FNwhere + FN: Fn(&mut K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<K>, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, false> for FNwhere + FN: Fn(K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, false, RET, true> for FNwhere + FN: Fn(K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, K, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, K, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(K, L, M, N, P, Q, R, S, T, U, V), 11, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, K, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + K: Variant + Clone, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, false, RET, false> for FNwhere + FN: Fn(&mut L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, false, RET, true> for FNwhere + FN: Fn(&mut L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<L>, M, N, P, Q, R, S, T, U, V), 10, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, false, RET, false> for FNwhere + FN: Fn(L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, false, RET, true> for FNwhere + FN: Fn(L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, L, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, L, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(L, M, N, P, Q, R, S, T, U, V), 10, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, L, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + L: Variant + Clone, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, false, RET, false> for FNwhere + FN: Fn(&mut M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, false, RET, true> for FNwhere + FN: Fn(&mut M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<M>, N, P, Q, R, S, T, U, V), 9, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, false, RET, false> for FNwhere + FN: Fn(M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, false, RET, true> for FNwhere + FN: Fn(M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, M, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, M, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(M, N, P, Q, R, S, T, U, V), 9, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, M, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + M: Variant + Clone, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, false, RET, false> for FNwhere + FN: Fn(&mut N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, false, RET, true> for FNwhere + FN: Fn(&mut N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<N>, P, Q, R, S, T, U, V), 8, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, false, RET, false> for FNwhere + FN: Fn(N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, false, RET, true> for FNwhere + FN: Fn(N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, N, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, N, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(N, P, Q, R, S, T, U, V), 8, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, N, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + N: Variant + Clone, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, false, RET, false> for FNwhere + FN: Fn(&mut P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, false, RET, true> for FNwhere + FN: Fn(&mut P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<P>, Q, R, S, T, U, V), 7, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, false, RET, false> for FNwhere + FN: Fn(P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, false, RET, true> for FNwhere + FN: Fn(P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, P, Q, R, S, T, U, V) -> RET + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, P, Q, R, S, T, U, V, RET> RegisterNativeFunction<(P, Q, R, S, T, U, V), 7, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, P, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + P: Variant + Clone, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, false, RET, false> for FNwhere + FN: Fn(&mut Q, R, S, T, U, V) -> RET + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, false, RET, true> for FNwhere + FN: Fn(&mut Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut Q, R, S, T, U, V) -> RET + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<Q>, R, S, T, U, V), 6, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, false, RET, false> for FNwhere + FN: Fn(Q, R, S, T, U, V) -> RET + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, false, RET, true> for FNwhere + FN: Fn(Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, Q, R, S, T, U, V) -> RET + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, Q, R, S, T, U, V, RET> RegisterNativeFunction<(Q, R, S, T, U, V), 6, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, Q, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + Q: Variant + Clone, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, false, RET, false> for FNwhere + FN: Fn(&mut R, S, T, U, V) -> RET + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, false, RET, true> for FNwhere + FN: Fn(&mut R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut R, S, T, U, V) -> RET + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(Mut<R>, S, T, U, V), 5, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, false, RET, false> for FNwhere + FN: Fn(R, S, T, U, V) -> RET + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, false, RET, true> for FNwhere + FN: Fn(R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, R, S, T, U, V) -> RET + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, R, S, T, U, V, RET> RegisterNativeFunction<(R, S, T, U, V), 5, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, R, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + R: Variant + Clone, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, false, RET, false> for FNwhere + FN: Fn() -> RET + SendSync + 'static, + RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, false, RET, true> for FNwhere + FN: Fn() -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>) -> RET + SendSync + 'static, + RET: Variant + Clone,

    §

    impl<FN, RET> RegisterNativeFunction<(), 0, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, false, RET, false> for FNwhere + FN: Fn(&mut S, T, U, V) -> RET + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, false, RET, true> for FNwhere + FN: Fn(&mut S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut S, T, U, V) -> RET + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(Mut<S>, T, U, V), 4, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, false, RET, false> for FNwhere + FN: Fn(S, T, U, V) -> RET + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, false, RET, true> for FNwhere + FN: Fn(S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, S, T, U, V) -> RET + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, S, T, U, V, RET> RegisterNativeFunction<(S, T, U, V), 4, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, S, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + S: Variant + Clone, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, false, RET, false> for FNwhere + FN: Fn(&mut T, U, V) -> RET + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, false, RET, true> for FNwhere + FN: Fn(&mut T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut T, U, V) -> RET + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(Mut<T>, U, V), 3, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, false, RET, false> for FNwhere + FN: Fn(T, U, V) -> RET + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, false, RET, true> for FNwhere + FN: Fn(T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, T, U, V) -> RET + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, T, U, V, RET> RegisterNativeFunction<(T, U, V), 3, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, T, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + T: Variant + Clone, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, false, RET, false> for FNwhere + FN: Fn(&mut U, V) -> RET + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, false, RET, true> for FNwhere + FN: Fn(&mut U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut U, V) -> RET + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(Mut<U>, V), 2, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, false, RET, false> for FNwhere + FN: Fn(U, V) -> RET + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, false, RET, true> for FNwhere + FN: Fn(U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, U, V) -> RET + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, U, V, RET> RegisterNativeFunction<(U, V), 2, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, U, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + U: Variant + Clone, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, false, RET, false> for FNwhere + FN: Fn(&mut V) -> RET + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, false, RET, true> for FNwhere + FN: Fn(&mut V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut V) -> RET + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(Mut<V>,), 1, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, &mut V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, false, RET, false> for FNwhere + FN: Fn(V) -> RET + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, false, RET, true> for FNwhere + FN: Fn(V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, true, RET, false> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, V) -> RET + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    §

    impl<FN, V, RET> RegisterNativeFunction<(V,), 1, true, RET, true> for FNwhere + FN: for<'a> Fn(NativeCallContext<'a>, V) -> Result<RET, Box<EvalAltResult, Global>> + SendSync + 'static, + V: Variant + Clone, + RET: Variant + Clone,

    \ No newline at end of file diff --git a/casbin/rhai/type.Array.html b/casbin/rhai/type.Array.html index 46a73588..2736b536 100644 --- a/casbin/rhai/type.Array.html +++ b/casbin/rhai/type.Array.html @@ -1,3 +1,1064 @@ -Array in casbin::rhai - Rust

    Type Definition casbin::rhai::Array

    pub type Array = Vec<Dynamic, Global>;
    Expand description

    Aliased Type§

    struct Array { /* private fields */ }

    Methods from Deref<Target = [T]>§

    source

    pub fn as_str(&self) -> &str

    🔬This is a nightly-only experimental API. (ascii_char)

    Views this slice of ASCII characters as a UTF-8 str.

    +
    source

    pub fn as_bytes(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (ascii_char)

    Views this slice of ASCII characters as a slice of u8 bytes.

    +
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all bytes in this slice are within the ASCII range.

    +
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this slice is_ascii, returns it as a slice of +ASCII characters, otherwise returns None.

    +
    source

    pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.

    +
    Safety
    +

    Every byte in the slice must be in 0..=127, or else this is UB.

    +
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

    Checks that two slices are an ASCII case-insensitive match.

    +

    Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), +but without allocating and copying temporaries.

    +
    1.60.0 · source

    pub fn escape_ascii(&self) -> EscapeAscii<'_>

    Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.

    +
    Examples
    +
    
    +let s = b"0\t\r\n'\"\\\x9d";
    +let escaped = s.escape_ascii().to_string();
    +assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
    +
    source

    pub fn trim_ascii_start(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with leading ASCII whitespace bytes removed.

    +

    ‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

    +
    Examples
    +
    #![feature(byte_slice_trim_ascii)]
    +
    +assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
    +assert_eq!(b"  ".trim_ascii_start(), b"");
    +assert_eq!(b"".trim_ascii_start(), b"");
    +
    source

    pub fn trim_ascii_end(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with trailing ASCII whitespace bytes removed.

    +

    ‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

    +
    Examples
    +
    #![feature(byte_slice_trim_ascii)]
    +
    +assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
    +assert_eq!(b"  ".trim_ascii_end(), b"");
    +assert_eq!(b"".trim_ascii_end(), b"");
    +
    source

    pub fn trim_ascii(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.

    +

    ‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

    +
    Examples
    +
    #![feature(byte_slice_trim_ascii)]
    +
    +assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
    +assert_eq!(b"  ".trim_ascii(), b"");
    +assert_eq!(b"".trim_ascii(), b"");
    +
    source

    pub fn flatten(&self) -> &[T]

    🔬This is a nightly-only experimental API. (slice_flatten)

    Takes a &[[T; N]], and flattens it to a &[T].

    +
    Panics
    +

    This panics if the length of the resulting slice would overflow a usize.

    +

    This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

    +
    Examples
    +
    #![feature(slice_flatten)]
    +
    +assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
    +
    +assert_eq!(
    +    [[1, 2, 3], [4, 5, 6]].flatten(),
    +    [[1, 2], [3, 4], [5, 6]].flatten(),
    +);
    +
    +let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
    +assert!(slice_of_empty_arrays.flatten().is_empty());
    +
    +let empty_slice_of_arrays: &[[u32; 10]] = &[];
    +assert!(empty_slice_of_arrays.flatten().is_empty());
    +
    1.0.0 · source

    pub fn len(&self) -> usize

    Returns the number of elements in the slice.

    +
    Examples
    +
    let a = [1, 2, 3];
    +assert_eq!(a.len(), 3);
    +
    1.0.0 · source

    pub fn is_empty(&self) -> bool

    Returns true if the slice has a length of 0.

    +
    Examples
    +
    let a = [1, 2, 3];
    +assert!(!a.is_empty());
    +
    1.0.0 · source

    pub fn first(&self) -> Option<&T>

    Returns the first element of the slice, or None if it is empty.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert_eq!(Some(&10), v.first());
    +
    +let w: &[i32] = &[];
    +assert_eq!(None, w.first());
    +
    1.5.0 · source

    pub fn split_first(&self) -> Option<(&T, &[T])>

    Returns the first and all the rest of the elements of the slice, or None if it is empty.

    +
    Examples
    +
    let x = &[0, 1, 2];
    +
    +if let Some((first, elements)) = x.split_first() {
    +    assert_eq!(first, &0);
    +    assert_eq!(elements, &[1, 2]);
    +}
    +
    1.5.0 · source

    pub fn split_last(&self) -> Option<(&T, &[T])>

    Returns the last and all the rest of the elements of the slice, or None if it is empty.

    +
    Examples
    +
    let x = &[0, 1, 2];
    +
    +if let Some((last, elements)) = x.split_last() {
    +    assert_eq!(last, &2);
    +    assert_eq!(elements, &[0, 1]);
    +}
    +
    1.0.0 · source

    pub fn last(&self) -> Option<&T>

    Returns the last element of the slice, or None if it is empty.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert_eq!(Some(&30), v.last());
    +
    +let w: &[i32] = &[];
    +assert_eq!(None, w.last());
    +
    source

    pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the first N elements of the slice, or None if it has fewer than N elements.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let u = [10, 40, 30];
    +assert_eq!(Some(&[10, 40]), u.first_chunk::<2>());
    +
    +let v: &[i32] = &[10];
    +assert_eq!(None, v.first_chunk::<2>());
    +
    +let w: &[i32] = &[];
    +assert_eq!(Some(&[]), w.first_chunk::<0>());
    +
    source

    pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the first N elements of the slice and the remainder, +or None if it has fewer than N elements.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let x = &[0, 1, 2];
    +
    +if let Some((first, elements)) = x.split_first_chunk::<2>() {
    +    assert_eq!(first, &[0, 1]);
    +    assert_eq!(elements, &[2]);
    +}
    +
    source

    pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the last N elements of the slice and the remainder, +or None if it has fewer than N elements.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let x = &[0, 1, 2];
    +
    +if let Some((last, elements)) = x.split_last_chunk::<2>() {
    +    assert_eq!(last, &[1, 2]);
    +    assert_eq!(elements, &[0]);
    +}
    +
    source

    pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the last element of the slice, or None if it is empty.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let u = [10, 40, 30];
    +assert_eq!(Some(&[40, 30]), u.last_chunk::<2>());
    +
    +let v: &[i32] = &[10];
    +assert_eq!(None, v.last_chunk::<2>());
    +
    +let w: &[i32] = &[];
    +assert_eq!(Some(&[]), w.last_chunk::<0>());
    +
    1.0.0 · source

    pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>where + I: SliceIndex<[T]>,

    Returns a reference to an element or subslice depending on the type of +index.

    +
      +
    • If given a position, returns a reference to the element at that +position or None if out of bounds.
    • +
    • If given a range, returns the subslice corresponding to that range, +or None if out of bounds.
    • +
    +
    Examples
    +
    let v = [10, 40, 30];
    +assert_eq!(Some(&40), v.get(1));
    +assert_eq!(Some(&[10, 40][..]), v.get(0..2));
    +assert_eq!(None, v.get(3));
    +assert_eq!(None, v.get(0..4));
    +
    1.0.0 · source

    pub unsafe fn get_unchecked<I>( + &self, + index: I +) -> &<I as SliceIndex<[T]>>::Outputwhere + I: SliceIndex<[T]>,

    Returns a reference to an element or subslice, without doing bounds +checking.

    +

    For a safe alternative see get.

    +
    Safety
    +

    Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used.

    +
    Examples
    +
    let x = &[1, 2, 4];
    +
    +unsafe {
    +    assert_eq!(x.get_unchecked(1), &2);
    +}
    +
    1.0.0 · source

    pub fn as_ptr(&self) -> *const T

    Returns a raw pointer to the slice’s buffer.

    +

    The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.

    +

    The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an UnsafeCell) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

    +

    Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.

    +
    Examples
    +
    let x = &[1, 2, 4];
    +let x_ptr = x.as_ptr();
    +
    +unsafe {
    +    for i in 0..x.len() {
    +        assert_eq!(x.get_unchecked(i), &*x_ptr.add(i));
    +    }
    +}
    +
    1.48.0 · source

    pub fn as_ptr_range(&self) -> Range<*const T>

    Returns the two raw pointers spanning the slice.

    +

    The returned range is half-open, which means that the end pointer +points one past the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.

    +

    See as_ptr for warnings on using these pointers. The end pointer +requires extra caution, as it does not point to a valid element in the +slice.

    +

    This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.

    +

    It can also be useful to check if a pointer to an element refers to an +element of this slice:

    + +
    let a = [1, 2, 3];
    +let x = &a[1] as *const _;
    +let y = &5 as *const _;
    +
    +assert!(a.as_ptr_range().contains(&x));
    +assert!(!a.as_ptr_range().contains(&y));
    +
    1.0.0 · source

    pub fn iter(&self) -> Iter<'_, T>

    Returns an iterator over the slice.

    +

    The iterator yields all items from start to end.

    +
    Examples
    +
    let x = &[1, 2, 4];
    +let mut iterator = x.iter();
    +
    +assert_eq!(iterator.next(), Some(&1));
    +assert_eq!(iterator.next(), Some(&2));
    +assert_eq!(iterator.next(), Some(&4));
    +assert_eq!(iterator.next(), None);
    +
    1.0.0 · source

    pub fn windows(&self, size: usize) -> Windows<'_, T>

    Returns an iterator over all contiguous windows of length +size. The windows overlap. If the slice is shorter than +size, the iterator returns no values.

    +
    Panics
    +

    Panics if size is 0.

    +
    Examples
    +
    let slice = ['r', 'u', 's', 't'];
    +let mut iter = slice.windows(2);
    +assert_eq!(iter.next().unwrap(), &['r', 'u']);
    +assert_eq!(iter.next().unwrap(), &['u', 's']);
    +assert_eq!(iter.next().unwrap(), &['s', 't']);
    +assert!(iter.next().is_none());
    +

    If the slice is shorter than size:

    + +
    let slice = ['f', 'o', 'o'];
    +let mut iter = slice.windows(4);
    +assert!(iter.next().is_none());
    +

    There’s no windows_mut, as that existing would let safe code violate the +“only one &mut at a time to the same thing” rule. However, you can sometimes +use Cell::as_slice_of_cells in +conjunction with windows to accomplish something similar:

    + +
    use std::cell::Cell;
    +
    +let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
    +let slice = &mut array[..];
    +let slice_of_cells: &[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells();
    +for w in slice_of_cells.windows(3) {
    +    Cell::swap(&w[0], &w[2]);
    +}
    +assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);
    +
    1.0.0 · source

    pub fn chunks(&self, chunk_size: usize) -> Chunks<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last chunk will not have length chunk_size.

    +

    See chunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and rchunks for the same iterator but starting at the end of the +slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.chunks(2);
    +assert_eq!(iter.next().unwrap(), &['l', 'o']);
    +assert_eq!(iter.next().unwrap(), &['r', 'e']);
    +assert_eq!(iter.next().unwrap(), &['m']);
    +assert!(iter.next().is_none());
    +
    1.31.0 · source

    pub fn chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved +from the remainder function of the iterator.

    +

    Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of chunks.

    +

    See chunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.chunks_exact(2);
    +assert_eq!(iter.next().unwrap(), &['l', 'o']);
    +assert_eq!(iter.next().unwrap(), &['r', 'e']);
    +assert!(iter.next().is_none());
    +assert_eq!(iter.remainder(), &['m']);
    +
    source

    pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

    🔬This is a nightly-only experimental API. (slice_as_chunks)

    Splits the slice into a slice of N-element arrays, +assuming that there’s no remainder.

    +
    Safety
    +

    This may only be called when

    +
      +
    • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
    • +
    • N != 0.
    • +
    +
    Examples
    +
    #![feature(slice_as_chunks)]
    +let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
    +let chunks: &[[char; 1]] =
    +    // SAFETY: 1-element chunks never have remainder
    +    unsafe { slice.as_chunks_unchecked() };
    +assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
    +let chunks: &[[char; 3]] =
    +    // SAFETY: The slice length (6) is a multiple of 3
    +    unsafe { slice.as_chunks_unchecked() };
    +assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
    +
    +// These would be unsound:
    +// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
    +// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
    +
    source

    pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

    🔬This is a nightly-only experimental API. (slice_as_chunks)

    Splits the slice into a slice of N-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than N.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(slice_as_chunks)]
    +let slice = ['l', 'o', 'r', 'e', 'm'];
    +let (chunks, remainder) = slice.as_chunks();
    +assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);
    +assert_eq!(remainder, &['m']);
    +

    If you expect the slice to be an exact multiple, you can combine +let-else with an empty slice pattern:

    + +
    #![feature(slice_as_chunks)]
    +let slice = ['R', 'u', 's', 't'];
    +let (chunks, []) = slice.as_chunks::<2>() else {
    +    panic!("slice didn't have even length")
    +};
    +assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
    +
    source

    pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

    🔬This is a nightly-only experimental API. (slice_as_chunks)

    Splits the slice into a slice of N-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than N.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(slice_as_chunks)]
    +let slice = ['l', 'o', 'r', 'e', 'm'];
    +let (remainder, chunks) = slice.as_rchunks();
    +assert_eq!(remainder, &['l']);
    +assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
    +
    source

    pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

    🔬This is a nightly-only experimental API. (array_chunks)

    Returns an iterator over N elements of the slice at a time, starting at the +beginning of the slice.

    +

    The chunks are array references and do not overlap. If N does not divide the +length of the slice, then the last up to N-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

    +

    This method is the const generic equivalent of chunks_exact.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(array_chunks)]
    +let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.array_chunks();
    +assert_eq!(iter.next().unwrap(), &['l', 'o']);
    +assert_eq!(iter.next().unwrap(), &['r', 'e']);
    +assert!(iter.next().is_none());
    +assert_eq!(iter.remainder(), &['m']);
    +
    source

    pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

    🔬This is a nightly-only experimental API. (array_windows)

    Returns an iterator over overlapping windows of N elements of a slice, +starting at the beginning of the slice.

    +

    This is the const generic equivalent of windows.

    +

    If N is greater than the size of the slice, it will return no windows.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(array_windows)]
    +let slice = [0, 1, 2, 3];
    +let mut iter = slice.array_windows();
    +assert_eq!(iter.next().unwrap(), &[0, 1]);
    +assert_eq!(iter.next().unwrap(), &[1, 2]);
    +assert_eq!(iter.next().unwrap(), &[2, 3]);
    +assert!(iter.next().is_none());
    +
    1.31.0 · source

    pub fn rchunks(&self, chunk_size: usize) -> RChunks<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the end +of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last chunk will not have length chunk_size.

    +

    See rchunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and chunks for the same iterator but starting at the beginning +of the slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.rchunks(2);
    +assert_eq!(iter.next().unwrap(), &['e', 'm']);
    +assert_eq!(iter.next().unwrap(), &['o', 'r']);
    +assert_eq!(iter.next().unwrap(), &['l']);
    +assert!(iter.next().is_none());
    +
    1.31.0 · source

    pub fn rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the +end of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved +from the remainder function of the iterator.

    +

    Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of rchunks.

    +

    See rchunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and chunks_exact for the same iterator but starting at the beginning of the +slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.rchunks_exact(2);
    +assert_eq!(iter.next().unwrap(), &['e', 'm']);
    +assert_eq!(iter.next().unwrap(), &['o', 'r']);
    +assert!(iter.next().is_none());
    +assert_eq!(iter.remainder(), &['l']);
    +
    source

    pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>where + F: FnMut(&T, &T) -> bool,

    🔬This is a nightly-only experimental API. (slice_group_by)

    Returns an iterator over the slice producing non-overlapping runs +of elements using the predicate to separate them.

    +

    The predicate is called on two elements following themselves, +it means the predicate is called on slice[0] and slice[1] +then on slice[1] and slice[2] and so on.

    +
    Examples
    +
    #![feature(slice_group_by)]
    +
    +let slice = &[1, 1, 1, 3, 3, 2, 2, 2];
    +
    +let mut iter = slice.group_by(|a, b| a == b);
    +
    +assert_eq!(iter.next(), Some(&[1, 1, 1][..]));
    +assert_eq!(iter.next(), Some(&[3, 3][..]));
    +assert_eq!(iter.next(), Some(&[2, 2, 2][..]));
    +assert_eq!(iter.next(), None);
    +

    This method can be used to extract the sorted subslices:

    + +
    #![feature(slice_group_by)]
    +
    +let slice = &[1, 1, 2, 3, 2, 3, 2, 3, 4];
    +
    +let mut iter = slice.group_by(|a, b| a <= b);
    +
    +assert_eq!(iter.next(), Some(&[1, 1, 2, 3][..]));
    +assert_eq!(iter.next(), Some(&[2, 3][..]));
    +assert_eq!(iter.next(), Some(&[2, 3, 4][..]));
    +assert_eq!(iter.next(), None);
    +
    1.0.0 · source

    pub fn split_at(&self, mid: usize) -> (&[T], &[T])

    Divides one slice into two at an index.

    +

    The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

    +
    Panics
    +

    Panics if mid > len.

    +
    Examples
    +
    let v = [1, 2, 3, 4, 5, 6];
    +
    +{
    +   let (left, right) = v.split_at(0);
    +   assert_eq!(left, []);
    +   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_at(2);
    +    assert_eq!(left, [1, 2]);
    +    assert_eq!(right, [3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_at(6);
    +    assert_eq!(left, [1, 2, 3, 4, 5, 6]);
    +    assert_eq!(right, []);
    +}
    +
    source

    pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

    🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

    Divides one slice into two at an index, without doing bounds checking.

    +

    The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

    +

    For a safe alternative see split_at.

    +
    Safety
    +

    Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used. The caller has to ensure that +0 <= mid <= self.len().

    +
    Examples
    +
    #![feature(slice_split_at_unchecked)]
    +
    +let v = [1, 2, 3, 4, 5, 6];
    +
    +unsafe {
    +   let (left, right) = v.split_at_unchecked(0);
    +   assert_eq!(left, []);
    +   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
    +}
    +
    +unsafe {
    +    let (left, right) = v.split_at_unchecked(2);
    +    assert_eq!(left, [1, 2]);
    +    assert_eq!(right, [3, 4, 5, 6]);
    +}
    +
    +unsafe {
    +    let (left, right) = v.split_at_unchecked(6);
    +    assert_eq!(left, [1, 2, 3, 4, 5, 6]);
    +    assert_eq!(right, []);
    +}
    +
    source

    pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one slice into an array and a remainder slice at an index.

    +

    The array will contain all indices from [0, N) (excluding +the index N itself) and the slice will contain all +indices from [N, len) (excluding the index len itself).

    +
    Panics
    +

    Panics if N > len.

    +
    Examples
    +
    #![feature(split_array)]
    +
    +let v = &[1, 2, 3, 4, 5, 6][..];
    +
    +{
    +   let (left, right) = v.split_array_ref::<0>();
    +   assert_eq!(left, &[]);
    +   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_array_ref::<2>();
    +    assert_eq!(left, &[1, 2]);
    +    assert_eq!(right, [3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_array_ref::<6>();
    +    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
    +    assert_eq!(right, []);
    +}
    +
    source

    pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one slice into an array and a remainder slice at an index from +the end.

    +

    The slice will contain all indices from [0, len - N) (excluding +the index len - N itself) and the array will contain all +indices from [len - N, len) (excluding the index len itself).

    +
    Panics
    +

    Panics if N > len.

    +
    Examples
    +
    #![feature(split_array)]
    +
    +let v = &[1, 2, 3, 4, 5, 6][..];
    +
    +{
    +   let (left, right) = v.rsplit_array_ref::<0>();
    +   assert_eq!(left, [1, 2, 3, 4, 5, 6]);
    +   assert_eq!(right, &[]);
    +}
    +
    +{
    +    let (left, right) = v.rsplit_array_ref::<2>();
    +    assert_eq!(left, [1, 2, 3, 4]);
    +    assert_eq!(right, &[5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.rsplit_array_ref::<6>();
    +    assert_eq!(left, []);
    +    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
    +}
    +
    1.0.0 · source

    pub fn split<F>(&self, pred: F) -> Split<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred. The matched element is not contained in the subslices.

    +
    Examples
    +
    let slice = [10, 40, 33, 20];
    +let mut iter = slice.split(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10, 40]);
    +assert_eq!(iter.next().unwrap(), &[20]);
    +assert!(iter.next().is_none());
    +

    If the first element is matched, an empty slice will be the first item +returned by the iterator. Similarly, if the last element in the slice +is matched, an empty slice will be the last item returned by the +iterator:

    + +
    let slice = [10, 40, 33];
    +let mut iter = slice.split(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10, 40]);
    +assert_eq!(iter.next().unwrap(), &[]);
    +assert!(iter.next().is_none());
    +

    If two matched elements are directly adjacent, an empty slice will be +present between them:

    + +
    let slice = [10, 6, 33, 20];
    +let mut iter = slice.split(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10]);
    +assert_eq!(iter.next().unwrap(), &[]);
    +assert_eq!(iter.next().unwrap(), &[20]);
    +assert!(iter.next().is_none());
    +
    1.51.0 · source

    pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred. The matched element is contained in the end of the previous +subslice as a terminator.

    +
    Examples
    +
    let slice = [10, 40, 33, 20];
    +let mut iter = slice.split_inclusive(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10, 40, 33]);
    +assert_eq!(iter.next().unwrap(), &[20]);
    +assert!(iter.next().is_none());
    +

    If the last element of the slice is matched, +that element will be considered the terminator of the preceding slice. +That slice will be the last item returned by the iterator.

    + +
    let slice = [3, 10, 40, 33];
    +let mut iter = slice.split_inclusive(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[3]);
    +assert_eq!(iter.next().unwrap(), &[10, 40, 33]);
    +assert!(iter.next().is_none());
    +
    1.27.0 · source

    pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred, starting at the end of the slice and working backwards. +The matched element is not contained in the subslices.

    +
    Examples
    +
    let slice = [11, 22, 33, 0, 44, 55];
    +let mut iter = slice.rsplit(|num| *num == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[44, 55]);
    +assert_eq!(iter.next().unwrap(), &[11, 22, 33]);
    +assert_eq!(iter.next(), None);
    +

    As with split(), if the first or last element is matched, an empty +slice will be the first (or last) item returned by the iterator.

    + +
    let v = &[0, 1, 1, 2, 3, 5, 8];
    +let mut it = v.rsplit(|n| *n % 2 == 0);
    +assert_eq!(it.next().unwrap(), &[]);
    +assert_eq!(it.next().unwrap(), &[3, 5]);
    +assert_eq!(it.next().unwrap(), &[1, 1]);
    +assert_eq!(it.next().unwrap(), &[]);
    +assert_eq!(it.next(), None);
    +
    1.0.0 · source

    pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred, limited to returning at most n items. The matched element is +not contained in the subslices.

    +

    The last element returned, if any, will contain the remainder of the +slice.

    +
    Examples
    +

    Print the slice split once by numbers divisible by 3 (i.e., [10, 40], +[20, 60, 50]):

    + +
    let v = [10, 40, 30, 20, 60, 50];
    +
    +for group in v.splitn(2, |num| *num % 3 == 0) {
    +    println!("{group:?}");
    +}
    +
    1.0.0 · source

    pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred limited to returning at most n items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.

    +

    The last element returned, if any, will contain the remainder of the +slice.

    +
    Examples
    +

    Print the slice split once, starting from the end, by numbers divisible +by 3 (i.e., [50], [10, 40, 30, 20]):

    + +
    let v = [10, 40, 30, 20, 60, 50];
    +
    +for group in v.rsplitn(2, |num| *num % 3 == 0) {
    +    println!("{group:?}");
    +}
    +
    1.0.0 · source

    pub fn contains(&self, x: &T) -> boolwhere + T: PartialEq<T>,

    Returns true if the slice contains an element with the given value.

    +

    This operation is O(n).

    +

    Note that if you have a sorted slice, binary_search may be faster.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert!(v.contains(&30));
    +assert!(!v.contains(&50));
    +

    If you do not have a &T, but some other value that you can compare +with one (for example, String implements PartialEq<str>), you can +use iter().any:

    + +
    let v = [String::from("hello"), String::from("world")]; // slice of `String`
    +assert!(v.iter().any(|e| e == "hello")); // search with `&str`
    +assert!(!v.iter().any(|e| e == "hi"));
    +
    1.0.0 · source

    pub fn starts_with(&self, needle: &[T]) -> boolwhere + T: PartialEq<T>,

    Returns true if needle is a prefix of the slice.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert!(v.starts_with(&[10]));
    +assert!(v.starts_with(&[10, 40]));
    +assert!(!v.starts_with(&[50]));
    +assert!(!v.starts_with(&[10, 50]));
    +

    Always returns true if needle is an empty slice:

    + +
    let v = &[10, 40, 30];
    +assert!(v.starts_with(&[]));
    +let v: &[u8] = &[];
    +assert!(v.starts_with(&[]));
    +
    1.0.0 · source

    pub fn ends_with(&self, needle: &[T]) -> boolwhere + T: PartialEq<T>,

    Returns true if needle is a suffix of the slice.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert!(v.ends_with(&[30]));
    +assert!(v.ends_with(&[40, 30]));
    +assert!(!v.ends_with(&[50]));
    +assert!(!v.ends_with(&[50, 30]));
    +

    Always returns true if needle is an empty slice:

    + +
    let v = &[10, 40, 30];
    +assert!(v.ends_with(&[]));
    +let v: &[u8] = &[];
    +assert!(v.ends_with(&[]));
    +
    1.51.0 · source

    pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq<T>,

    Returns a subslice with the prefix removed.

    +

    If the slice starts with prefix, returns the subslice after the prefix, wrapped in Some. +If prefix is empty, simply returns the original slice.

    +

    If the slice does not start with prefix, returns None.

    +
    Examples
    +
    let v = &[10, 40, 30];
    +assert_eq!(v.strip_prefix(&[10]), Some(&[40, 30][..]));
    +assert_eq!(v.strip_prefix(&[10, 40]), Some(&[30][..]));
    +assert_eq!(v.strip_prefix(&[50]), None);
    +assert_eq!(v.strip_prefix(&[10, 50]), None);
    +
    +let prefix : &str = "he";
    +assert_eq!(b"hello".strip_prefix(prefix.as_bytes()),
    +           Some(b"llo".as_ref()));
    +
    1.51.0 · source

    pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq<T>,

    Returns a subslice with the suffix removed.

    +

    If the slice ends with suffix, returns the subslice before the suffix, wrapped in Some. +If suffix is empty, simply returns the original slice.

    +

    If the slice does not end with suffix, returns None.

    +
    Examples
    +
    let v = &[10, 40, 30];
    +assert_eq!(v.strip_suffix(&[30]), Some(&[10, 40][..]));
    +assert_eq!(v.strip_suffix(&[40, 30]), Some(&[10][..]));
    +assert_eq!(v.strip_suffix(&[50]), None);
    +assert_eq!(v.strip_suffix(&[50, 30]), None);
    +

    Binary searches this slice for a given element. +If the slice is not sorted, the returned result is unspecified and +meaningless.

    +

    If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

    +

    See also binary_search_by, binary_search_by_key, and partition_point.

    +
    Examples
    +

    Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in [1, 4].

    + +
    let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +
    +assert_eq!(s.binary_search(&13),  Ok(9));
    +assert_eq!(s.binary_search(&4),   Err(7));
    +assert_eq!(s.binary_search(&100), Err(13));
    +let r = s.binary_search(&1);
    +assert!(match r { Ok(1..=4) => true, _ => false, });
    +

    If you want to find that whole range of matching items, rather than +an arbitrary matching one, that can be done using partition_point:

    + +
    let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +
    +let low = s.partition_point(|x| x < &1);
    +assert_eq!(low, 1);
    +let high = s.partition_point(|x| x <= &1);
    +assert_eq!(high, 5);
    +let r = s.binary_search(&1);
    +assert!((low..high).contains(&r.unwrap()));
    +
    +assert!(s[..low].iter().all(|&x| x < 1));
    +assert!(s[low..high].iter().all(|&x| x == 1));
    +assert!(s[high..].iter().all(|&x| x > 1));
    +
    +// For something not found, the "range" of equal items is empty
    +assert_eq!(s.partition_point(|x| x < &11), 9);
    +assert_eq!(s.partition_point(|x| x <= &11), 9);
    +assert_eq!(s.binary_search(&11), Err(9));
    +

    If you want to insert an item to a sorted vector, while maintaining +sort order, consider using partition_point:

    + +
    let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +let num = 42;
    +let idx = s.partition_point(|&x| x < num);
    +// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);`
    +s.insert(idx, num);
    +assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
    +
    1.0.0 · source

    pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>where + F: FnMut(&'a T) -> Ordering,

    Binary searches this slice with a comparator function.

    +

    The comparator function should return an order code that indicates +whether its argument is Less, Equal or Greater the desired +target. +If the slice is not sorted or if the comparator function does not +implement an order consistent with the sort order of the underlying +slice, the returned result is unspecified and meaningless.

    +

    If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

    +

    See also binary_search, binary_search_by_key, and partition_point.

    +
    Examples
    +

    Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in [1, 4].

    + +
    let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +
    +let seek = 13;
    +assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Ok(9));
    +let seek = 4;
    +assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(7));
    +let seek = 100;
    +assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(13));
    +let seek = 1;
    +let r = s.binary_search_by(|probe| probe.cmp(&seek));
    +assert!(match r { Ok(1..=4) => true, _ => false, });
    +
    1.10.0 · source

    pub fn binary_search_by_key<'a, B, F>( + &'a self, + b: &B, + f: F +) -> Result<usize, usize>where + F: FnMut(&'a T) -> B, + B: Ord,

    Binary searches this slice with a key extraction function.

    +

    Assumes that the slice is sorted by the key, for instance with +sort_by_key using the same key extraction function. +If the slice is not sorted by the key, the returned result is +unspecified and meaningless.

    +

    If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

    +

    See also binary_search, binary_search_by, and partition_point.

    +
    Examples
    +

    Looks up a series of four elements in a slice of pairs sorted by +their second elements. The first is found, with a uniquely +determined position; the second and third are not found; the +fourth could match any position in [1, 4].

    + +
    let s = [(0, 0), (2, 1), (4, 1), (5, 1), (3, 1),
    +         (1, 2), (2, 3), (4, 5), (5, 8), (3, 13),
    +         (1, 21), (2, 34), (4, 55)];
    +
    +assert_eq!(s.binary_search_by_key(&13, |&(a, b)| b),  Ok(9));
    +assert_eq!(s.binary_search_by_key(&4, |&(a, b)| b),   Err(7));
    +assert_eq!(s.binary_search_by_key(&100, |&(a, b)| b), Err(13));
    +let r = s.binary_search_by_key(&1, |&(a, b)| b);
    +assert!(match r { Ok(1..=4) => true, _ => false, });
    +
    1.30.0 · source

    pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

    Transmute the slice to a slice of another type, ensuring alignment of the types is +maintained.

    +

    This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution will return a maximal middle part.

    +

    This method has no purpose when either input element T or output element U are +zero-sized and will return the original slice without splitting anything.

    +
    Safety
    +

    This method is essentially a transmute with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

    +
    Examples
    +

    Basic usage:

    + +
    unsafe {
    +    let bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];
    +    let (prefix, shorts, suffix) = bytes.align_to::<u16>();
    +    // less_efficient_algorithm_for_bytes(prefix);
    +    // more_efficient_algorithm_for_aligned_shorts(shorts);
    +    // less_efficient_algorithm_for_bytes(suffix);
    +}
    +
    source

    pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])where + Simd<T, LANES>: AsRef<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,

    🔬This is a nightly-only experimental API. (portable_simd)

    Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

    +

    This is a safe wrapper around slice::align_to, so has the same weak +postconditions as that method. You’re only assured that +self.len() == prefix.len() + middle.len() * LANES + suffix.len().

    +

    Notably, all of the following are possible:

    +
      +
    • prefix.len() >= LANES.
    • +
    • middle.is_empty() despite self.len() >= 3 * LANES.
    • +
    • suffix.len() >= LANES.
    • +
    +

    That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.

    +
    Panics
    +

    This will panic if the size of the SIMD type is different from +LANES times that of the scalar.

    +

    At the time of writing, the trait restrictions on Simd<T, LANES> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like LANES == 3.

    +
    Examples
    +
    #![feature(portable_simd)]
    +use core::simd::SimdFloat;
    +
    +let short = &[1, 2, 3];
    +let (prefix, middle, suffix) = short.as_simd::<4>();
    +assert_eq!(middle, []); // Not enough elements for anything in the middle
    +
    +// They might be split in any possible way between prefix and suffix
    +let it = prefix.iter().chain(suffix).copied();
    +assert_eq!(it.collect::<Vec<_>>(), vec![1, 2, 3]);
    +
    +fn basic_simd_sum(x: &[f32]) -> f32 {
    +    use std::ops::Add;
    +    use std::simd::f32x4;
    +    let (prefix, middle, suffix) = x.as_simd();
    +    let sums = f32x4::from_array([
    +        prefix.iter().copied().sum(),
    +        0.0,
    +        0.0,
    +        suffix.iter().copied().sum(),
    +    ]);
    +    let sums = middle.iter().copied().fold(sums, f32x4::add);
    +    sums.reduce_sum()
    +}
    +
    +let numbers: Vec<f32> = (1..101).map(|x| x as _).collect();
    +assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
    +
    source

    pub fn is_sorted(&self) -> boolwhere + T: PartialOrd<T>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted.

    +

    That is, for each element a and its following element b, a <= b must hold. If the +slice yields exactly zero or one element, true is returned.

    +

    Note that if Self::Item is only PartialOrd, but not Ord, the above definition +implies that this function returns false if any two consecutive items are not +comparable.

    +
    Examples
    +
    #![feature(is_sorted)]
    +let empty: [i32; 0] = [];
    +
    +assert!([1, 2, 2, 9].is_sorted());
    +assert!(![1, 3, 2, 4].is_sorted());
    +assert!([0].is_sorted());
    +assert!(empty.is_sorted());
    +assert!(![0.0, 1.0, f32::NAN].is_sorted());
    +
    source

    pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> boolwhere + F: FnMut(&'a T, &'a T) -> Option<Ordering>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given comparator function.

    +

    Instead of using PartialOrd::partial_cmp, this function uses the given compare +function to determine the ordering of two elements. Apart from that, it’s equivalent to +is_sorted; see its documentation for more information.

    +
    source

    pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> boolwhere + F: FnMut(&'a T) -> K, + K: PartialOrd<K>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given key extraction function.

    +

    Instead of comparing the slice’s elements directly, this function compares the keys of the +elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its +documentation for more information.

    +
    Examples
    +
    #![feature(is_sorted)]
    +
    +assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
    +assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
    +
    1.52.0 · source

    pub fn partition_point<P>(&self, pred: P) -> usizewhere + P: FnMut(&T) -> bool,

    Returns the index of the partition point according to the given predicate +(the index of the first element of the second partition).

    +

    The slice is assumed to be partitioned according to the given predicate. +This means that all elements for which the predicate returns true are at the start of the slice +and all elements for which the predicate returns false are at the end. +For example, [7, 15, 3, 5, 4, 12, 6] is partitioned under the predicate x % 2 != 0 +(all odd numbers are at the start, all even at the end).

    +

    If this slice is not partitioned, the returned result is unspecified and meaningless, +as this method performs a kind of binary search.

    +

    See also binary_search, binary_search_by, and binary_search_by_key.

    +
    Examples
    +
    let v = [1, 2, 3, 3, 5, 6, 7];
    +let i = v.partition_point(|&x| x < 5);
    +
    +assert_eq!(i, 4);
    +assert!(v[..i].iter().all(|&x| x < 5));
    +assert!(v[i..].iter().all(|&x| !(x < 5)));
    +

    If all elements of the slice match the predicate, including if the slice +is empty, then the length of the slice will be returned:

    + +
    let a = [2, 4, 8];
    +assert_eq!(a.partition_point(|x| x < &100), a.len());
    +let a: [i32; 0] = [];
    +assert_eq!(a.partition_point(|x| x < &100), 0);
    +

    If you want to insert an item to a sorted vector, while maintaining +sort order:

    + +
    let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +let num = 42;
    +let idx = s.partition_point(|&x| x < num);
    +s.insert(idx, num);
    +assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
    +
    1.0.0 · source

    pub fn to_vec(&self) -> Vec<T, Global>where + T: Clone,

    Copies self into a new Vec.

    +
    Examples
    +
    let s = [10, 40, 30];
    +let x = s.to_vec();
    +// Here, `s` and `x` can be modified independently.
    +
    source

    pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>where + A: Allocator, + T: Clone,

    🔬This is a nightly-only experimental API. (allocator_api)

    Copies self into a new Vec with an allocator.

    +
    Examples
    +
    #![feature(allocator_api)]
    +
    +use std::alloc::System;
    +
    +let s = [10, 40, 30];
    +let x = s.to_vec_in(System);
    +// Here, `s` and `x` can be modified independently.
    +
    1.40.0 · source

    pub fn repeat(&self, n: usize) -> Vec<T, Global>where + T: Copy,

    Creates a vector by copying a slice n times.

    +
    Panics
    +

    This function will panic if the capacity would overflow.

    +
    Examples
    +

    Basic usage:

    + +
    assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]);
    +

    A panic upon overflow:

    + +
    // this will panic at runtime
    +b"0123456789abcdef".repeat(usize::MAX);
    +
    1.0.0 · source

    pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output where + [T]: Concat<Item>, + Item: ?Sized,

    Flattens a slice of T into a single value Self::Output.

    +
    Examples
    +
    assert_eq!(["hello", "world"].concat(), "helloworld");
    +assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
    +
    1.3.0 · source

    pub fn join<Separator>( + &self, + sep: Separator +) -> <[T] as Join<Separator>>::Output where + [T]: Join<Separator>,

    Flattens a slice of T into a single value Self::Output, placing a +given separator between each.

    +
    Examples
    +
    assert_eq!(["hello", "world"].join(" "), "hello world");
    +assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
    +assert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
    +
    1.0.0 · source

    pub fn connect<Separator>( + &self, + sep: Separator +) -> <[T] as Join<Separator>>::Output where + [T]: Join<Separator>,

    👎Deprecated since 1.3.0: renamed to join

    Flattens a slice of T into a single value Self::Output, placing a +given separator between each.

    +
    Examples
    +
    assert_eq!(["hello", "world"].connect(" "), "hello world");
    +assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
    +
    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> Vec<u8, Global>

    Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII upper case equivalent.

    +

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.

    +

    To uppercase the value in-place, use make_ascii_uppercase.

    +
    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> Vec<u8, Global>

    Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII lower case equivalent.

    +

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.

    +

    To lowercase the value in-place, use make_ascii_lowercase.

    +

    Trait Implementations§

    1.0.0 · source§

    impl<T, A> Deref for Vec<T, A>where + A: Allocator,

    §

    type Target = [T]

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &[T]

    Dereferences the value.
    §

    impl<T> FuncArgs for Vec<T, Global>where + T: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    Parse function call arguments into a container. Read more
    \ No newline at end of file diff --git a/casbin/rhai/type.Blob.html b/casbin/rhai/type.Blob.html index f0f335fb..d992ab49 100644 --- a/casbin/rhai/type.Blob.html +++ b/casbin/rhai/type.Blob.html @@ -1,3 +1,1064 @@ -Blob in casbin::rhai - Rust

    Type Definition casbin::rhai::Blob

    pub type Blob = Vec<u8, Global>;
    Expand description

    Aliased Type§

    struct Blob { /* private fields */ }

    Methods from Deref<Target = [T]>§

    source

    pub fn as_str(&self) -> &str

    🔬This is a nightly-only experimental API. (ascii_char)

    Views this slice of ASCII characters as a UTF-8 str.

    +
    source

    pub fn as_bytes(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (ascii_char)

    Views this slice of ASCII characters as a slice of u8 bytes.

    +
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all bytes in this slice are within the ASCII range.

    +
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this slice is_ascii, returns it as a slice of +ASCII characters, otherwise returns None.

    +
    source

    pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.

    +
    Safety
    +

    Every byte in the slice must be in 0..=127, or else this is UB.

    +
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

    Checks that two slices are an ASCII case-insensitive match.

    +

    Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), +but without allocating and copying temporaries.

    +
    1.60.0 · source

    pub fn escape_ascii(&self) -> EscapeAscii<'_>

    Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.

    +
    Examples
    +
    
    +let s = b"0\t\r\n'\"\\\x9d";
    +let escaped = s.escape_ascii().to_string();
    +assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
    +
    source

    pub fn trim_ascii_start(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with leading ASCII whitespace bytes removed.

    +

    ‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

    +
    Examples
    +
    #![feature(byte_slice_trim_ascii)]
    +
    +assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
    +assert_eq!(b"  ".trim_ascii_start(), b"");
    +assert_eq!(b"".trim_ascii_start(), b"");
    +
    source

    pub fn trim_ascii_end(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with trailing ASCII whitespace bytes removed.

    +

    ‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

    +
    Examples
    +
    #![feature(byte_slice_trim_ascii)]
    +
    +assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
    +assert_eq!(b"  ".trim_ascii_end(), b"");
    +assert_eq!(b"".trim_ascii_end(), b"");
    +
    source

    pub fn trim_ascii(&self) -> &[u8]

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.

    +

    ‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

    +
    Examples
    +
    #![feature(byte_slice_trim_ascii)]
    +
    +assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
    +assert_eq!(b"  ".trim_ascii(), b"");
    +assert_eq!(b"".trim_ascii(), b"");
    +
    source

    pub fn flatten(&self) -> &[T]

    🔬This is a nightly-only experimental API. (slice_flatten)

    Takes a &[[T; N]], and flattens it to a &[T].

    +
    Panics
    +

    This panics if the length of the resulting slice would overflow a usize.

    +

    This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

    +
    Examples
    +
    #![feature(slice_flatten)]
    +
    +assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
    +
    +assert_eq!(
    +    [[1, 2, 3], [4, 5, 6]].flatten(),
    +    [[1, 2], [3, 4], [5, 6]].flatten(),
    +);
    +
    +let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
    +assert!(slice_of_empty_arrays.flatten().is_empty());
    +
    +let empty_slice_of_arrays: &[[u32; 10]] = &[];
    +assert!(empty_slice_of_arrays.flatten().is_empty());
    +
    1.0.0 · source

    pub fn len(&self) -> usize

    Returns the number of elements in the slice.

    +
    Examples
    +
    let a = [1, 2, 3];
    +assert_eq!(a.len(), 3);
    +
    1.0.0 · source

    pub fn is_empty(&self) -> bool

    Returns true if the slice has a length of 0.

    +
    Examples
    +
    let a = [1, 2, 3];
    +assert!(!a.is_empty());
    +
    1.0.0 · source

    pub fn first(&self) -> Option<&T>

    Returns the first element of the slice, or None if it is empty.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert_eq!(Some(&10), v.first());
    +
    +let w: &[i32] = &[];
    +assert_eq!(None, w.first());
    +
    1.5.0 · source

    pub fn split_first(&self) -> Option<(&T, &[T])>

    Returns the first and all the rest of the elements of the slice, or None if it is empty.

    +
    Examples
    +
    let x = &[0, 1, 2];
    +
    +if let Some((first, elements)) = x.split_first() {
    +    assert_eq!(first, &0);
    +    assert_eq!(elements, &[1, 2]);
    +}
    +
    1.5.0 · source

    pub fn split_last(&self) -> Option<(&T, &[T])>

    Returns the last and all the rest of the elements of the slice, or None if it is empty.

    +
    Examples
    +
    let x = &[0, 1, 2];
    +
    +if let Some((last, elements)) = x.split_last() {
    +    assert_eq!(last, &2);
    +    assert_eq!(elements, &[0, 1]);
    +}
    +
    1.0.0 · source

    pub fn last(&self) -> Option<&T>

    Returns the last element of the slice, or None if it is empty.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert_eq!(Some(&30), v.last());
    +
    +let w: &[i32] = &[];
    +assert_eq!(None, w.last());
    +
    source

    pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the first N elements of the slice, or None if it has fewer than N elements.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let u = [10, 40, 30];
    +assert_eq!(Some(&[10, 40]), u.first_chunk::<2>());
    +
    +let v: &[i32] = &[10];
    +assert_eq!(None, v.first_chunk::<2>());
    +
    +let w: &[i32] = &[];
    +assert_eq!(Some(&[]), w.first_chunk::<0>());
    +
    source

    pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the first N elements of the slice and the remainder, +or None if it has fewer than N elements.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let x = &[0, 1, 2];
    +
    +if let Some((first, elements)) = x.split_first_chunk::<2>() {
    +    assert_eq!(first, &[0, 1]);
    +    assert_eq!(elements, &[2]);
    +}
    +
    source

    pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the last N elements of the slice and the remainder, +or None if it has fewer than N elements.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let x = &[0, 1, 2];
    +
    +if let Some((last, elements)) = x.split_last_chunk::<2>() {
    +    assert_eq!(last, &[1, 2]);
    +    assert_eq!(elements, &[0]);
    +}
    +
    source

    pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

    🔬This is a nightly-only experimental API. (slice_first_last_chunk)

    Returns the last element of the slice, or None if it is empty.

    +
    Examples
    +
    #![feature(slice_first_last_chunk)]
    +
    +let u = [10, 40, 30];
    +assert_eq!(Some(&[40, 30]), u.last_chunk::<2>());
    +
    +let v: &[i32] = &[10];
    +assert_eq!(None, v.last_chunk::<2>());
    +
    +let w: &[i32] = &[];
    +assert_eq!(Some(&[]), w.last_chunk::<0>());
    +
    1.0.0 · source

    pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>where + I: SliceIndex<[T]>,

    Returns a reference to an element or subslice depending on the type of +index.

    +
      +
    • If given a position, returns a reference to the element at that +position or None if out of bounds.
    • +
    • If given a range, returns the subslice corresponding to that range, +or None if out of bounds.
    • +
    +
    Examples
    +
    let v = [10, 40, 30];
    +assert_eq!(Some(&40), v.get(1));
    +assert_eq!(Some(&[10, 40][..]), v.get(0..2));
    +assert_eq!(None, v.get(3));
    +assert_eq!(None, v.get(0..4));
    +
    1.0.0 · source

    pub unsafe fn get_unchecked<I>( + &self, + index: I +) -> &<I as SliceIndex<[T]>>::Outputwhere + I: SliceIndex<[T]>,

    Returns a reference to an element or subslice, without doing bounds +checking.

    +

    For a safe alternative see get.

    +
    Safety
    +

    Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used.

    +
    Examples
    +
    let x = &[1, 2, 4];
    +
    +unsafe {
    +    assert_eq!(x.get_unchecked(1), &2);
    +}
    +
    1.0.0 · source

    pub fn as_ptr(&self) -> *const T

    Returns a raw pointer to the slice’s buffer.

    +

    The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.

    +

    The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an UnsafeCell) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

    +

    Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.

    +
    Examples
    +
    let x = &[1, 2, 4];
    +let x_ptr = x.as_ptr();
    +
    +unsafe {
    +    for i in 0..x.len() {
    +        assert_eq!(x.get_unchecked(i), &*x_ptr.add(i));
    +    }
    +}
    +
    1.48.0 · source

    pub fn as_ptr_range(&self) -> Range<*const T>

    Returns the two raw pointers spanning the slice.

    +

    The returned range is half-open, which means that the end pointer +points one past the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.

    +

    See as_ptr for warnings on using these pointers. The end pointer +requires extra caution, as it does not point to a valid element in the +slice.

    +

    This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.

    +

    It can also be useful to check if a pointer to an element refers to an +element of this slice:

    + +
    let a = [1, 2, 3];
    +let x = &a[1] as *const _;
    +let y = &5 as *const _;
    +
    +assert!(a.as_ptr_range().contains(&x));
    +assert!(!a.as_ptr_range().contains(&y));
    +
    1.0.0 · source

    pub fn iter(&self) -> Iter<'_, T>

    Returns an iterator over the slice.

    +

    The iterator yields all items from start to end.

    +
    Examples
    +
    let x = &[1, 2, 4];
    +let mut iterator = x.iter();
    +
    +assert_eq!(iterator.next(), Some(&1));
    +assert_eq!(iterator.next(), Some(&2));
    +assert_eq!(iterator.next(), Some(&4));
    +assert_eq!(iterator.next(), None);
    +
    1.0.0 · source

    pub fn windows(&self, size: usize) -> Windows<'_, T>

    Returns an iterator over all contiguous windows of length +size. The windows overlap. If the slice is shorter than +size, the iterator returns no values.

    +
    Panics
    +

    Panics if size is 0.

    +
    Examples
    +
    let slice = ['r', 'u', 's', 't'];
    +let mut iter = slice.windows(2);
    +assert_eq!(iter.next().unwrap(), &['r', 'u']);
    +assert_eq!(iter.next().unwrap(), &['u', 's']);
    +assert_eq!(iter.next().unwrap(), &['s', 't']);
    +assert!(iter.next().is_none());
    +

    If the slice is shorter than size:

    + +
    let slice = ['f', 'o', 'o'];
    +let mut iter = slice.windows(4);
    +assert!(iter.next().is_none());
    +

    There’s no windows_mut, as that existing would let safe code violate the +“only one &mut at a time to the same thing” rule. However, you can sometimes +use Cell::as_slice_of_cells in +conjunction with windows to accomplish something similar:

    + +
    use std::cell::Cell;
    +
    +let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
    +let slice = &mut array[..];
    +let slice_of_cells: &[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells();
    +for w in slice_of_cells.windows(3) {
    +    Cell::swap(&w[0], &w[2]);
    +}
    +assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);
    +
    1.0.0 · source

    pub fn chunks(&self, chunk_size: usize) -> Chunks<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last chunk will not have length chunk_size.

    +

    See chunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and rchunks for the same iterator but starting at the end of the +slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.chunks(2);
    +assert_eq!(iter.next().unwrap(), &['l', 'o']);
    +assert_eq!(iter.next().unwrap(), &['r', 'e']);
    +assert_eq!(iter.next().unwrap(), &['m']);
    +assert!(iter.next().is_none());
    +
    1.31.0 · source

    pub fn chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the +beginning of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved +from the remainder function of the iterator.

    +

    Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of chunks.

    +

    See chunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.chunks_exact(2);
    +assert_eq!(iter.next().unwrap(), &['l', 'o']);
    +assert_eq!(iter.next().unwrap(), &['r', 'e']);
    +assert!(iter.next().is_none());
    +assert_eq!(iter.remainder(), &['m']);
    +
    source

    pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

    🔬This is a nightly-only experimental API. (slice_as_chunks)

    Splits the slice into a slice of N-element arrays, +assuming that there’s no remainder.

    +
    Safety
    +

    This may only be called when

    +
      +
    • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
    • +
    • N != 0.
    • +
    +
    Examples
    +
    #![feature(slice_as_chunks)]
    +let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
    +let chunks: &[[char; 1]] =
    +    // SAFETY: 1-element chunks never have remainder
    +    unsafe { slice.as_chunks_unchecked() };
    +assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
    +let chunks: &[[char; 3]] =
    +    // SAFETY: The slice length (6) is a multiple of 3
    +    unsafe { slice.as_chunks_unchecked() };
    +assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
    +
    +// These would be unsound:
    +// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
    +// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
    +
    source

    pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

    🔬This is a nightly-only experimental API. (slice_as_chunks)

    Splits the slice into a slice of N-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than N.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(slice_as_chunks)]
    +let slice = ['l', 'o', 'r', 'e', 'm'];
    +let (chunks, remainder) = slice.as_chunks();
    +assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);
    +assert_eq!(remainder, &['m']);
    +

    If you expect the slice to be an exact multiple, you can combine +let-else with an empty slice pattern:

    + +
    #![feature(slice_as_chunks)]
    +let slice = ['R', 'u', 's', 't'];
    +let (chunks, []) = slice.as_chunks::<2>() else {
    +    panic!("slice didn't have even length")
    +};
    +assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
    +
    source

    pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

    🔬This is a nightly-only experimental API. (slice_as_chunks)

    Splits the slice into a slice of N-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than N.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(slice_as_chunks)]
    +let slice = ['l', 'o', 'r', 'e', 'm'];
    +let (remainder, chunks) = slice.as_rchunks();
    +assert_eq!(remainder, &['l']);
    +assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
    +
    source

    pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

    🔬This is a nightly-only experimental API. (array_chunks)

    Returns an iterator over N elements of the slice at a time, starting at the +beginning of the slice.

    +

    The chunks are array references and do not overlap. If N does not divide the +length of the slice, then the last up to N-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

    +

    This method is the const generic equivalent of chunks_exact.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(array_chunks)]
    +let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.array_chunks();
    +assert_eq!(iter.next().unwrap(), &['l', 'o']);
    +assert_eq!(iter.next().unwrap(), &['r', 'e']);
    +assert!(iter.next().is_none());
    +assert_eq!(iter.remainder(), &['m']);
    +
    source

    pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

    🔬This is a nightly-only experimental API. (array_windows)

    Returns an iterator over overlapping windows of N elements of a slice, +starting at the beginning of the slice.

    +

    This is the const generic equivalent of windows.

    +

    If N is greater than the size of the slice, it will return no windows.

    +
    Panics
    +

    Panics if N is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.

    +
    Examples
    +
    #![feature(array_windows)]
    +let slice = [0, 1, 2, 3];
    +let mut iter = slice.array_windows();
    +assert_eq!(iter.next().unwrap(), &[0, 1]);
    +assert_eq!(iter.next().unwrap(), &[1, 2]);
    +assert_eq!(iter.next().unwrap(), &[2, 3]);
    +assert!(iter.next().is_none());
    +
    1.31.0 · source

    pub fn rchunks(&self, chunk_size: usize) -> RChunks<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the end +of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last chunk will not have length chunk_size.

    +

    See rchunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and chunks for the same iterator but starting at the beginning +of the slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.rchunks(2);
    +assert_eq!(iter.next().unwrap(), &['e', 'm']);
    +assert_eq!(iter.next().unwrap(), &['o', 'r']);
    +assert_eq!(iter.next().unwrap(), &['l']);
    +assert!(iter.next().is_none());
    +
    1.31.0 · source

    pub fn rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>

    Returns an iterator over chunk_size elements of the slice at a time, starting at the +end of the slice.

    +

    The chunks are slices and do not overlap. If chunk_size does not divide the length of the +slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved +from the remainder function of the iterator.

    +

    Due to each chunk having exactly chunk_size elements, the compiler can often optimize the +resulting code better than in the case of rchunks.

    +

    See rchunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and chunks_exact for the same iterator but starting at the beginning of the +slice.

    +
    Panics
    +

    Panics if chunk_size is 0.

    +
    Examples
    +
    let slice = ['l', 'o', 'r', 'e', 'm'];
    +let mut iter = slice.rchunks_exact(2);
    +assert_eq!(iter.next().unwrap(), &['e', 'm']);
    +assert_eq!(iter.next().unwrap(), &['o', 'r']);
    +assert!(iter.next().is_none());
    +assert_eq!(iter.remainder(), &['l']);
    +
    source

    pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>where + F: FnMut(&T, &T) -> bool,

    🔬This is a nightly-only experimental API. (slice_group_by)

    Returns an iterator over the slice producing non-overlapping runs +of elements using the predicate to separate them.

    +

    The predicate is called on two elements following themselves, +it means the predicate is called on slice[0] and slice[1] +then on slice[1] and slice[2] and so on.

    +
    Examples
    +
    #![feature(slice_group_by)]
    +
    +let slice = &[1, 1, 1, 3, 3, 2, 2, 2];
    +
    +let mut iter = slice.group_by(|a, b| a == b);
    +
    +assert_eq!(iter.next(), Some(&[1, 1, 1][..]));
    +assert_eq!(iter.next(), Some(&[3, 3][..]));
    +assert_eq!(iter.next(), Some(&[2, 2, 2][..]));
    +assert_eq!(iter.next(), None);
    +

    This method can be used to extract the sorted subslices:

    + +
    #![feature(slice_group_by)]
    +
    +let slice = &[1, 1, 2, 3, 2, 3, 2, 3, 4];
    +
    +let mut iter = slice.group_by(|a, b| a <= b);
    +
    +assert_eq!(iter.next(), Some(&[1, 1, 2, 3][..]));
    +assert_eq!(iter.next(), Some(&[2, 3][..]));
    +assert_eq!(iter.next(), Some(&[2, 3, 4][..]));
    +assert_eq!(iter.next(), None);
    +
    1.0.0 · source

    pub fn split_at(&self, mid: usize) -> (&[T], &[T])

    Divides one slice into two at an index.

    +

    The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

    +
    Panics
    +

    Panics if mid > len.

    +
    Examples
    +
    let v = [1, 2, 3, 4, 5, 6];
    +
    +{
    +   let (left, right) = v.split_at(0);
    +   assert_eq!(left, []);
    +   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_at(2);
    +    assert_eq!(left, [1, 2]);
    +    assert_eq!(right, [3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_at(6);
    +    assert_eq!(left, [1, 2, 3, 4, 5, 6]);
    +    assert_eq!(right, []);
    +}
    +
    source

    pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

    🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

    Divides one slice into two at an index, without doing bounds checking.

    +

    The first will contain all indices from [0, mid) (excluding +the index mid itself) and the second will contain all +indices from [mid, len) (excluding the index len itself).

    +

    For a safe alternative see split_at.

    +
    Safety
    +

    Calling this method with an out-of-bounds index is undefined behavior +even if the resulting reference is not used. The caller has to ensure that +0 <= mid <= self.len().

    +
    Examples
    +
    #![feature(slice_split_at_unchecked)]
    +
    +let v = [1, 2, 3, 4, 5, 6];
    +
    +unsafe {
    +   let (left, right) = v.split_at_unchecked(0);
    +   assert_eq!(left, []);
    +   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
    +}
    +
    +unsafe {
    +    let (left, right) = v.split_at_unchecked(2);
    +    assert_eq!(left, [1, 2]);
    +    assert_eq!(right, [3, 4, 5, 6]);
    +}
    +
    +unsafe {
    +    let (left, right) = v.split_at_unchecked(6);
    +    assert_eq!(left, [1, 2, 3, 4, 5, 6]);
    +    assert_eq!(right, []);
    +}
    +
    source

    pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one slice into an array and a remainder slice at an index.

    +

    The array will contain all indices from [0, N) (excluding +the index N itself) and the slice will contain all +indices from [N, len) (excluding the index len itself).

    +
    Panics
    +

    Panics if N > len.

    +
    Examples
    +
    #![feature(split_array)]
    +
    +let v = &[1, 2, 3, 4, 5, 6][..];
    +
    +{
    +   let (left, right) = v.split_array_ref::<0>();
    +   assert_eq!(left, &[]);
    +   assert_eq!(right, [1, 2, 3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_array_ref::<2>();
    +    assert_eq!(left, &[1, 2]);
    +    assert_eq!(right, [3, 4, 5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.split_array_ref::<6>();
    +    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
    +    assert_eq!(right, []);
    +}
    +
    source

    pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one slice into an array and a remainder slice at an index from +the end.

    +

    The slice will contain all indices from [0, len - N) (excluding +the index len - N itself) and the array will contain all +indices from [len - N, len) (excluding the index len itself).

    +
    Panics
    +

    Panics if N > len.

    +
    Examples
    +
    #![feature(split_array)]
    +
    +let v = &[1, 2, 3, 4, 5, 6][..];
    +
    +{
    +   let (left, right) = v.rsplit_array_ref::<0>();
    +   assert_eq!(left, [1, 2, 3, 4, 5, 6]);
    +   assert_eq!(right, &[]);
    +}
    +
    +{
    +    let (left, right) = v.rsplit_array_ref::<2>();
    +    assert_eq!(left, [1, 2, 3, 4]);
    +    assert_eq!(right, &[5, 6]);
    +}
    +
    +{
    +    let (left, right) = v.rsplit_array_ref::<6>();
    +    assert_eq!(left, []);
    +    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
    +}
    +
    1.0.0 · source

    pub fn split<F>(&self, pred: F) -> Split<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred. The matched element is not contained in the subslices.

    +
    Examples
    +
    let slice = [10, 40, 33, 20];
    +let mut iter = slice.split(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10, 40]);
    +assert_eq!(iter.next().unwrap(), &[20]);
    +assert!(iter.next().is_none());
    +

    If the first element is matched, an empty slice will be the first item +returned by the iterator. Similarly, if the last element in the slice +is matched, an empty slice will be the last item returned by the +iterator:

    + +
    let slice = [10, 40, 33];
    +let mut iter = slice.split(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10, 40]);
    +assert_eq!(iter.next().unwrap(), &[]);
    +assert!(iter.next().is_none());
    +

    If two matched elements are directly adjacent, an empty slice will be +present between them:

    + +
    let slice = [10, 6, 33, 20];
    +let mut iter = slice.split(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10]);
    +assert_eq!(iter.next().unwrap(), &[]);
    +assert_eq!(iter.next().unwrap(), &[20]);
    +assert!(iter.next().is_none());
    +
    1.51.0 · source

    pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred. The matched element is contained in the end of the previous +subslice as a terminator.

    +
    Examples
    +
    let slice = [10, 40, 33, 20];
    +let mut iter = slice.split_inclusive(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[10, 40, 33]);
    +assert_eq!(iter.next().unwrap(), &[20]);
    +assert!(iter.next().is_none());
    +

    If the last element of the slice is matched, +that element will be considered the terminator of the preceding slice. +That slice will be the last item returned by the iterator.

    + +
    let slice = [3, 10, 40, 33];
    +let mut iter = slice.split_inclusive(|num| num % 3 == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[3]);
    +assert_eq!(iter.next().unwrap(), &[10, 40, 33]);
    +assert!(iter.next().is_none());
    +
    1.27.0 · source

    pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred, starting at the end of the slice and working backwards. +The matched element is not contained in the subslices.

    +
    Examples
    +
    let slice = [11, 22, 33, 0, 44, 55];
    +let mut iter = slice.rsplit(|num| *num == 0);
    +
    +assert_eq!(iter.next().unwrap(), &[44, 55]);
    +assert_eq!(iter.next().unwrap(), &[11, 22, 33]);
    +assert_eq!(iter.next(), None);
    +

    As with split(), if the first or last element is matched, an empty +slice will be the first (or last) item returned by the iterator.

    + +
    let v = &[0, 1, 1, 2, 3, 5, 8];
    +let mut it = v.rsplit(|n| *n % 2 == 0);
    +assert_eq!(it.next().unwrap(), &[]);
    +assert_eq!(it.next().unwrap(), &[3, 5]);
    +assert_eq!(it.next().unwrap(), &[1, 1]);
    +assert_eq!(it.next().unwrap(), &[]);
    +assert_eq!(it.next(), None);
    +
    1.0.0 · source

    pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred, limited to returning at most n items. The matched element is +not contained in the subslices.

    +

    The last element returned, if any, will contain the remainder of the +slice.

    +
    Examples
    +

    Print the slice split once by numbers divisible by 3 (i.e., [10, 40], +[20, 60, 50]):

    + +
    let v = [10, 40, 30, 20, 60, 50];
    +
    +for group in v.splitn(2, |num| *num % 3 == 0) {
    +    println!("{group:?}");
    +}
    +
    1.0.0 · source

    pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>where + F: FnMut(&T) -> bool,

    Returns an iterator over subslices separated by elements that match +pred limited to returning at most n items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.

    +

    The last element returned, if any, will contain the remainder of the +slice.

    +
    Examples
    +

    Print the slice split once, starting from the end, by numbers divisible +by 3 (i.e., [50], [10, 40, 30, 20]):

    + +
    let v = [10, 40, 30, 20, 60, 50];
    +
    +for group in v.rsplitn(2, |num| *num % 3 == 0) {
    +    println!("{group:?}");
    +}
    +
    1.0.0 · source

    pub fn contains(&self, x: &T) -> boolwhere + T: PartialEq<T>,

    Returns true if the slice contains an element with the given value.

    +

    This operation is O(n).

    +

    Note that if you have a sorted slice, binary_search may be faster.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert!(v.contains(&30));
    +assert!(!v.contains(&50));
    +

    If you do not have a &T, but some other value that you can compare +with one (for example, String implements PartialEq<str>), you can +use iter().any:

    + +
    let v = [String::from("hello"), String::from("world")]; // slice of `String`
    +assert!(v.iter().any(|e| e == "hello")); // search with `&str`
    +assert!(!v.iter().any(|e| e == "hi"));
    +
    1.0.0 · source

    pub fn starts_with(&self, needle: &[T]) -> boolwhere + T: PartialEq<T>,

    Returns true if needle is a prefix of the slice.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert!(v.starts_with(&[10]));
    +assert!(v.starts_with(&[10, 40]));
    +assert!(!v.starts_with(&[50]));
    +assert!(!v.starts_with(&[10, 50]));
    +

    Always returns true if needle is an empty slice:

    + +
    let v = &[10, 40, 30];
    +assert!(v.starts_with(&[]));
    +let v: &[u8] = &[];
    +assert!(v.starts_with(&[]));
    +
    1.0.0 · source

    pub fn ends_with(&self, needle: &[T]) -> boolwhere + T: PartialEq<T>,

    Returns true if needle is a suffix of the slice.

    +
    Examples
    +
    let v = [10, 40, 30];
    +assert!(v.ends_with(&[30]));
    +assert!(v.ends_with(&[40, 30]));
    +assert!(!v.ends_with(&[50]));
    +assert!(!v.ends_with(&[50, 30]));
    +

    Always returns true if needle is an empty slice:

    + +
    let v = &[10, 40, 30];
    +assert!(v.ends_with(&[]));
    +let v: &[u8] = &[];
    +assert!(v.ends_with(&[]));
    +
    1.51.0 · source

    pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq<T>,

    Returns a subslice with the prefix removed.

    +

    If the slice starts with prefix, returns the subslice after the prefix, wrapped in Some. +If prefix is empty, simply returns the original slice.

    +

    If the slice does not start with prefix, returns None.

    +
    Examples
    +
    let v = &[10, 40, 30];
    +assert_eq!(v.strip_prefix(&[10]), Some(&[40, 30][..]));
    +assert_eq!(v.strip_prefix(&[10, 40]), Some(&[30][..]));
    +assert_eq!(v.strip_prefix(&[50]), None);
    +assert_eq!(v.strip_prefix(&[10, 50]), None);
    +
    +let prefix : &str = "he";
    +assert_eq!(b"hello".strip_prefix(prefix.as_bytes()),
    +           Some(b"llo".as_ref()));
    +
    1.51.0 · source

    pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq<T>,

    Returns a subslice with the suffix removed.

    +

    If the slice ends with suffix, returns the subslice before the suffix, wrapped in Some. +If suffix is empty, simply returns the original slice.

    +

    If the slice does not end with suffix, returns None.

    +
    Examples
    +
    let v = &[10, 40, 30];
    +assert_eq!(v.strip_suffix(&[30]), Some(&[10, 40][..]));
    +assert_eq!(v.strip_suffix(&[40, 30]), Some(&[10][..]));
    +assert_eq!(v.strip_suffix(&[50]), None);
    +assert_eq!(v.strip_suffix(&[50, 30]), None);
    +

    Binary searches this slice for a given element. +If the slice is not sorted, the returned result is unspecified and +meaningless.

    +

    If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

    +

    See also binary_search_by, binary_search_by_key, and partition_point.

    +
    Examples
    +

    Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in [1, 4].

    + +
    let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +
    +assert_eq!(s.binary_search(&13),  Ok(9));
    +assert_eq!(s.binary_search(&4),   Err(7));
    +assert_eq!(s.binary_search(&100), Err(13));
    +let r = s.binary_search(&1);
    +assert!(match r { Ok(1..=4) => true, _ => false, });
    +

    If you want to find that whole range of matching items, rather than +an arbitrary matching one, that can be done using partition_point:

    + +
    let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +
    +let low = s.partition_point(|x| x < &1);
    +assert_eq!(low, 1);
    +let high = s.partition_point(|x| x <= &1);
    +assert_eq!(high, 5);
    +let r = s.binary_search(&1);
    +assert!((low..high).contains(&r.unwrap()));
    +
    +assert!(s[..low].iter().all(|&x| x < 1));
    +assert!(s[low..high].iter().all(|&x| x == 1));
    +assert!(s[high..].iter().all(|&x| x > 1));
    +
    +// For something not found, the "range" of equal items is empty
    +assert_eq!(s.partition_point(|x| x < &11), 9);
    +assert_eq!(s.partition_point(|x| x <= &11), 9);
    +assert_eq!(s.binary_search(&11), Err(9));
    +

    If you want to insert an item to a sorted vector, while maintaining +sort order, consider using partition_point:

    + +
    let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +let num = 42;
    +let idx = s.partition_point(|&x| x < num);
    +// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);`
    +s.insert(idx, num);
    +assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
    +
    1.0.0 · source

    pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>where + F: FnMut(&'a T) -> Ordering,

    Binary searches this slice with a comparator function.

    +

    The comparator function should return an order code that indicates +whether its argument is Less, Equal or Greater the desired +target. +If the slice is not sorted or if the comparator function does not +implement an order consistent with the sort order of the underlying +slice, the returned result is unspecified and meaningless.

    +

    If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

    +

    See also binary_search, binary_search_by_key, and partition_point.

    +
    Examples
    +

    Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in [1, 4].

    + +
    let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +
    +let seek = 13;
    +assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Ok(9));
    +let seek = 4;
    +assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(7));
    +let seek = 100;
    +assert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(13));
    +let seek = 1;
    +let r = s.binary_search_by(|probe| probe.cmp(&seek));
    +assert!(match r { Ok(1..=4) => true, _ => false, });
    +
    1.10.0 · source

    pub fn binary_search_by_key<'a, B, F>( + &'a self, + b: &B, + f: F +) -> Result<usize, usize>where + F: FnMut(&'a T) -> B, + B: Ord,

    Binary searches this slice with a key extraction function.

    +

    Assumes that the slice is sorted by the key, for instance with +sort_by_key using the same key extraction function. +If the slice is not sorted by the key, the returned result is +unspecified and meaningless.

    +

    If the value is found then Result::Ok is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then Result::Err is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.

    +

    See also binary_search, binary_search_by, and partition_point.

    +
    Examples
    +

    Looks up a series of four elements in a slice of pairs sorted by +their second elements. The first is found, with a uniquely +determined position; the second and third are not found; the +fourth could match any position in [1, 4].

    + +
    let s = [(0, 0), (2, 1), (4, 1), (5, 1), (3, 1),
    +         (1, 2), (2, 3), (4, 5), (5, 8), (3, 13),
    +         (1, 21), (2, 34), (4, 55)];
    +
    +assert_eq!(s.binary_search_by_key(&13, |&(a, b)| b),  Ok(9));
    +assert_eq!(s.binary_search_by_key(&4, |&(a, b)| b),   Err(7));
    +assert_eq!(s.binary_search_by_key(&100, |&(a, b)| b), Err(13));
    +let r = s.binary_search_by_key(&1, |&(a, b)| b);
    +assert!(match r { Ok(1..=4) => true, _ => false, });
    +
    1.30.0 · source

    pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

    Transmute the slice to a slice of another type, ensuring alignment of the types is +maintained.

    +

    This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution will return a maximal middle part.

    +

    This method has no purpose when either input element T or output element U are +zero-sized and will return the original slice without splitting anything.

    +
    Safety
    +

    This method is essentially a transmute with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

    +
    Examples
    +

    Basic usage:

    + +
    unsafe {
    +    let bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];
    +    let (prefix, shorts, suffix) = bytes.align_to::<u16>();
    +    // less_efficient_algorithm_for_bytes(prefix);
    +    // more_efficient_algorithm_for_aligned_shorts(shorts);
    +    // less_efficient_algorithm_for_bytes(suffix);
    +}
    +
    source

    pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])where + Simd<T, LANES>: AsRef<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,

    🔬This is a nightly-only experimental API. (portable_simd)

    Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

    +

    This is a safe wrapper around slice::align_to, so has the same weak +postconditions as that method. You’re only assured that +self.len() == prefix.len() + middle.len() * LANES + suffix.len().

    +

    Notably, all of the following are possible:

    +
      +
    • prefix.len() >= LANES.
    • +
    • middle.is_empty() despite self.len() >= 3 * LANES.
    • +
    • suffix.len() >= LANES.
    • +
    +

    That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.

    +
    Panics
    +

    This will panic if the size of the SIMD type is different from +LANES times that of the scalar.

    +

    At the time of writing, the trait restrictions on Simd<T, LANES> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like LANES == 3.

    +
    Examples
    +
    #![feature(portable_simd)]
    +use core::simd::SimdFloat;
    +
    +let short = &[1, 2, 3];
    +let (prefix, middle, suffix) = short.as_simd::<4>();
    +assert_eq!(middle, []); // Not enough elements for anything in the middle
    +
    +// They might be split in any possible way between prefix and suffix
    +let it = prefix.iter().chain(suffix).copied();
    +assert_eq!(it.collect::<Vec<_>>(), vec![1, 2, 3]);
    +
    +fn basic_simd_sum(x: &[f32]) -> f32 {
    +    use std::ops::Add;
    +    use std::simd::f32x4;
    +    let (prefix, middle, suffix) = x.as_simd();
    +    let sums = f32x4::from_array([
    +        prefix.iter().copied().sum(),
    +        0.0,
    +        0.0,
    +        suffix.iter().copied().sum(),
    +    ]);
    +    let sums = middle.iter().copied().fold(sums, f32x4::add);
    +    sums.reduce_sum()
    +}
    +
    +let numbers: Vec<f32> = (1..101).map(|x| x as _).collect();
    +assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
    +
    source

    pub fn is_sorted(&self) -> boolwhere + T: PartialOrd<T>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted.

    +

    That is, for each element a and its following element b, a <= b must hold. If the +slice yields exactly zero or one element, true is returned.

    +

    Note that if Self::Item is only PartialOrd, but not Ord, the above definition +implies that this function returns false if any two consecutive items are not +comparable.

    +
    Examples
    +
    #![feature(is_sorted)]
    +let empty: [i32; 0] = [];
    +
    +assert!([1, 2, 2, 9].is_sorted());
    +assert!(![1, 3, 2, 4].is_sorted());
    +assert!([0].is_sorted());
    +assert!(empty.is_sorted());
    +assert!(![0.0, 1.0, f32::NAN].is_sorted());
    +
    source

    pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> boolwhere + F: FnMut(&'a T, &'a T) -> Option<Ordering>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given comparator function.

    +

    Instead of using PartialOrd::partial_cmp, this function uses the given compare +function to determine the ordering of two elements. Apart from that, it’s equivalent to +is_sorted; see its documentation for more information.

    +
    source

    pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> boolwhere + F: FnMut(&'a T) -> K, + K: PartialOrd<K>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given key extraction function.

    +

    Instead of comparing the slice’s elements directly, this function compares the keys of the +elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its +documentation for more information.

    +
    Examples
    +
    #![feature(is_sorted)]
    +
    +assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
    +assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
    +
    1.52.0 · source

    pub fn partition_point<P>(&self, pred: P) -> usizewhere + P: FnMut(&T) -> bool,

    Returns the index of the partition point according to the given predicate +(the index of the first element of the second partition).

    +

    The slice is assumed to be partitioned according to the given predicate. +This means that all elements for which the predicate returns true are at the start of the slice +and all elements for which the predicate returns false are at the end. +For example, [7, 15, 3, 5, 4, 12, 6] is partitioned under the predicate x % 2 != 0 +(all odd numbers are at the start, all even at the end).

    +

    If this slice is not partitioned, the returned result is unspecified and meaningless, +as this method performs a kind of binary search.

    +

    See also binary_search, binary_search_by, and binary_search_by_key.

    +
    Examples
    +
    let v = [1, 2, 3, 3, 5, 6, 7];
    +let i = v.partition_point(|&x| x < 5);
    +
    +assert_eq!(i, 4);
    +assert!(v[..i].iter().all(|&x| x < 5));
    +assert!(v[i..].iter().all(|&x| !(x < 5)));
    +

    If all elements of the slice match the predicate, including if the slice +is empty, then the length of the slice will be returned:

    + +
    let a = [2, 4, 8];
    +assert_eq!(a.partition_point(|x| x < &100), a.len());
    +let a: [i32; 0] = [];
    +assert_eq!(a.partition_point(|x| x < &100), 0);
    +

    If you want to insert an item to a sorted vector, while maintaining +sort order:

    + +
    let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
    +let num = 42;
    +let idx = s.partition_point(|&x| x < num);
    +s.insert(idx, num);
    +assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
    +
    1.0.0 · source

    pub fn to_vec(&self) -> Vec<T, Global>where + T: Clone,

    Copies self into a new Vec.

    +
    Examples
    +
    let s = [10, 40, 30];
    +let x = s.to_vec();
    +// Here, `s` and `x` can be modified independently.
    +
    source

    pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>where + A: Allocator, + T: Clone,

    🔬This is a nightly-only experimental API. (allocator_api)

    Copies self into a new Vec with an allocator.

    +
    Examples
    +
    #![feature(allocator_api)]
    +
    +use std::alloc::System;
    +
    +let s = [10, 40, 30];
    +let x = s.to_vec_in(System);
    +// Here, `s` and `x` can be modified independently.
    +
    1.40.0 · source

    pub fn repeat(&self, n: usize) -> Vec<T, Global>where + T: Copy,

    Creates a vector by copying a slice n times.

    +
    Panics
    +

    This function will panic if the capacity would overflow.

    +
    Examples
    +

    Basic usage:

    + +
    assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]);
    +

    A panic upon overflow:

    + +
    // this will panic at runtime
    +b"0123456789abcdef".repeat(usize::MAX);
    +
    1.0.0 · source

    pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output where + [T]: Concat<Item>, + Item: ?Sized,

    Flattens a slice of T into a single value Self::Output.

    +
    Examples
    +
    assert_eq!(["hello", "world"].concat(), "helloworld");
    +assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
    +
    1.3.0 · source

    pub fn join<Separator>( + &self, + sep: Separator +) -> <[T] as Join<Separator>>::Output where + [T]: Join<Separator>,

    Flattens a slice of T into a single value Self::Output, placing a +given separator between each.

    +
    Examples
    +
    assert_eq!(["hello", "world"].join(" "), "hello world");
    +assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
    +assert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
    +
    1.0.0 · source

    pub fn connect<Separator>( + &self, + sep: Separator +) -> <[T] as Join<Separator>>::Output where + [T]: Join<Separator>,

    👎Deprecated since 1.3.0: renamed to join

    Flattens a slice of T into a single value Self::Output, placing a +given separator between each.

    +
    Examples
    +
    assert_eq!(["hello", "world"].connect(" "), "hello world");
    +assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
    +
    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> Vec<u8, Global>

    Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII upper case equivalent.

    +

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.

    +

    To uppercase the value in-place, use make_ascii_uppercase.

    +
    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> Vec<u8, Global>

    Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII lower case equivalent.

    +

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.

    +

    To lowercase the value in-place, use make_ascii_lowercase.

    +

    Trait Implementations§

    1.0.0 · source§

    impl<T, A> Deref for Vec<T, A>where + A: Allocator,

    §

    type Target = [T]

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &[T]

    Dereferences the value.
    §

    impl<T> FuncArgs for Vec<T, Global>where + T: Variant + Clone,

    §

    fn parse<ARGS>(self, args: &mut ARGS)where + ARGS: Extend<Dynamic>,

    Parse function call arguments into a container. Read more
    \ No newline at end of file diff --git a/casbin/rhai/type.INT.html b/casbin/rhai/type.INT.html index e3562aa1..4f821ff8 100644 --- a/casbin/rhai/type.INT.html +++ b/casbin/rhai/type.INT.html @@ -1,4 +1,4 @@ -INT in casbin::rhai - Rust

    Type Definition casbin::rhai::INT

    pub type INT = i32;
    Expand description

    The system integer type. -It is defined as i32 since the only_i32 feature is used.

    +INT in casbin::rhai - Rust

    Type Alias casbin::rhai::INT

    pub type INT = i32;
    Expand description

    The system integer type. +It is defined as i32 since the only_i32 feature is used.

    If the only_i32 feature is not used, this will be i64 instead.

    \ No newline at end of file diff --git a/casbin/rhai/type.Map.html b/casbin/rhai/type.Map.html index 767a6440..9dd5118a 100644 --- a/casbin/rhai/type.Map.html +++ b/casbin/rhai/type.Map.html @@ -1,5 +1,5 @@ -Map in casbin::rhai - Rust

    Type Definition casbin::rhai::Map

    pub type Map = BTreeMap<SmartString<LazyCompact>, Dynamic, Global>;
    Expand description

    A dictionary of Dynamic values with string keys.

    +Map in casbin::rhai - Rust

    Type Alias casbin::rhai::Map

    pub type Map = BTreeMap<SmartString<LazyCompact>, Dynamic, Global>;
    Expand description

    A dictionary of Dynamic values with string keys.

    Not available under no_object.

    SmartString is used as the key type because most property names are ASCII and short, fewer than 23 characters, so they can be stored inline.

    -
    \ No newline at end of file +

    Aliased Type§

    struct Map { /* private fields */ }
    \ No newline at end of file diff --git a/casbin/sidebar-items.js b/casbin/sidebar-items.js index 1ac28503..a4818029 100644 --- a/casbin/sidebar-items.js +++ b/casbin/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":["EffectKind","Event","EventData"],"macro":["get_or_err","push_index_if_explain","register_g_function"],"mod":["error","function_map","prelude","rhai"],"struct":["Assertion","DefaultEffectStream","DefaultEffector","DefaultModel","DefaultRoleManager","Enforcer","FileAdapter","Filter","MemoryAdapter","NullAdapter"],"trait":["Adapter","CoreApi","Effector","EffectorStream","EnforceArgs","EventEmitter","EventKey","IEnforcer","InternalApi","MgmtApi","Model","RbacApi","RoleManager","TryIntoAdapter","TryIntoModel"],"type":["MatchingFn","Result"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["EffectKind","Event","EventData"],"macro":["get_or_err","get_or_err_with_context","push_index_if_explain","register_g_function"],"mod":["error","function_map","prelude","rhai"],"struct":["Assertion","DefaultEffectStream","DefaultEffector","DefaultModel","DefaultRoleManager","EnforceContext","Enforcer","FileAdapter","Filter","MemoryAdapter","NullAdapter"],"trait":["Adapter","CoreApi","Effector","EffectorStream","EnforceArgs","EventEmitter","EventKey","IEnforcer","InternalApi","MgmtApi","Model","RbacApi","RoleManager","TryIntoAdapter","TryIntoModel"],"type":["MatchingFn","Result"]}; \ No newline at end of file diff --git a/casbin/struct.Assertion.html b/casbin/struct.Assertion.html index b3f71202..585fb240 100644 --- a/casbin/struct.Assertion.html +++ b/casbin/struct.Assertion.html @@ -1,25 +1,25 @@ -Assertion in casbin - Rust

    Struct casbin::Assertion

    source ·
    pub struct Assertion {
    -    pub key: String,
    -    pub value: String,
    -    pub tokens: Vec<String>,
    -    pub policy: LinkedHashSet<Vec<String>>,
    +Assertion in casbin - Rust

    Struct casbin::Assertion

    source ·
    pub struct Assertion {
    +    pub key: String,
    +    pub value: String,
    +    pub tokens: Vec<String>,
    +    pub policy: LinkedHashSet<Vec<String>>,
         pub rm: Arc<RwLock<dyn RoleManager>>,
    -}

    Fields§

    §key: String§value: String§tokens: Vec<String>§policy: LinkedHashSet<Vec<String>>§rm: Arc<RwLock<dyn RoleManager>>

    Implementations§

    source§

    impl Assertion

    source

    pub fn get_policy(&self) -> &LinkedHashSet<Vec<String>>

    source

    pub fn get_mut_policy(&mut self) -> &mut LinkedHashSet<Vec<String>>

    Fields§

    §key: String§value: String§tokens: Vec<String>§policy: LinkedHashSet<Vec<String>>§rm: Arc<RwLock<dyn RoleManager>>

    Implementations§

    source§

    impl Assertion

    source

    pub fn get_policy(&self) -> &LinkedHashSet<Vec<String>>

    source

    pub fn get_mut_policy(&mut self) -> &mut LinkedHashSet<Vec<String>>

    Trait Implementations§

    source§

    impl Clone for Assertion

    source§

    fn clone(&self) -> Assertion

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Default for Assertion

    source§

    fn default() -> Self

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +) -> Result<()>

    Trait Implementations§

    source§

    impl Clone for Assertion

    source§

    fn clone(&self) -> Assertion

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Default for Assertion

    source§

    fn default() -> Self

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/struct.DefaultEffectStream.html b/casbin/struct.DefaultEffectStream.html index 82a00e1b..bf5eb433 100644 --- a/casbin/struct.DefaultEffectStream.html +++ b/casbin/struct.DefaultEffectStream.html @@ -1,12 +1,12 @@ -DefaultEffectStream in casbin - Rust
    pub struct DefaultEffectStream { /* private fields */ }

    Trait Implementations§

    source§

    impl Clone for DefaultEffectStream

    source§

    fn clone(&self) -> DefaultEffectStream

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl EffectorStream for DefaultEffectStream

    source§

    fn next(&self) -> bool

    source§

    fn push_effect(&mut self, eft: EffectKind) -> bool

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +DefaultEffectStream in casbin - Rust
    pub struct DefaultEffectStream { /* private fields */ }

    Trait Implementations§

    source§

    impl Clone for DefaultEffectStream

    source§

    fn clone(&self) -> DefaultEffectStream

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl EffectorStream for DefaultEffectStream

    source§

    fn next(&self) -> bool

    source§

    fn push_effect(&mut self, eft: EffectKind) -> bool

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/struct.DefaultEffector.html b/casbin/struct.DefaultEffector.html index d4ad35d5..5390d307 100644 --- a/casbin/struct.DefaultEffector.html +++ b/casbin/struct.DefaultEffector.html @@ -1,11 +1,11 @@ -DefaultEffector in casbin - Rust

    Struct casbin::DefaultEffector

    source ·
    pub struct DefaultEffector;

    Trait Implementations§

    source§

    impl Default for DefaultEffector

    source§

    fn default() -> DefaultEffector

    Returns the “default value” for a type. Read more
    source§

    impl Effector for DefaultEffector

    source§

    fn new_stream(&self, expr: &str, cap: usize) -> Box<dyn EffectorStream>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +DefaultEffector in casbin - Rust

    Struct casbin::DefaultEffector

    source ·
    pub struct DefaultEffector;

    Trait Implementations§

    source§

    impl Default for DefaultEffector

    source§

    fn default() -> DefaultEffector

    Returns the “default value” for a type. Read more
    source§

    impl Effector for DefaultEffector

    source§

    fn new_stream(&self, expr: &str, cap: usize) -> Box<dyn EffectorStream>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/struct.DefaultModel.html b/casbin/struct.DefaultModel.html index 5e51539f..97153ca9 100644 --- a/casbin/struct.DefaultModel.html +++ b/casbin/struct.DefaultModel.html @@ -1,49 +1,49 @@ -DefaultModel in casbin - Rust

    Struct casbin::DefaultModel

    source ·
    pub struct DefaultModel { /* private fields */ }

    Implementations§

    Trait Implementations§

    source§

    impl Clone for DefaultModel

    source§

    fn clone(&self) -> DefaultModel

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Default for DefaultModel

    source§

    fn default() -> DefaultModel

    Returns the “default value” for a type. Read more
    source§

    impl Model for DefaultModel

    source§

    fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool

    source§

    fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>

    source§

    fn get_mut_model( +DefaultModel in casbin - Rust

    Struct casbin::DefaultModel

    source ·
    pub struct DefaultModel { /* private fields */ }

    Implementations§

    Trait Implementations§

    source§

    impl Clone for DefaultModel

    source§

    fn clone(&self) -> DefaultModel

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Default for DefaultModel

    source§

    fn default() -> DefaultModel

    Returns the “default value” for a type. Read more
    source§

    impl Model for DefaultModel

    source§

    fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool

    source§

    fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>

    source§

    fn get_mut_model( &mut self -) -> &mut HashMap<String, LinkedHashMap<String, Assertion>>

    source§

    fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source§

    fn add_policies( +) -> Result<()>

    source§

    fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source§

    fn add_policies( &mut self, - sec: &str, - ptype: &str, - rules: Vec<Vec<String>> -) -> bool

    source§

    fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>

    source§

    fn get_filtered_policy( + sec: &str, + ptype: &str, + rules: Vec<Vec<String>> +) -> bool

    source§

    fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>

    source§

    fn get_filtered_policy( &self, - sec: &str, - ptype: &str, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source§

    fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source§

    fn get_values_for_field_in_policy( + sec: &str, + ptype: &str, + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source§

    fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source§

    fn get_values_for_field_in_policy( &self, - sec: &str, - ptype: &str, - field_index: usize -) -> Vec<String>

    source§

    fn remove_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source§

    fn remove_policies( + sec: &str, + ptype: &str, + field_index: usize +) -> Vec<String>

    source§

    fn remove_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source§

    fn remove_policies( &mut self, - sec: &str, - ptype: &str, - rules: Vec<Vec<String>> -) -> bool

    source§

    fn clear_policy(&mut self)

    source§

    fn remove_filtered_policy( + sec: &str, + ptype: &str, + rules: Vec<Vec<String>> +) -> bool

    source§

    fn clear_policy(&mut self)

    source§

    fn remove_filtered_policy( &mut self, - sec: &str, - ptype: &str, - field_index: usize, - field_values: Vec<String> -) -> (bool, Vec<Vec<String>>)

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + sec: &str, + ptype: &str, + field_index: usize, + field_values: Vec<String> +) -> (bool, Vec<Vec<String>>)

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoModel for Twhere - T: Model + 'static,

    source§

    fn try_into_model<'async_trait>( +From<T> for U chooses to do.

    +

    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoModel for Twhere + T: Model + 'static,

    source§

    fn try_into_model<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model, Global>, Error>> + Send + 'async_trait, Global>>where +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model, Global>, Error>> + Send + 'async_trait, Global>>where T: 'async_trait,

    \ No newline at end of file diff --git a/casbin/struct.DefaultRoleManager.html b/casbin/struct.DefaultRoleManager.html index 16957a61..c59e7ce8 100644 --- a/casbin/struct.DefaultRoleManager.html +++ b/casbin/struct.DefaultRoleManager.html @@ -1,20 +1,20 @@ -DefaultRoleManager in casbin - Rust
    pub struct DefaultRoleManager { /* private fields */ }

    Implementations§

    source§

    impl DefaultRoleManager

    source

    pub fn new(max_hierarchy_level: usize) -> Self

    Trait Implementations§

    source§

    impl RoleManager for DefaultRoleManager

    source§

    fn clear(&mut self)

    source§

    fn matching_fn( +DefaultRoleManager in casbin - Rust
    pub struct DefaultRoleManager { /* private fields */ }

    Implementations§

    source§

    impl DefaultRoleManager

    source

    pub fn new(max_hierarchy_level: usize) -> Self

    Trait Implementations§

    source§

    impl RoleManager for DefaultRoleManager

    source§

    fn clear(&mut self)

    source§

    fn matching_fn( &mut self, - role_matching_fn: Option<MatchingFn>, - domain_matching_fn: Option<MatchingFn> -)

    source§

    fn get_roles(&self, name: &str, domain: Option<&str>) -> Vec<String>

    source§

    fn get_users(&self, name: &str, domain: Option<&str>) -> Vec<String>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + name1: &str, + name2: &str, + domain: Option<&str> +) -> Result<()>

    source§

    fn get_roles(&self, name: &str, domain: Option<&str>) -> Vec<String>

    source§

    fn get_users(&self, name: &str, domain: Option<&str>) -> Vec<String>

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/struct.EnforceContext.html b/casbin/struct.EnforceContext.html new file mode 100644 index 00000000..da3418c8 --- /dev/null +++ b/casbin/struct.EnforceContext.html @@ -0,0 +1,16 @@ +EnforceContext in casbin - Rust

    Struct casbin::EnforceContext

    source ·
    pub struct EnforceContext {
    +    pub r_type: String,
    +    pub p_type: String,
    +    pub e_type: String,
    +    pub m_type: String,
    +}

    Fields§

    §r_type: String§p_type: String§e_type: String§m_type: String

    Implementations§

    source§

    impl EnforceContext

    source

    pub fn new(suffix: &str) -> Self

    source

    pub fn get_cache_key(&self) -> String

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/struct.Enforcer.html b/casbin/struct.Enforcer.html index 45cebdbe..071017eb 100644 --- a/casbin/struct.Enforcer.html +++ b/casbin/struct.Enforcer.html @@ -1,5 +1,5 @@ -Enforcer in casbin - Rust

    Struct casbin::Enforcer

    source ·
    pub struct Enforcer { /* private fields */ }
    Expand description

    Enforcer is the main interface for authorization enforcement and policy management.

    -

    Trait Implementations§

    source§

    impl CoreApi for Enforcer

    source§

    fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool>

    Enforce decides whether a “subject” can access a “object” with the operation “action”, +Enforcer in casbin - Rust

    Struct casbin::Enforcer

    source ·
    pub struct Enforcer { /* private fields */ }
    Expand description

    Enforcer is the main interface for authorization enforcement and policy management.

    +

    Trait Implementations§

    source§

    impl CoreApi for Enforcer

    source§

    fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool>

    Enforce decides whether a “subject” can access a “object” with the operation “action”, input parameters are usually: (sub, obj, act).

    Examples
    use casbin::prelude::*;
    @@ -21,374 +21,407 @@ 
    Examples
    } #[cfg(all(not(feature = "runtime-async-std"), not(feature = "runtime-tokio")))] fn main() {}
    -
    source§

    fn new_raw<'async_trait, M, A>( +

    source§

    fn enforce_with_context<ARGS: EnforceArgs>( + &self, + ctx: EnforceContext, + rvals: ARGS +) -> Result<bool>

    Enforce decides whether a “subject” can access a “object” with the operation “action”, +input parameters are usually: (sub, obj, act). +this function will add suffix to each model eg. r2, p2, e2, m2, g2,

    +
    Examples
    +
    use casbin::prelude::*;
    +use casbin::EnforceContext;
    +
    +#[cfg(feature = "runtime-async-std")]
    +#[async_std::main]
    +async fn main() -> Result<()> {
    +    let mut e = Enforcer::new("examples/multi_section_model.conf", "examples/multi_section_policy.csv").await?;
    +    assert_eq!(true, e.enforce(("alice", "read", "project1"))?);
    +    let ctx = EnforceContext::new("2");
    +    assert_eq!(true, e.enforce_with_context(ctx, ("james", "execute"))?);
    +    Ok(())
    +}
    +
    +#[cfg(feature = "runtime-tokio")]
    +#[tokio::main]
    +async fn main() -> Result<()> {
    +    let mut e = Enforcer::new("examples/multi_section_model.conf", "examples/multi_section_policy.csv").await?;
    +    assert_eq!(true, e.enforce(("alice", "read", "project1"))?);
    +    let ctx = EnforceContext::new("2");
    +    assert_eq!(true, e.enforce_with_context(ctx, ("james", "execute"))?);
    +
    +    Ok(())
    +}
    +#[cfg(all(not(feature = "runtime-async-std"), not(feature = "runtime-tokio")))]
    +fn main() {}
    +
    source§

    fn new_raw<'async_trait, M, A>( m: M, a: A -) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where M: 'async_trait + TryIntoModel, A: 'async_trait + TryIntoAdapter, - Self: 'async_trait,

    source§

    fn new<'async_trait, M, A>( + Self: 'async_trait,

    source§

    fn new<'async_trait, M, A>( m: M, a: A -) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where M: 'async_trait + TryIntoModel, A: 'async_trait + TryIntoAdapter, - Self: 'async_trait,

    source§

    fn add_function( + Self: 'async_trait,

    source§

    fn add_function( &mut self, - fname: &str, - f: fn(_: ImmutableString, _: ImmutableString) -> bool -)

    source§

    fn get_model(&self) -> &dyn Model

    source§

    fn get_mut_model(&mut self) -> &mut dyn Model

    source§

    fn get_adapter(&self) -> &dyn Adapter

    source§

    fn get_mut_adapter(&mut self) -> &mut dyn Adapter

    source§

    fn get_role_manager(&self) -> Arc<RwLock<dyn RoleManager>>

    source§

    fn set_role_manager(&mut self, rm: Arc<RwLock<dyn RoleManager>>) -> Result<()>

    source§

    fn set_model<'life0, 'async_trait, M>( + fname: &str, + f: fn(_: ImmutableString, _: ImmutableString) -> bool +)

    source§

    fn get_model(&self) -> &dyn Model

    source§

    fn get_mut_model(&mut self) -> &mut dyn Model

    source§

    fn get_adapter(&self) -> &dyn Adapter

    source§

    fn get_mut_adapter(&mut self) -> &mut dyn Adapter

    source§

    fn get_role_manager(&self) -> Arc<RwLock<dyn RoleManager>>

    source§

    fn set_role_manager(&mut self, rm: Arc<RwLock<dyn RoleManager>>) -> Result<()>

    source§

    fn set_model<'life0, 'async_trait, M>( &'life0 mut self, m: M -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where M: 'async_trait + TryIntoModel, Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn set_adapter<'life0, 'async_trait, A>( + 'life0: 'async_trait,

    source§

    fn set_adapter<'life0, 'async_trait, A>( &'life0 mut self, a: A -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where A: 'async_trait + TryIntoAdapter, Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn set_effector(&mut self, e: Box<dyn Effector>)

    source§

    fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool>

    source§

    fn load_policy<'life0, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn set_effector(&mut self, e: Box<dyn Effector>)

    source§

    fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool>

    source§

    fn load_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'async_trait>( &'life0 mut self, f: Filter<'a> -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, - 'life0: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    source§

    fn is_enabled(&self) -> bool

    source§

    fn save_policy<'life0, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    source§

    fn is_enabled(&self) -> bool

    source§

    fn save_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn enable_enforce(&mut self, enabled: bool)

    source§

    fn enable_auto_save(&mut self, auto_save: bool)

    source§

    fn has_auto_save_enabled(&self) -> bool

    source§

    impl EventEmitter<Event> for Enforcer

    source§

    fn on(&mut self, e: Event, f: fn(_: &mut Self, _: EventData))

    source§

    fn off(&mut self, e: Event)

    source§

    fn emit(&mut self, e: Event, d: EventData)

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T> InternalApi for Twhere - T: IEnforcer,

    source§

    fn add_policy_internal<'life0, 'life1, 'life2, 'async_trait>( - &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + 'life0: 'async_trait,

    source§

    fn enable_enforce(&mut self, enabled: bool)

    source§

    fn enable_auto_save(&mut self, auto_save: bool)

    source§

    fn has_auto_save_enabled(&self) -> bool

    source§

    impl EventEmitter<Event> for Enforcer

    source§

    fn on(&mut self, e: Event, f: fn(_: &mut Self, _: EventData))

    source§

    fn off(&mut self, e: Event)

    source§

    fn emit(&mut self, e: Event, d: EventData)

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T> InternalApi for Twhere + T: IEnforcer,

    source§

    fn add_policy_internal<'life0, 'life1, 'life2, 'async_trait>( + &'life0 mut self, + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    fn add_policies_internal<'life0, 'life1, 'life2, 'async_trait>( + T: 'async_trait,

    source§

    fn add_policies_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    fn remove_policy_internal<'life0, 'life1, 'life2, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_policy_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    fn remove_policies_internal<'life0, 'life1, 'life2, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_policies_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    fn remove_filtered_policy_internal<'life0, 'life1, 'life2, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_filtered_policy_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - field_index: usize, - field_values: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Vec<String, Global>, Global>), Error>> + Send + 'async_trait, Global>>where + sec: &'life1 str, + ptype: &'life2 str, + field_index: usize, + field_values: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Vec<String, Global>, Global>), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + T: 'async_trait,
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> MgmtApi for Twhere - T: InternalApi,

    source§

    fn add_named_policy<'life0, 'life1, 'async_trait>( +From<T> for U chooses to do.

    +

    source§

    impl<T> MgmtApi for Twhere + T: InternalApi,

    source§

    fn add_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + params: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn add_named_policies<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn add_named_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + paramss: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn remove_named_policy<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + params: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn remove_named_policies<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_named_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + paramss: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn add_named_grouping_policy<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn add_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + params: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn add_named_grouping_policies<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn add_named_grouping_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + paramss: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn remove_named_grouping_policy<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + params: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn remove_named_grouping_policies<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_named_grouping_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + paramss: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn remove_filtered_named_grouping_policy<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_filtered_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - field_index: usize, - field_values: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + field_index: usize, + field_values: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn remove_filtered_named_policy<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn remove_filtered_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - field_index: usize, - field_values: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + ptype: &'life1 str, + field_index: usize, + field_values: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_all_policy(&self) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_filtered_named_policy( + T: 'async_trait,

    source§

    fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_all_policy(&self) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_filtered_named_policy( &self, - ptype: &str, - field_index: usize, - field_values: Vec<String, Global> -) -> Vec<Vec<String, Global>, Global>

    source§

    fn has_named_policy(&self, ptype: &str, params: Vec<String, Global>) -> bool

    source§

    fn get_named_grouping_policy( + ptype: &str, + field_index: usize, + field_values: Vec<String, Global> +) -> Vec<Vec<String, Global>, Global>

    source§

    fn has_named_policy(&self, ptype: &str, params: Vec<String, Global>) -> bool

    source§

    fn get_named_grouping_policy( &self, - ptype: &str -) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_all_grouping_policy(&self) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_filtered_named_grouping_policy( + ptype: &str +) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_all_grouping_policy(&self) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_filtered_named_grouping_policy( &self, - ptype: &str, - field_index: usize, - field_values: Vec<String, Global> -) -> Vec<Vec<String, Global>, Global>

    source§

    fn has_grouping_named_policy( + ptype: &str, + field_index: usize, + field_values: Vec<String, Global> +) -> Vec<Vec<String, Global>, Global>

    source§

    fn has_grouping_named_policy( &self, - ptype: &str, - params: Vec<String, Global> -) -> bool

    source§

    fn get_all_named_subjects(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn get_all_named_objects(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn get_all_named_actions(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn get_all_named_roles(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn add_policy<'life0, 'async_trait>( - &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn add_policies<'life0, 'async_trait>( - &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn remove_policy<'life0, 'async_trait>( - &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn remove_policies<'life0, 'async_trait>( - &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn add_grouping_policy<'life0, 'async_trait>( - &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn add_grouping_policies<'life0, 'async_trait>( - &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn remove_grouping_policy<'life0, 'async_trait>( - &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn remove_grouping_policies<'life0, 'async_trait>( - &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'async_trait>( - &'life0 mut self, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn remove_filtered_grouping_policy<'life0, 'async_trait>( - &'life0 mut self, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn get_policy(&self) -> Vec<Vec<String>>

    source§

    fn get_filtered_policy( + ptype: &str, + params: Vec<String, Global> +) -> bool

    source§

    fn get_all_named_subjects(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn get_all_named_objects(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn get_all_named_actions(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn get_all_named_roles(&self, ptype: &str) -> Vec<String, Global>

    source§

    fn add_policy<'life0, 'async_trait>( + &'life0 mut self, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn add_policies<'life0, 'async_trait>( + &'life0 mut self, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn remove_policy<'life0, 'async_trait>( + &'life0 mut self, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn remove_policies<'life0, 'async_trait>( + &'life0 mut self, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn add_grouping_policy<'life0, 'async_trait>( + &'life0 mut self, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn add_grouping_policies<'life0, 'async_trait>( + &'life0 mut self, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn remove_grouping_policy<'life0, 'async_trait>( + &'life0 mut self, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn remove_grouping_policies<'life0, 'async_trait>( + &'life0 mut self, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'async_trait>( + &'life0 mut self, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn remove_filtered_grouping_policy<'life0, 'async_trait>( + &'life0 mut self, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn get_policy(&self) -> Vec<Vec<String>>

    source§

    fn get_filtered_policy( &self, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source§

    fn has_policy(&self, params: Vec<String>) -> bool

    source§

    fn get_grouping_policy(&self) -> Vec<Vec<String>>

    source§

    fn get_filtered_grouping_policy( + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source§

    fn has_policy(&self, params: Vec<String>) -> bool

    source§

    fn get_grouping_policy(&self) -> Vec<Vec<String>>

    source§

    fn get_filtered_grouping_policy( &self, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source§

    fn has_grouping_policy(&self, params: Vec<String>) -> bool

    source§

    fn get_all_subjects(&self) -> Vec<String>

    source§

    fn get_all_objects(&self) -> Vec<String>

    source§

    fn get_all_actions(&self) -> Vec<String>

    source§

    fn get_all_roles(&self) -> Vec<String>

    source§

    impl<T> RbacApi for Twhere - T: MgmtApi,

    source§

    fn add_permission_for_user<'life0, 'life1, 'async_trait>( - &'life0 mut self, - user: &'life1 str, - permission: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source§

    fn has_grouping_policy(&self, params: Vec<String>) -> bool

    source§

    fn get_all_subjects(&self) -> Vec<String>

    source§

    fn get_all_objects(&self) -> Vec<String>

    source§

    fn get_all_actions(&self) -> Vec<String>

    source§

    fn get_all_roles(&self) -> Vec<String>

    source§

    impl<T> RbacApi for Twhere + T: MgmtApi,

    source§

    fn add_permission_for_user<'life0, 'life1, 'async_trait>( + &'life0 mut self, + user: &'life1 str, + permission: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn add_permissions_for_user<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn add_permissions_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permissions: Vec<Vec<String, Global>, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + user: &'life1 str, + permissions: Vec<Vec<String, Global>, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( + T: 'async_trait,

    source§

    fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, - user: &'life1 str, - role: &'life2 str, - domain: Option<&'life3 str> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + user: &'life1 str, + role: &'life2 str, + domain: Option<&'life3 str> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, - T: 'async_trait,

    source§

    fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( + T: 'async_trait,

    source§

    fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - user: &'life1 str, - roles: Vec<String, Global>, - domain: Option<&'life2 str> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + user: &'life1 str, + roles: Vec<String, Global>, + domain: Option<&'life2 str> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( + T: 'async_trait,

    source§

    fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, - user: &'life1 str, - role: &'life2 str, - domain: Option<&'life3 str> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + user: &'life1 str, + role: &'life2 str, + domain: Option<&'life3 str> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, - T: 'async_trait,

    source§

    fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( + T: 'async_trait,

    source§

    fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - user: &'life1 str, - domain: Option<&'life2 str> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + user: &'life1 str, + domain: Option<&'life2 str> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - T: 'async_trait,

    source§

    fn get_roles_for_user( + T: 'async_trait,

    source§

    fn get_roles_for_user( &mut self, - name: &str, - domain: Option<&str> -) -> Vec<String, Global>

    source§

    fn get_users_for_role( + name: &str, + domain: Option<&str> +) -> Vec<String, Global>

    source§

    fn get_users_for_role( &self, - name: &str, - domain: Option<&str> -) -> Vec<String, Global>

    source§

    fn has_role_for_user( + name: &str, + domain: Option<&str> +) -> Vec<String, Global>

    source§

    fn has_role_for_user( &mut self, - name: &str, - role: &str, - domain: Option<&str> -) -> bool

    source§

    fn delete_user<'life0, 'life1, 'async_trait>( + name: &str, + role: &str, + domain: Option<&str> +) -> bool

    source§

    fn delete_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - name: &'life1 str -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + name: &'life1 str +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn delete_role<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn delete_role<'life0, 'life1, 'async_trait>( &'life0 mut self, - name: &'life1 str -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + name: &'life1 str +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn delete_permission_for_user<'life0, 'life1, 'async_trait>( + T: 'async_trait,

    source§

    fn delete_permission_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permission: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where + user: &'life1 str, + permission: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, - T: 'async_trait,

    source§

    fn get_permissions_for_user( + T: 'async_trait,

    source§

    fn get_permissions_for_user( &self, - user: &str, - domain: Option<&str> -) -> Vec<Vec<String, Global>, Global>

    source§

    fn has_permission_for_user( + user: &str, + domain: Option<&str> +) -> Vec<Vec<String, Global>, Global>

    source§

    fn has_permission_for_user( &self, - user: &str, - permission: Vec<String, Global> -) -> bool

    source§

    fn get_implicit_roles_for_user( + user: &str, + permission: Vec<String, Global> +) -> bool

    source§

    fn get_implicit_roles_for_user( &mut self, - name: &str, - domain: Option<&str> -) -> Vec<String, Global>

    source§

    fn get_implicit_permissions_for_user( + name: &str, + domain: Option<&str> +) -> Vec<String, Global>

    source§

    fn get_implicit_permissions_for_user( &mut self, - user: &str, - domain: Option<&str> -) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_implicit_users_for_permission<'life0, 'async_trait>( + user: &str, + domain: Option<&str> +) -> Vec<Vec<String, Global>, Global>

    source§

    fn get_implicit_users_for_permission<'life0, 'async_trait>( &'life0 self, - permission: Vec<String, Global> -) -> Pin<Box<dyn Future<Output = Vec<String, Global>> + Send + 'async_trait, Global>>where + permission: Vec<String, Global> +) -> Pin<Box<dyn Future<Output = Vec<String, Global>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, - T: 'async_trait,

    source§

    fn delete_permission<'life0, 'async_trait>( + T: 'async_trait,

    source§

    fn delete_permission<'life0, 'async_trait>( &'life0 mut self, - permission: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source§

    fn delete_permissions_for_user<'life0, 'life1, 'async_trait>( + permission: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source§

    fn delete_permissions_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, + user: &'life1 str +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> IEnforcer for Twhere + 'life1: 'async_trait,

    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> IEnforcer for Twhere T: CoreApi + EventEmitter<Event>,

    \ No newline at end of file diff --git a/casbin/struct.FileAdapter.html b/casbin/struct.FileAdapter.html index a4c6f295..e62ab890 100644 --- a/casbin/struct.FileAdapter.html +++ b/casbin/struct.FileAdapter.html @@ -1,92 +1,92 @@ -FileAdapter in casbin - Rust

    Struct casbin::FileAdapter

    source ·
    pub struct FileAdapter<P> { /* private fields */ }

    Implementations§

    source§

    impl<P> FileAdapter<P>where - P: AsRef<Path> + Send + Sync,

    source

    pub fn new(p: P) -> FileAdapter<P>

    Trait Implementations§

    source§

    impl<P> Adapter for FileAdapter<P>where - P: AsRef<Path> + Send + Sync,

    source§

    fn load_policy<'life0, 'life1, 'async_trait>( +FileAdapter in casbin - Rust

    Struct casbin::FileAdapter

    source ·
    pub struct FileAdapter<P> { /* private fields */ }

    Implementations§

    source§

    impl<P> FileAdapter<P>where + P: AsRef<Path> + Send + Sync,

    source

    pub fn new(p: P) -> FileAdapter<P>

    Trait Implementations§

    source§

    impl<P> Adapter for FileAdapter<P>where + P: AsRef<Path> + Send + Sync,

    source§

    fn load_policy<'life0, 'life1, 'async_trait>( &'life0 self, m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model, f: Filter<'a> -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn save_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn save_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rule: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rule: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _field_index: usize, - _field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _field_index: usize, + _field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    Auto Trait Implementations§

    §

    impl<P> RefUnwindSafe for FileAdapter<P>where - P: RefUnwindSafe,

    §

    impl<P> Send for FileAdapter<P>where - P: Send,

    §

    impl<P> Sync for FileAdapter<P>where - P: Sync,

    §

    impl<P> Unpin for FileAdapter<P>where - P: Unpin,

    §

    impl<P> UnwindSafe for FileAdapter<P>where - P: UnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + 'life2: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    Auto Trait Implementations§

    §

    impl<P> RefUnwindSafe for FileAdapter<P>where + P: RefUnwindSafe,

    §

    impl<P> Send for FileAdapter<P>where + P: Send,

    §

    impl<P> Sync for FileAdapter<P>where + P: Sync,

    §

    impl<P> Unpin for FileAdapter<P>where + P: Unpin,

    §

    impl<P> UnwindSafe for FileAdapter<P>where + P: UnwindSafe,

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoAdapter for Twhere - T: Adapter + 'static,

    source§

    fn try_into_adapter<'async_trait>( +From<T> for U chooses to do.

    +

    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoAdapter for Twhere + T: Adapter + 'static,

    source§

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter, Global>, Error>> + Send + 'async_trait, Global>>where +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter, Global>, Error>> + Send + 'async_trait, Global>>where T: 'async_trait,

    \ No newline at end of file diff --git a/casbin/struct.Filter.html b/casbin/struct.Filter.html index 1f000943..75680b70 100644 --- a/casbin/struct.Filter.html +++ b/casbin/struct.Filter.html @@ -1,15 +1,15 @@ -Filter in casbin - Rust

    Struct casbin::Filter

    source ·
    pub struct Filter<'a> {
    -    pub p: Vec<&'a str>,
    -    pub g: Vec<&'a str>,
    -}

    Fields§

    §p: Vec<&'a str>§g: Vec<&'a str>

    Trait Implementations§

    source§

    impl<'a> Clone for Filter<'a>

    source§

    fn clone(&self) -> Filter<'a>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more

    Auto Trait Implementations§

    §

    impl<'a> RefUnwindSafe for Filter<'a>

    §

    impl<'a> Send for Filter<'a>

    §

    impl<'a> Sync for Filter<'a>

    §

    impl<'a> Unpin for Filter<'a>

    §

    impl<'a> UnwindSafe for Filter<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +Filter in casbin - Rust

    Struct casbin::Filter

    source ·
    pub struct Filter<'a> {
    +    pub p: Vec<&'a str>,
    +    pub g: Vec<&'a str>,
    +}

    Fields§

    §p: Vec<&'a str>§g: Vec<&'a str>

    Trait Implementations§

    source§

    impl<'a> Clone for Filter<'a>

    source§

    fn clone(&self) -> Filter<'a>

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more

    Auto Trait Implementations§

    §

    impl<'a> RefUnwindSafe for Filter<'a>

    §

    impl<'a> Send for Filter<'a>

    §

    impl<'a> Sync for Filter<'a>

    §

    impl<'a> Unpin for Filter<'a>

    §

    impl<'a> UnwindSafe for Filter<'a>

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for Twhere + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/casbin/struct.MemoryAdapter.html b/casbin/struct.MemoryAdapter.html index 7d907cd8..9410a92d 100644 --- a/casbin/struct.MemoryAdapter.html +++ b/casbin/struct.MemoryAdapter.html @@ -1,85 +1,85 @@ -MemoryAdapter in casbin - Rust

    Struct casbin::MemoryAdapter

    source ·
    pub struct MemoryAdapter { /* private fields */ }

    Trait Implementations§

    source§

    impl Adapter for MemoryAdapter

    source§

    fn load_policy<'life0, 'life1, 'async_trait>( +MemoryAdapter in casbin - Rust

    Struct casbin::MemoryAdapter

    source ·
    pub struct MemoryAdapter { /* private fields */ }

    Trait Implementations§

    source§

    impl Adapter for MemoryAdapter

    source§

    fn load_policy<'life0, 'life1, 'async_trait>( &'life0 self, m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model, f: Filter<'a> -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn save_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn save_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    source§

    impl Default for MemoryAdapter

    source§

    fn default() -> MemoryAdapter

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + 'life2: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    source§

    impl Default for MemoryAdapter

    source§

    fn default() -> MemoryAdapter

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoAdapter for Twhere - T: Adapter + 'static,

    source§

    fn try_into_adapter<'async_trait>( +From<T> for U chooses to do.

    +

    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoAdapter for Twhere + T: Adapter + 'static,

    source§

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter, Global>, Error>> + Send + 'async_trait, Global>>where +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter, Global>, Error>> + Send + 'async_trait, Global>>where T: 'async_trait,

    \ No newline at end of file diff --git a/casbin/struct.NullAdapter.html b/casbin/struct.NullAdapter.html index 9ecf4671..eb61cf15 100644 --- a/casbin/struct.NullAdapter.html +++ b/casbin/struct.NullAdapter.html @@ -1,85 +1,85 @@ -NullAdapter in casbin - Rust

    Struct casbin::NullAdapter

    source ·
    pub struct NullAdapter;

    Trait Implementations§

    source§

    impl Adapter for NullAdapter

    source§

    fn load_policy<'life0, 'life1, 'async_trait>( +NullAdapter in casbin - Rust

    Struct casbin::NullAdapter

    source ·
    pub struct NullAdapter;

    Trait Implementations§

    source§

    impl Adapter for NullAdapter

    source§

    fn load_policy<'life0, 'life1, 'async_trait>( &'life0 self, _m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, _m: &'life1 mut dyn Model, _f: Filter<'a> -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn save_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn save_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, _m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( + 'life1: 'async_trait,

    source§

    fn clear_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source§

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life0: 'async_trait,

    source§

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source§

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - _sec: &'life1 str, - _ptype: &'life2 str, - _field_index: usize, - _field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + _sec: &'life1 str, + _ptype: &'life2 str, + _field_index: usize, + _field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + 'life2: 'async_trait,

    source§

    fn is_filtered(&self) -> bool

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for Twhere + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoAdapter for Twhere - T: Adapter + 'static,

    source§

    fn try_into_adapter<'async_trait>( +From<T> for U chooses to do.

    +

    source§

    impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    source§

    impl<T> TryIntoAdapter for Twhere + T: Adapter + 'static,

    source§

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter, Global>, Error>> + Send + 'async_trait, Global>>where +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter, Global>, Error>> + Send + 'async_trait, Global>>where T: 'async_trait,

    \ No newline at end of file diff --git a/casbin/trait.Adapter.html b/casbin/trait.Adapter.html index 1e8037d6..fca6c9d2 100644 --- a/casbin/trait.Adapter.html +++ b/casbin/trait.Adapter.html @@ -1,9 +1,9 @@ -Adapter in casbin - Rust

    Trait casbin::Adapter

    source ·
    pub trait Adapter: Send + Sync {
    +Adapter in casbin - Rust

    Trait casbin::Adapter

    source ·
    pub trait Adapter: Send + Sync {
         // Required methods
         fn load_policy<'life0, 'life1, 'async_trait>(
             &'life0 self,
             m: &'life1 mut dyn Model
    -    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    +    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait;
    @@ -11,7 +11,7 @@
             &'life0 mut self,
             m: &'life1 mut dyn Model,
             f: Filter<'a>
    -    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    +    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'a: 'async_trait,
                  'life0: 'async_trait,
    @@ -19,136 +19,136 @@
         fn save_policy<'life0, 'life1, 'async_trait>(
             &'life0 mut self,
             m: &'life1 mut dyn Model
    -    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    +    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait;
         fn clear_policy<'life0, 'async_trait>(
             &'life0 mut self
    -    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    +    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait;
    -    fn is_filtered(&self) -> bool;
    +    fn is_filtered(&self) -> bool;
         fn add_policy<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rule: Vec<String>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rule: Vec<String>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn add_policies<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rules: Vec<Vec<String>>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rules: Vec<Vec<String>>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn remove_policy<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rule: Vec<String>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rule: Vec<String>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn remove_policies<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rules: Vec<Vec<String>>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rules: Vec<Vec<String>>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        field_index: usize,
    -        field_values: Vec<String>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        field_index: usize,
    +        field_values: Vec<String>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
    -}

    Required Methods§

    source

    fn load_policy<'life0, 'life1, 'async_trait>( +}

    Required Methods§

    source

    fn load_policy<'life0, 'life1, 'async_trait>( &'life0 self, m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model, f: Filter<'a> -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn save_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn save_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn clear_policy<'life0, 'async_trait>( + 'life1: 'async_trait,

    source

    fn clear_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source

    fn is_filtered(&self) -> bool

    source

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life0: 'async_trait,

    source

    fn is_filtered(&self) -> bool

    source

    fn add_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn add_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    Implementors§

    \ No newline at end of file + 'life2: 'async_trait,

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.CoreApi.html b/casbin/trait.CoreApi.html index a19c3b7f..b944d229 100644 --- a/casbin/trait.CoreApi.html +++ b/casbin/trait.CoreApi.html @@ -1,23 +1,23 @@ -CoreApi in casbin - Rust

    Trait casbin::CoreApi

    source ·
    pub trait CoreApi: Send + Sync {
    -
    Show 27 methods // Required methods +CoreApi in casbin - Rust

    Trait casbin::CoreApi

    source ·
    pub trait CoreApi: Send + Sync {
    +
    Show 28 methods // Required methods fn new_raw<'async_trait, M, A>( m: M, a: A - ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> - where Self: Sized + 'async_trait, + ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> + where Self: Sized + 'async_trait, M: 'async_trait + TryIntoModel, A: 'async_trait + TryIntoAdapter; fn new<'async_trait, M, A>( m: M, a: A - ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> - where Self: Sized + 'async_trait, + ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> + where Self: Sized + 'async_trait, M: 'async_trait + TryIntoModel, A: 'async_trait + TryIntoAdapter; fn add_function( &mut self, - fname: &str, - f: fn(_: ImmutableString, _: ImmutableString) -> bool + fname: &str, + f: fn(_: ImmutableString, _: ImmutableString) -> bool ); fn get_model(&self) -> &dyn Model; fn get_mut_model(&mut self) -> &mut dyn Model; @@ -27,103 +27,114 @@ fn set_role_manager( &mut self, rm: Arc<RwLock<dyn RoleManager>> - ) -> Result<()>; + ) -> Result<()>; fn set_model<'life0, 'async_trait, M>( &'life0 mut self, m: M - ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> - where Self: Sized + 'async_trait, + ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> + where Self: Sized + 'async_trait, M: 'async_trait + TryIntoModel, 'life0: 'async_trait; fn set_adapter<'life0, 'async_trait, A>( &'life0 mut self, a: A - ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> - where Self: Sized + 'async_trait, + ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> + where Self: Sized + 'async_trait, A: 'async_trait + TryIntoAdapter, 'life0: 'async_trait; - fn set_effector(&mut self, e: Box<dyn Effector>); - fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool> - where Self: Sized; - fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool> - where Self: Sized; - fn build_role_links(&mut self) -> Result<()>; - fn build_incremental_role_links(&mut self, d: EventData) -> Result<()>; + fn set_effector(&mut self, e: Box<dyn Effector>); + fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool> + where Self: Sized; + fn enforce_with_context<ARGS: EnforceArgs>( + &self, + ctx: EnforceContext, + rvals: ARGS + ) -> Result<bool> + where Self: Sized; + fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool> + where Self: Sized; + fn build_role_links(&mut self) -> Result<()>; + fn build_incremental_role_links(&mut self, d: EventData) -> Result<()>; fn load_policy<'life0, 'async_trait>( &'life0 mut self - ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> + ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn load_filtered_policy<'a, 'life0, 'async_trait>( &'life0 mut self, f: Filter<'a> - ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> + ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait; - fn is_filtered(&self) -> bool; - fn is_enabled(&self) -> bool; + fn is_filtered(&self) -> bool; + fn is_enabled(&self) -> bool; fn save_policy<'life0, 'async_trait>( &'life0 mut self - ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> + ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn clear_policy<'life0, 'async_trait>( &'life0 mut self - ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> + ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; - fn enable_auto_save(&mut self, auto_save: bool); - fn enable_enforce(&mut self, enabled: bool); - fn enable_auto_build_role_links(&mut self, auto_build_role_links: bool); - fn has_auto_save_enabled(&self) -> bool; - fn has_auto_build_role_links_enabled(&self) -> bool; -
    }

    Required Methods§

    source

    fn new_raw<'async_trait, M, A>( + fn enable_auto_save(&mut self, auto_save: bool); + fn enable_enforce(&mut self, enabled: bool); + fn enable_auto_build_role_links(&mut self, auto_build_role_links: bool); + fn has_auto_save_enabled(&self) -> bool; + fn has_auto_build_role_links_enabled(&self) -> bool; +

    }

    Required Methods§

    source

    fn new_raw<'async_trait, M, A>( m: M, a: A -) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where - Self: Sized + 'async_trait, +) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where + Self: Sized + 'async_trait, M: 'async_trait + TryIntoModel, - A: 'async_trait + TryIntoAdapter,

    source

    fn new<'async_trait, M, A>( + A: 'async_trait + TryIntoAdapter,

    source

    fn new<'async_trait, M, A>( m: M, a: A -) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where - Self: Sized + 'async_trait, +) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where + Self: Sized + 'async_trait, M: 'async_trait + TryIntoModel, - A: 'async_trait + TryIntoAdapter,

    source

    fn add_function( + A: 'async_trait + TryIntoAdapter,

    source

    fn add_function( &mut self, - fname: &str, - f: fn(_: ImmutableString, _: ImmutableString) -> bool -)

    source

    fn get_model(&self) -> &dyn Model

    source

    fn get_mut_model(&mut self) -> &mut dyn Model

    source

    fn get_adapter(&self) -> &dyn Adapter

    source

    fn get_mut_adapter(&mut self) -> &mut dyn Adapter

    source

    fn get_role_manager(&self) -> Arc<RwLock<dyn RoleManager>>

    source

    fn set_role_manager(&mut self, rm: Arc<RwLock<dyn RoleManager>>) -> Result<()>

    source

    fn set_model<'life0, 'async_trait, M>( + fname: &str, + f: fn(_: ImmutableString, _: ImmutableString) -> bool +)

    source

    fn get_model(&self) -> &dyn Model

    source

    fn get_mut_model(&mut self) -> &mut dyn Model

    source

    fn get_adapter(&self) -> &dyn Adapter

    source

    fn get_mut_adapter(&mut self) -> &mut dyn Adapter

    source

    fn get_role_manager(&self) -> Arc<RwLock<dyn RoleManager>>

    source

    fn set_role_manager(&mut self, rm: Arc<RwLock<dyn RoleManager>>) -> Result<()>

    source

    fn set_model<'life0, 'async_trait, M>( &'life0 mut self, m: M -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where - Self: Sized + 'async_trait, +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where + Self: Sized + 'async_trait, M: 'async_trait + TryIntoModel, - 'life0: 'async_trait,

    source

    fn set_adapter<'life0, 'async_trait, A>( + 'life0: 'async_trait,

    source

    fn set_adapter<'life0, 'async_trait, A>( &'life0 mut self, a: A -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where - Self: Sized + 'async_trait, +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where + Self: Sized + 'async_trait, A: 'async_trait + TryIntoAdapter, - 'life0: 'async_trait,

    source

    fn set_effector(&mut self, e: Box<dyn Effector>)

    source

    fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool>where - Self: Sized,

    source

    fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool>where - Self: Sized,

    source

    fn load_policy<'life0, 'async_trait>( + 'life0: 'async_trait,

    source

    fn set_effector(&mut self, e: Box<dyn Effector>)

    source

    fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool>where + Self: Sized,

    source

    fn enforce_with_context<ARGS: EnforceArgs>( + &self, + ctx: EnforceContext, + rvals: ARGS +) -> Result<bool>where + Self: Sized,

    source

    fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool>where + Self: Sized,

    source

    fn load_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source

    fn load_filtered_policy<'a, 'life0, 'async_trait>( + 'life0: 'async_trait,

    source

    fn load_filtered_policy<'a, 'life0, 'async_trait>( &'life0 mut self, f: Filter<'a> -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, - 'life0: 'async_trait,

    source

    fn is_filtered(&self) -> bool

    source

    fn is_enabled(&self) -> bool

    source

    fn save_policy<'life0, 'async_trait>( + 'life0: 'async_trait,

    source

    fn is_filtered(&self) -> bool

    source

    fn is_enabled(&self) -> bool

    source

    fn save_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source

    fn clear_policy<'life0, 'async_trait>( + 'life0: 'async_trait,

    source

    fn clear_policy<'life0, 'async_trait>( &'life0 mut self -) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where +) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    source

    fn enable_auto_save(&mut self, auto_save: bool)

    source

    fn enable_enforce(&mut self, enabled: bool)

    source

    fn has_auto_save_enabled(&self) -> bool

    Implementors§

    \ No newline at end of file + 'life0: 'async_trait,
    source

    fn enable_auto_save(&mut self, auto_save: bool)

    source

    fn enable_enforce(&mut self, enabled: bool)

    source

    fn has_auto_save_enabled(&self) -> bool

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.Effector.html b/casbin/trait.Effector.html index 4933298d..f43eb449 100644 --- a/casbin/trait.Effector.html +++ b/casbin/trait.Effector.html @@ -1,4 +1,4 @@ -Effector in casbin - Rust

    Trait casbin::Effector

    source ·
    pub trait Effector: Send + Sync {
    +Effector in casbin - Rust

    Trait casbin::Effector

    source ·
    pub trait Effector: Send + Sync {
         // Required method
    -    fn new_stream(&self, expr: &str, cap: usize) -> Box<dyn EffectorStream>;
    -}

    Required Methods§

    source

    fn new_stream(&self, expr: &str, cap: usize) -> Box<dyn EffectorStream>

    Implementors§

    \ No newline at end of file + fn new_stream(&self, expr: &str, cap: usize) -> Box<dyn EffectorStream>; +}

    Required Methods§

    source

    fn new_stream(&self, expr: &str, cap: usize) -> Box<dyn EffectorStream>

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.EffectorStream.html b/casbin/trait.EffectorStream.html index 6a7fed1d..ccb81cf8 100644 --- a/casbin/trait.EffectorStream.html +++ b/casbin/trait.EffectorStream.html @@ -1,5 +1,5 @@ -EffectorStream in casbin - Rust
    pub trait EffectorStream: Send + Sync {
    +EffectorStream in casbin - Rust
    pub trait EffectorStream: Send + Sync {
         // Required methods
    -    fn next(&self) -> bool;
    -    fn push_effect(&mut self, eft: EffectKind) -> bool;
    -}

    Required Methods§

    source

    fn next(&self) -> bool

    source

    fn push_effect(&mut self, eft: EffectKind) -> bool

    Implementors§

    \ No newline at end of file + fn next(&self) -> bool; + fn push_effect(&mut self, eft: EffectKind) -> bool; +}

    Required Methods§

    source

    fn next(&self) -> bool

    source

    fn push_effect(&mut self, eft: EffectKind) -> bool

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.EnforceArgs.html b/casbin/trait.EnforceArgs.html index 1c417022..2910a730 100644 --- a/casbin/trait.EnforceArgs.html +++ b/casbin/trait.EnforceArgs.html @@ -1,5 +1,5 @@ -EnforceArgs in casbin - Rust

    Trait casbin::EnforceArgs

    source ·
    pub trait EnforceArgs {
    +EnforceArgs in casbin - Rust

    Trait casbin::EnforceArgs

    source ·
    pub trait EnforceArgs {
         // Required methods
    -    fn try_into_vec(self) -> Result<Vec<Dynamic>>;
    -    fn cache_key(&self) -> u64;
    -}

    Required Methods§

    Implementations on Foreign Types§

    source§

    impl<P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (P, Q, R, S, T, U, V)

    source§

    impl EnforceArgs for Vec<String>

    source§

    impl EnforceArgs for ()

    source§

    impl<B: Serialize + Hash, C: Serialize + Hash, D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (N, P, Q, R, S, T, U, V)

    source§

    impl<A: Serialize + Hash, B: Serialize + Hash, C: Serialize + Hash, D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (R, S, T, U, V)

    source§

    impl<U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (U, V)

    source§

    impl<C: Serialize + Hash, D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (Q, R, S, T, U, V)

    source§

    impl<F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<V: Serialize + Hash> EnforceArgs for (V,)

    source§

    impl<L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (T, U, V)

    source§

    impl<S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (S, T, U, V)

    source§

    impl<M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (M, N, P, Q, R, S, T, U, V)

    source§

    impl<D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    Implementors§

    \ No newline at end of file + fn try_into_vec(self) -> Result<Vec<Dynamic>>; + fn cache_key(&self) -> u64; +}

    Required Methods§

    Implementations on Foreign Types§

    source§

    impl<L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (Q, R, S, T, U, V)

    source§

    impl EnforceArgs for ()

    source§

    impl<N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (N, P, Q, R, S, T, U, V)

    source§

    impl<C: Serialize + Hash, D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<B: Serialize + Hash, C: Serialize + Hash, D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (T, U, V)

    source§

    impl<U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (U, V)

    source§

    impl<K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (M, N, P, Q, R, S, T, U, V)

    source§

    impl<V: Serialize + Hash> EnforceArgs for (V,)

    source§

    impl EnforceArgs for Vec<String>

    source§

    impl<H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (S, T, U, V)

    source§

    impl<R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (R, S, T, U, V)

    source§

    impl<D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<A: Serialize + Hash, B: Serialize + Hash, C: Serialize + Hash, D: Serialize + Hash, E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (P, Q, R, S, T, U, V)

    source§

    impl<E: Serialize + Hash, F: Serialize + Hash, G: Serialize + Hash, H: Serialize + Hash, J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V)

    source§

    impl<J: Serialize + Hash, K: Serialize + Hash, L: Serialize + Hash, M: Serialize + Hash, N: Serialize + Hash, P: Serialize + Hash, Q: Serialize + Hash, R: Serialize + Hash, S: Serialize + Hash, T: Serialize + Hash, U: Serialize + Hash, V: Serialize + Hash> EnforceArgs for (J, K, L, M, N, P, Q, R, S, T, U, V)

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.EventEmitter.html b/casbin/trait.EventEmitter.html index 919f2ac5..89fc1e2c 100644 --- a/casbin/trait.EventEmitter.html +++ b/casbin/trait.EventEmitter.html @@ -1,9 +1,9 @@ -EventEmitter in casbin - Rust

    Trait casbin::EventEmitter

    source ·
    pub trait EventEmitter<K>where
    +EventEmitter in casbin - Rust

    Trait casbin::EventEmitter

    source ·
    pub trait EventEmitter<K>where
         K: EventKey,{
         // Required methods
    -    fn on(&mut self, e: K, f: fn(_: &mut Self, _: EventData))
    -       where Self: Sized;
    +    fn on(&mut self, e: K, f: fn(_: &mut Self, _: EventData))
    +       where Self: Sized;
         fn off(&mut self, e: K);
         fn emit(&mut self, e: K, d: EventData);
    -}

    Required Methods§

    source

    fn on(&mut self, e: K, f: fn(_: &mut Self, _: EventData))where - Self: Sized,

    source

    fn off(&mut self, e: K)

    source

    fn emit(&mut self, e: K, d: EventData)

    Implementors§

    \ No newline at end of file +}

    Required Methods§

    source

    fn on(&mut self, e: K, f: fn(_: &mut Self, _: EventData))where + Self: Sized,

    source

    fn off(&mut self, e: K)

    source

    fn emit(&mut self, e: K, d: EventData)

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.EventKey.html b/casbin/trait.EventKey.html index 2f59a3e4..2fd32dde 100644 --- a/casbin/trait.EventKey.html +++ b/casbin/trait.EventKey.html @@ -1,2 +1,2 @@ -EventKey in casbin - Rust

    Trait casbin::EventKey

    source ·
    pub trait EventKey: Hash + PartialEq + Eq + Send + Sync { }

    Implementors§

    source§

    impl<T> EventKey for Twhere - T: Hash + PartialEq + Eq + Send + Sync,

    \ No newline at end of file +EventKey in casbin - Rust

    Trait casbin::EventKey

    source ·
    pub trait EventKey: Hash + PartialEq + Eq + Send + Sync { }

    Implementors§

    source§

    impl<T> EventKey for Twhere + T: Hash + PartialEq + Eq + Send + Sync,

    \ No newline at end of file diff --git a/casbin/trait.IEnforcer.html b/casbin/trait.IEnforcer.html index a125c0ef..c58ac1d5 100644 --- a/casbin/trait.IEnforcer.html +++ b/casbin/trait.IEnforcer.html @@ -1,2 +1,2 @@ -IEnforcer in casbin - Rust

    Trait casbin::IEnforcer

    source ·
    pub trait IEnforcer: CoreApi + EventEmitter<Event> { }

    Implementors§

    source§

    impl<T> IEnforcer for Twhere +IEnforcer in casbin - Rust

    Trait casbin::IEnforcer

    source ·
    pub trait IEnforcer: CoreApi + EventEmitter<Event> { }

    Implementors§

    source§

    impl<T> IEnforcer for Twhere T: CoreApi + EventEmitter<Event>,

    \ No newline at end of file diff --git a/casbin/trait.InternalApi.html b/casbin/trait.InternalApi.html index f8789ceb..31c7baec 100644 --- a/casbin/trait.InternalApi.html +++ b/casbin/trait.InternalApi.html @@ -1,101 +1,101 @@ -InternalApi in casbin - Rust

    Trait casbin::InternalApi

    source ·
    pub trait InternalApi: IEnforcer {
    +InternalApi in casbin - Rust

    Trait casbin::InternalApi

    source ·
    pub trait InternalApi: IEnforcer {
         // Required methods
         fn add_policy_internal<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rule: Vec<String>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rule: Vec<String>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn add_policies_internal<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rules: Vec<Vec<String>>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rules: Vec<Vec<String>>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn remove_policy_internal<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rule: Vec<String>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rule: Vec<String>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn remove_policies_internal<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        rules: Vec<Vec<String>>
    -    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        rules: Vec<Vec<String>>
    +    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
         fn remove_filtered_policy_internal<'life0, 'life1, 'life2, 'async_trait>(
             &'life0 mut self,
    -        sec: &'life1 str,
    -        ptype: &'life2 str,
    -        field_index: usize,
    -        field_values: Vec<String>
    -    ) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Vec<String>>)>> + Send + 'async_trait>>
    +        sec: &'life1 str,
    +        ptype: &'life2 str,
    +        field_index: usize,
    +        field_values: Vec<String>
    +    ) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Vec<String>>)>> + Send + 'async_trait>>
            where Self: 'async_trait,
                  'life0: 'async_trait,
                  'life1: 'async_trait,
                  'life2: 'async_trait;
    -}

    Required Methods§

    source

    fn add_policy_internal<'life0, 'life1, 'life2, 'async_trait>( +}

    Required Methods§

    source

    fn add_policy_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn add_policies_internal<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn add_policies_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn remove_policy_internal<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn remove_policy_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rule: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rule: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn remove_policies_internal<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn remove_policies_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - rules: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + rules: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn remove_filtered_policy_internal<'life0, 'life1, 'life2, 'async_trait>( + 'life2: 'async_trait,

    source

    fn remove_filtered_policy_internal<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - sec: &'life1 str, - ptype: &'life2 str, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Vec<String>>)>> + Send + 'async_trait>>where + sec: &'life1 str, + ptype: &'life2 str, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Vec<String>>)>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    Implementors§

    source§

    impl<T> InternalApi for Twhere + 'life2: 'async_trait,

    Implementors§

    source§

    impl<T> InternalApi for Twhere T: IEnforcer,

    \ No newline at end of file diff --git a/casbin/trait.MgmtApi.html b/casbin/trait.MgmtApi.html index 53206efc..f8b21cc0 100644 --- a/casbin/trait.MgmtApi.html +++ b/casbin/trait.MgmtApi.html @@ -1,336 +1,336 @@ -MgmtApi in casbin - Rust

    Trait casbin::MgmtApi

    source ·
    pub trait MgmtApi: InternalApi {
    +MgmtApi in casbin - Rust

    Trait casbin::MgmtApi

    source ·
    pub trait MgmtApi: InternalApi {
     
    Show 42 methods // Required methods fn add_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_named_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_named_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_named_grouping_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_named_grouping_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_filtered_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - field_index: usize, - field_values: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + field_index: usize, + field_values: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_filtered_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - field_index: usize, - field_values: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + ptype: &'life1 str, + field_index: usize, + field_values: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; - fn get_all_policy(&self) -> Vec<Vec<String>>; - fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String>>; + fn get_all_policy(&self) -> Vec<Vec<String>>; + fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String>>; fn get_filtered_named_policy( &self, - ptype: &str, - field_index: usize, - field_values: Vec<String> - ) -> Vec<Vec<String>>; - fn has_named_policy(&self, ptype: &str, params: Vec<String>) -> bool; - fn get_all_grouping_policy(&self) -> Vec<Vec<String>>; - fn get_named_grouping_policy(&self, ptype: &str) -> Vec<Vec<String>>; + ptype: &str, + field_index: usize, + field_values: Vec<String> + ) -> Vec<Vec<String>>; + fn has_named_policy(&self, ptype: &str, params: Vec<String>) -> bool; + fn get_all_grouping_policy(&self) -> Vec<Vec<String>>; + fn get_named_grouping_policy(&self, ptype: &str) -> Vec<Vec<String>>; fn get_filtered_named_grouping_policy( &self, - ptype: &str, - field_index: usize, - field_values: Vec<String> - ) -> Vec<Vec<String>>; + ptype: &str, + field_index: usize, + field_values: Vec<String> + ) -> Vec<Vec<String>>; fn has_grouping_named_policy( &self, - ptype: &str, - params: Vec<String> - ) -> bool; - fn get_all_named_subjects(&self, ptype: &str) -> Vec<String>; - fn get_all_named_objects(&self, ptype: &str) -> Vec<String>; - fn get_all_named_actions(&self, ptype: &str) -> Vec<String>; - fn get_all_named_roles(&self, ptype: &str) -> Vec<String>; + ptype: &str, + params: Vec<String> + ) -> bool; + fn get_all_named_subjects(&self, ptype: &str) -> Vec<String>; + fn get_all_named_objects(&self, ptype: &str) -> Vec<String>; + fn get_all_named_actions(&self, ptype: &str) -> Vec<String>; + fn get_all_named_roles(&self, ptype: &str) -> Vec<String>; // Provided methods fn add_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn add_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn remove_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn remove_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn add_grouping_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn add_grouping_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn remove_grouping_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + params: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn remove_grouping_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + paramss: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn remove_filtered_policy<'life0, 'async_trait>( &'life0 mut self, - field_index: usize, - field_values: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + field_index: usize, + field_values: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn remove_filtered_grouping_policy<'life0, 'async_trait>( &'life0 mut self, - field_index: usize, - field_values: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + field_index: usize, + field_values: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } - fn get_policy(&self) -> Vec<Vec<String>> { ... } + fn get_policy(&self) -> Vec<Vec<String>> { ... } fn get_filtered_policy( &self, - field_index: usize, - field_values: Vec<String> - ) -> Vec<Vec<String>> { ... } - fn has_policy(&self, params: Vec<String>) -> bool { ... } - fn get_grouping_policy(&self) -> Vec<Vec<String>> { ... } + field_index: usize, + field_values: Vec<String> + ) -> Vec<Vec<String>> { ... } + fn has_policy(&self, params: Vec<String>) -> bool { ... } + fn get_grouping_policy(&self) -> Vec<Vec<String>> { ... } fn get_filtered_grouping_policy( &self, - field_index: usize, - field_values: Vec<String> - ) -> Vec<Vec<String>> { ... } - fn has_grouping_policy(&self, params: Vec<String>) -> bool { ... } - fn get_all_subjects(&self) -> Vec<String> { ... } - fn get_all_objects(&self) -> Vec<String> { ... } - fn get_all_actions(&self) -> Vec<String> { ... } - fn get_all_roles(&self) -> Vec<String> { ... } -
    }

    Required Methods§

    source

    fn add_named_policy<'life0, 'life1, 'async_trait>( + field_index: usize, + field_values: Vec<String> + ) -> Vec<Vec<String>> { ... } + fn has_grouping_policy(&self, params: Vec<String>) -> bool { ... } + fn get_all_subjects(&self) -> Vec<String> { ... } + fn get_all_objects(&self) -> Vec<String> { ... } + fn get_all_actions(&self) -> Vec<String> { ... } + fn get_all_roles(&self) -> Vec<String> { ... } +}

    Required Methods§

    source

    fn add_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn add_named_policies<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn add_named_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn remove_named_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn remove_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn remove_named_policies<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn remove_named_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn add_named_grouping_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn add_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn add_named_grouping_policies<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn add_named_grouping_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn remove_named_grouping_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn remove_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn remove_named_grouping_policies<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn remove_named_grouping_policies<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn remove_filtered_named_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn remove_filtered_named_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn remove_filtered_named_grouping_policy<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn remove_filtered_named_grouping_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, - ptype: &'life1 str, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + ptype: &'life1 str, + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn get_all_policy(&self) -> Vec<Vec<String>>

    source

    fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String>>

    source

    fn get_filtered_named_policy( + 'life1: 'async_trait,

    source

    fn get_all_policy(&self) -> Vec<Vec<String>>

    source

    fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String>>

    source

    fn get_filtered_named_policy( &self, - ptype: &str, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source

    fn has_named_policy(&self, ptype: &str, params: Vec<String>) -> bool

    source

    fn get_all_grouping_policy(&self) -> Vec<Vec<String>>

    source

    fn get_named_grouping_policy(&self, ptype: &str) -> Vec<Vec<String>>

    source

    fn get_filtered_named_grouping_policy( + ptype: &str, + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source

    fn has_named_policy(&self, ptype: &str, params: Vec<String>) -> bool

    source

    fn get_all_grouping_policy(&self) -> Vec<Vec<String>>

    source

    fn get_named_grouping_policy(&self, ptype: &str) -> Vec<Vec<String>>

    source

    fn get_filtered_named_grouping_policy( &self, - ptype: &str, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source

    fn has_grouping_named_policy(&self, ptype: &str, params: Vec<String>) -> bool

    source

    fn get_all_named_subjects(&self, ptype: &str) -> Vec<String>

    source

    fn get_all_named_objects(&self, ptype: &str) -> Vec<String>

    source

    fn get_all_named_actions(&self, ptype: &str) -> Vec<String>

    source

    fn get_all_named_roles(&self, ptype: &str) -> Vec<String>

    Provided Methods§

    source

    fn add_policy<'life0, 'async_trait>( + ptype: &str, + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source

    fn has_grouping_named_policy(&self, ptype: &str, params: Vec<String>) -> bool

    source

    fn get_all_named_subjects(&self, ptype: &str) -> Vec<String>

    source

    fn get_all_named_objects(&self, ptype: &str) -> Vec<String>

    source

    fn get_all_named_actions(&self, ptype: &str) -> Vec<String>

    source

    fn get_all_named_roles(&self, ptype: &str) -> Vec<String>

    Provided Methods§

    source

    fn add_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn add_policies<'life0, 'async_trait>( + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn add_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn remove_policy<'life0, 'async_trait>( + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn remove_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn remove_policies<'life0, 'async_trait>( + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn remove_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn add_grouping_policy<'life0, 'async_trait>( + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn add_grouping_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn add_grouping_policies<'life0, 'async_trait>( + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn add_grouping_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn remove_grouping_policy<'life0, 'async_trait>( + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn remove_grouping_policy<'life0, 'async_trait>( &'life0 mut self, - params: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn remove_grouping_policies<'life0, 'async_trait>( + params: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn remove_grouping_policies<'life0, 'async_trait>( &'life0 mut self, - paramss: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn remove_filtered_policy<'life0, 'async_trait>( + paramss: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn remove_filtered_policy<'life0, 'async_trait>( &'life0 mut self, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn remove_filtered_grouping_policy<'life0, 'async_trait>( + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn remove_filtered_grouping_policy<'life0, 'async_trait>( &'life0 mut self, - field_index: usize, - field_values: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn get_policy(&self) -> Vec<Vec<String>>

    source

    fn get_filtered_policy( + field_index: usize, + field_values: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn get_policy(&self) -> Vec<Vec<String>>

    source

    fn get_filtered_policy( &self, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source

    fn has_policy(&self, params: Vec<String>) -> bool

    source

    fn get_grouping_policy(&self) -> Vec<Vec<String>>

    source

    fn get_filtered_grouping_policy( + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source

    fn has_policy(&self, params: Vec<String>) -> bool

    source

    fn get_grouping_policy(&self) -> Vec<Vec<String>>

    source

    fn get_filtered_grouping_policy( &self, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source

    fn has_grouping_policy(&self, params: Vec<String>) -> bool

    source

    fn get_all_subjects(&self) -> Vec<String>

    source

    fn get_all_objects(&self) -> Vec<String>

    source

    fn get_all_actions(&self) -> Vec<String>

    source

    fn get_all_roles(&self) -> Vec<String>

    Implementors§

    source§

    impl<T> MgmtApi for Twhere + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source

    fn has_grouping_policy(&self, params: Vec<String>) -> bool

    source

    fn get_all_subjects(&self) -> Vec<String>

    source

    fn get_all_objects(&self) -> Vec<String>

    source

    fn get_all_actions(&self) -> Vec<String>

    source

    fn get_all_roles(&self) -> Vec<String>

    Implementors§

    source§

    impl<T> MgmtApi for Twhere T: InternalApi,

    \ No newline at end of file diff --git a/casbin/trait.Model.html b/casbin/trait.Model.html index a0c95ba1..f64fe046 100644 --- a/casbin/trait.Model.html +++ b/casbin/trait.Model.html @@ -1,92 +1,92 @@ -Model in casbin - Rust

    Trait casbin::Model

    source ·
    pub trait Model: Send + Sync {
    +Model in casbin - Rust

    Trait casbin::Model

    source ·
    pub trait Model: Send + Sync {
     
    Show 15 methods // Required methods - fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool; - fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>; + fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool; + fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>; fn get_mut_model( &mut self - ) -> &mut HashMap<String, LinkedHashMap<String, Assertion>>; + ) -> &mut HashMap<String, LinkedHashMap<String, Assertion>>; fn build_role_links( &mut self, rm: Arc<RwLock<dyn RoleManager>> - ) -> Result<()>; + ) -> Result<()>; fn build_incremental_role_links( &mut self, rm: Arc<RwLock<dyn RoleManager>>, d: EventData - ) -> Result<()>; - fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool; + ) -> Result<()>; + fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool; fn add_policies( &mut self, - sec: &str, - ptype: &str, - rules: Vec<Vec<String>> - ) -> bool; - fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>; + sec: &str, + ptype: &str, + rules: Vec<Vec<String>> + ) -> bool; + fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>; fn get_filtered_policy( &self, - sec: &str, - ptype: &str, - field_index: usize, - field_values: Vec<String> - ) -> Vec<Vec<String>>; - fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool; + sec: &str, + ptype: &str, + field_index: usize, + field_values: Vec<String> + ) -> Vec<Vec<String>>; + fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool; fn get_values_for_field_in_policy( &self, - sec: &str, - ptype: &str, - field_index: usize - ) -> Vec<String>; + sec: &str, + ptype: &str, + field_index: usize + ) -> Vec<String>; fn remove_policy( &mut self, - sec: &str, - ptype: &str, - rule: Vec<String> - ) -> bool; + sec: &str, + ptype: &str, + rule: Vec<String> + ) -> bool; fn remove_policies( &mut self, - sec: &str, - ptype: &str, - rules: Vec<Vec<String>> - ) -> bool; + sec: &str, + ptype: &str, + rules: Vec<Vec<String>> + ) -> bool; fn clear_policy(&mut self); fn remove_filtered_policy( &mut self, - sec: &str, - ptype: &str, - field_index: usize, - field_values: Vec<String> - ) -> (bool, Vec<Vec<String>>); -
    }

    Required Methods§

    source

    fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool

    source

    fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>

    source

    fn get_mut_model( + sec: &str, + ptype: &str, + field_index: usize, + field_values: Vec<String> + ) -> (bool, Vec<Vec<String>>); +}

    Required Methods§

    source

    fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool

    source

    fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>

    source

    fn get_mut_model( &mut self -) -> &mut HashMap<String, LinkedHashMap<String, Assertion>>

    source

    fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source

    fn add_policies( +) -> Result<()>

    source

    fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source

    fn add_policies( &mut self, - sec: &str, - ptype: &str, - rules: Vec<Vec<String>> -) -> bool

    source

    fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>

    source

    fn get_filtered_policy( + sec: &str, + ptype: &str, + rules: Vec<Vec<String>> +) -> bool

    source

    fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>

    source

    fn get_filtered_policy( &self, - sec: &str, - ptype: &str, - field_index: usize, - field_values: Vec<String> -) -> Vec<Vec<String>>

    source

    fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source

    fn get_values_for_field_in_policy( + sec: &str, + ptype: &str, + field_index: usize, + field_values: Vec<String> +) -> Vec<Vec<String>>

    source

    fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source

    fn get_values_for_field_in_policy( &self, - sec: &str, - ptype: &str, - field_index: usize -) -> Vec<String>

    source

    fn remove_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source

    fn remove_policies( + sec: &str, + ptype: &str, + field_index: usize +) -> Vec<String>

    source

    fn remove_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool

    source

    fn remove_policies( &mut self, - sec: &str, - ptype: &str, - rules: Vec<Vec<String>> -) -> bool

    source

    fn clear_policy(&mut self)

    source

    fn remove_filtered_policy( + sec: &str, + ptype: &str, + rules: Vec<Vec<String>> +) -> bool

    source

    fn clear_policy(&mut self)

    source

    fn remove_filtered_policy( &mut self, - sec: &str, - ptype: &str, - field_index: usize, - field_values: Vec<String> -) -> (bool, Vec<Vec<String>>)

    Implementors§

    \ No newline at end of file + sec: &str, + ptype: &str, + field_index: usize, + field_values: Vec<String> +) -> (bool, Vec<Vec<String>>)

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.RbacApi.html b/casbin/trait.RbacApi.html index cd36c069..40f14fd7 100644 --- a/casbin/trait.RbacApi.html +++ b/casbin/trait.RbacApi.html @@ -1,27 +1,27 @@ -RbacApi in casbin - Rust

    Trait casbin::RbacApi

    source ·
    pub trait RbacApi: MgmtApi {
    +RbacApi in casbin - Rust

    Trait casbin::RbacApi

    source ·
    pub trait RbacApi: MgmtApi {
     
    Show 19 methods // Required methods fn add_permission_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permission: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + permission: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_permissions_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permissions: Vec<Vec<String>> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + permissions: Vec<Vec<String>> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, - user: &'life1 str, - role: &'life2 str, - domain: Option<&'life3 str> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + role: &'life2 str, + domain: Option<&'life3 str> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, @@ -29,20 +29,20 @@ 'life3: 'async_trait; fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - user: &'life1 str, - roles: Vec<String>, - domain: Option<&'life2 str> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + roles: Vec<String>, + domain: Option<&'life2 str> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, - user: &'life1 str, - role: &'life2 str, - domain: Option<&'life3 str> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + role: &'life2 str, + domain: Option<&'life3 str> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, @@ -50,198 +50,198 @@ 'life3: 'async_trait; fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - user: &'life1 str, - domain: Option<&'life2 str> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + domain: Option<&'life2 str> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn delete_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - name: &'life1 str - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + name: &'life1 str + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_role<'life0, 'life1, 'async_trait>( &'life0 mut self, - name: &'life1 str - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + name: &'life1 str + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_permission_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permission: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + user: &'life1 str, + permission: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_roles_for_user( &mut self, - name: &str, - domain: Option<&str> - ) -> Vec<String>; + name: &str, + domain: Option<&str> + ) -> Vec<String>; fn get_users_for_role( &self, - name: &str, - domain: Option<&str> - ) -> Vec<String>; + name: &str, + domain: Option<&str> + ) -> Vec<String>; fn has_role_for_user( &mut self, - name: &str, - role: &str, - domain: Option<&str> - ) -> bool; + name: &str, + role: &str, + domain: Option<&str> + ) -> bool; fn get_permissions_for_user( &self, - user: &str, - domain: Option<&str> - ) -> Vec<Vec<String>>; + user: &str, + domain: Option<&str> + ) -> Vec<Vec<String>>; fn has_permission_for_user( &self, - user: &str, - permission: Vec<String> - ) -> bool; + user: &str, + permission: Vec<String> + ) -> bool; fn get_implicit_roles_for_user( &mut self, - name: &str, - domain: Option<&str> - ) -> Vec<String>; + name: &str, + domain: Option<&str> + ) -> Vec<String>; fn get_implicit_permissions_for_user( &mut self, - name: &str, - domain: Option<&str> - ) -> Vec<Vec<String>>; + name: &str, + domain: Option<&str> + ) -> Vec<Vec<String>>; fn get_implicit_users_for_permission<'life0, 'async_trait>( &'life0 self, - permission: Vec<String> - ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>> + permission: Vec<String> + ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn delete_permission<'life0, 'async_trait>( &'life0 mut self, - permission: Vec<String> - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + permission: Vec<String> + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn delete_permissions_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str - ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> - where Self: Send + 'async_trait, + user: &'life1 str + ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> + where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } -
    }

    Required Methods§

    source

    fn add_permission_for_user<'life0, 'life1, 'async_trait>( +}

    Required Methods§

    source

    fn add_permission_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permission: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + permission: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn add_permissions_for_user<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn add_permissions_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permissions: Vec<Vec<String>> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + permissions: Vec<Vec<String>> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( + 'life1: 'async_trait,

    source

    fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, - user: &'life1 str, - role: &'life2 str, - domain: Option<&'life3 str> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + role: &'life2 str, + domain: Option<&'life3 str> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - 'life3: 'async_trait,

    source

    fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( + 'life3: 'async_trait,

    source

    fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - user: &'life1 str, - roles: Vec<String>, - domain: Option<&'life2 str> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + roles: Vec<String>, + domain: Option<&'life2 str> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( + 'life2: 'async_trait,

    source

    fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, - user: &'life1 str, - role: &'life2 str, - domain: Option<&'life3 str> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + role: &'life2 str, + domain: Option<&'life3 str> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, - 'life3: 'async_trait,

    source

    fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( + 'life3: 'async_trait,

    source

    fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, - user: &'life1 str, - domain: Option<&'life2 str> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + domain: Option<&'life2 str> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, - 'life2: 'async_trait,

    source

    fn delete_user<'life0, 'life1, 'async_trait>( + 'life2: 'async_trait,

    source

    fn delete_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - name: &'life1 str -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + name: &'life1 str +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn delete_role<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn delete_role<'life0, 'life1, 'async_trait>( &'life0 mut self, - name: &'life1 str -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + name: &'life1 str +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn delete_permission_for_user<'life0, 'life1, 'async_trait>( + 'life1: 'async_trait,

    source

    fn delete_permission_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str, - permission: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + user: &'life1 str, + permission: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    source

    fn get_roles_for_user( + 'life1: 'async_trait,

    source

    fn get_roles_for_user( &mut self, - name: &str, - domain: Option<&str> -) -> Vec<String>

    source

    fn get_users_for_role(&self, name: &str, domain: Option<&str>) -> Vec<String>

    source

    fn has_role_for_user( + name: &str, + domain: Option<&str> +) -> Vec<String>

    source

    fn get_users_for_role(&self, name: &str, domain: Option<&str>) -> Vec<String>

    source

    fn has_role_for_user( &mut self, - name: &str, - role: &str, - domain: Option<&str> -) -> bool

    source

    fn get_permissions_for_user( + name: &str, + role: &str, + domain: Option<&str> +) -> bool

    source

    fn get_permissions_for_user( &self, - user: &str, - domain: Option<&str> -) -> Vec<Vec<String>>

    source

    fn has_permission_for_user(&self, user: &str, permission: Vec<String>) -> bool

    source

    fn get_implicit_roles_for_user( + user: &str, + domain: Option<&str> +) -> Vec<Vec<String>>

    source

    fn has_permission_for_user(&self, user: &str, permission: Vec<String>) -> bool

    source

    fn get_implicit_roles_for_user( &mut self, - name: &str, - domain: Option<&str> -) -> Vec<String>

    source

    fn get_implicit_permissions_for_user( + name: &str, + domain: Option<&str> +) -> Vec<String>

    source

    fn get_implicit_permissions_for_user( &mut self, - name: &str, - domain: Option<&str> -) -> Vec<Vec<String>>

    source

    fn get_implicit_users_for_permission<'life0, 'async_trait>( + name: &str, + domain: Option<&str> +) -> Vec<Vec<String>>

    source

    fn get_implicit_users_for_permission<'life0, 'async_trait>( &'life0 self, - permission: Vec<String> -) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where + permission: Vec<String> +) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where Self: 'async_trait, - 'life0: 'async_trait,

    Provided Methods§

    source

    fn delete_permission<'life0, 'async_trait>( + 'life0: 'async_trait,

    Provided Methods§

    source

    fn delete_permission<'life0, 'async_trait>( &'life0 mut self, - permission: Vec<String> -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, - 'life0: 'async_trait,

    source

    fn delete_permissions_for_user<'life0, 'life1, 'async_trait>( + permission: Vec<String> +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, + 'life0: 'async_trait,

    source

    fn delete_permissions_for_user<'life0, 'life1, 'async_trait>( &'life0 mut self, - user: &'life1 str -) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where - Self: Send + 'async_trait, + user: &'life1 str +) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where + Self: Send + 'async_trait, 'life0: 'async_trait, - 'life1: 'async_trait,

    Implementors§

    source§

    impl<T> RbacApi for Twhere + 'life1: 'async_trait,

    Implementors§

    source§

    impl<T> RbacApi for Twhere T: MgmtApi,

    \ No newline at end of file diff --git a/casbin/trait.RoleManager.html b/casbin/trait.RoleManager.html index 5de4a752..df3c9020 100644 --- a/casbin/trait.RoleManager.html +++ b/casbin/trait.RoleManager.html @@ -1,28 +1,28 @@ -RoleManager in casbin - Rust

    Trait casbin::RoleManager

    source ·
    pub trait RoleManager: Send + Sync {
    +RoleManager in casbin - Rust

    Trait casbin::RoleManager

    source ·
    pub trait RoleManager: Send + Sync {
         // Required methods
         fn clear(&mut self);
    -    fn add_link(&mut self, name1: &str, name2: &str, domain: Option<&str>);
    +    fn add_link(&mut self, name1: &str, name2: &str, domain: Option<&str>);
         fn matching_fn(
             &mut self,
    -        role_matching_fn: Option<MatchingFn>,
    -        domain_matching_fn: Option<MatchingFn>
    +        role_matching_fn: Option<MatchingFn>,
    +        domain_matching_fn: Option<MatchingFn>
         );
         fn delete_link(
             &mut self,
    -        name1: &str,
    -        name2: &str,
    -        domain: Option<&str>
    -    ) -> Result<()>;
    -    fn has_link(&self, name1: &str, name2: &str, domain: Option<&str>) -> bool;
    -    fn get_roles(&self, name: &str, domain: Option<&str>) -> Vec<String>;
    -    fn get_users(&self, name: &str, domain: Option<&str>) -> Vec<String>;
    -}

    Required Methods§

    source

    fn clear(&mut self)

    source

    fn matching_fn( + name1: &str, + name2: &str, + domain: Option<&str> + ) -> Result<()>; + fn has_link(&self, name1: &str, name2: &str, domain: Option<&str>) -> bool; + fn get_roles(&self, name: &str, domain: Option<&str>) -> Vec<String>; + fn get_users(&self, name: &str, domain: Option<&str>) -> Vec<String>; +}

    Required Methods§

    source

    fn clear(&mut self)

    source

    fn matching_fn( &mut self, - role_matching_fn: Option<MatchingFn>, - domain_matching_fn: Option<MatchingFn> -)

    source

    fn get_roles(&self, name: &str, domain: Option<&str>) -> Vec<String>

    source

    fn get_users(&self, name: &str, domain: Option<&str>) -> Vec<String>

    Implementors§

    \ No newline at end of file + name1: &str, + name2: &str, + domain: Option<&str> +) -> Result<()>
    source

    fn get_roles(&self, name: &str, domain: Option<&str>) -> Vec<String>

    source

    fn get_users(&self, name: &str, domain: Option<&str>) -> Vec<String>

    Implementors§

    \ No newline at end of file diff --git a/casbin/trait.TryIntoAdapter.html b/casbin/trait.TryIntoAdapter.html index 33f4bcc2..0aed1557 100644 --- a/casbin/trait.TryIntoAdapter.html +++ b/casbin/trait.TryIntoAdapter.html @@ -1,21 +1,21 @@ -TryIntoAdapter in casbin - Rust
    pub trait TryIntoAdapter: Send + Sync {
    +TryIntoAdapter in casbin - Rust
    pub trait TryIntoAdapter: Send + Sync {
         // Required method
         fn try_into_adapter<'async_trait>(
             self
    -    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>
    +    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>
            where Self: 'async_trait;
    -}

    Required Methods§

    source

    fn try_into_adapter<'async_trait>( +}

    Required Methods§

    source

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where - Self: 'async_trait,

    Implementations on Foreign Types§

    source§

    impl TryIntoAdapter for ()

    source§

    fn try_into_adapter<'async_trait>( +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where + Self: 'async_trait,

    Implementations on Foreign Types§

    source§

    impl<T> TryIntoAdapter for Option<T>where + T: TryIntoAdapter,

    source§

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where - Self: 'async_trait,

    source§

    impl TryIntoAdapter for &'static str

    source§

    fn try_into_adapter<'async_trait>( +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where + Self: 'async_trait,

    source§

    impl TryIntoAdapter for &'static str

    source§

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where - Self: 'async_trait,

    source§

    impl<T> TryIntoAdapter for Option<T>where - T: TryIntoAdapter,

    source§

    fn try_into_adapter<'async_trait>( +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where + Self: 'async_trait,

    source§

    impl TryIntoAdapter for ()

    source§

    fn try_into_adapter<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where - Self: 'async_trait,

    Implementors§

    source§

    impl<T> TryIntoAdapter for Twhere +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>>> + Send + 'async_trait>>where + Self: 'async_trait,

    Implementors§

    source§

    impl<T> TryIntoAdapter for Twhere T: Adapter + 'static,

    \ No newline at end of file diff --git a/casbin/trait.TryIntoModel.html b/casbin/trait.TryIntoModel.html index 1171e0a1..3af578e5 100644 --- a/casbin/trait.TryIntoModel.html +++ b/casbin/trait.TryIntoModel.html @@ -1,18 +1,18 @@ -TryIntoModel in casbin - Rust

    Trait casbin::TryIntoModel

    source ·
    pub trait TryIntoModel: Send + Sync {
    +TryIntoModel in casbin - Rust

    Trait casbin::TryIntoModel

    source ·
    pub trait TryIntoModel: Send + Sync {
         // Required method
         fn try_into_model<'async_trait>(
             self
    -    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>
    +    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>
            where Self: 'async_trait;
    -}

    Required Methods§

    source

    fn try_into_model<'async_trait>( +}

    Required Methods§

    source

    fn try_into_model<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>where - Self: 'async_trait,

    Implementations on Foreign Types§

    source§

    impl TryIntoModel for &'static str

    source§

    fn try_into_model<'async_trait>( +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>where + Self: 'async_trait,

    Implementations on Foreign Types§

    source§

    impl<T> TryIntoModel for Option<T>where + T: TryIntoModel,

    source§

    fn try_into_model<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>where - Self: 'async_trait,

    source§

    impl<T> TryIntoModel for Option<T>where - T: TryIntoModel,

    source§

    fn try_into_model<'async_trait>( +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>where + Self: 'async_trait,

    source§

    impl TryIntoModel for &'static str

    source§

    fn try_into_model<'async_trait>( self -) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>where - Self: 'async_trait,

    Implementors§

    source§

    impl<T> TryIntoModel for Twhere +) -> Pin<Box<dyn Future<Output = Result<Box<dyn Model>>> + Send + 'async_trait>>where + Self: 'async_trait,

    Implementors§

    source§

    impl<T> TryIntoModel for Twhere T: Model + 'static,

    \ No newline at end of file diff --git a/casbin/type.MatchingFn.html b/casbin/type.MatchingFn.html index 7248d265..a984720c 100644 --- a/casbin/type.MatchingFn.html +++ b/casbin/type.MatchingFn.html @@ -1 +1 @@ -MatchingFn in casbin - Rust

    Type Definition casbin::MatchingFn

    source ·
    pub type MatchingFn = fn(_: &str, _: &str) -> bool;
    \ No newline at end of file +MatchingFn in casbin - Rust

    Type Alias casbin::MatchingFn

    source ·
    pub type MatchingFn = fn(_: &str, _: &str) -> bool;
    \ No newline at end of file diff --git a/casbin/type.Result.html b/casbin/type.Result.html index ff5e3a59..c3f8fdc4 100644 --- a/casbin/type.Result.html +++ b/casbin/type.Result.html @@ -1 +1,6 @@ -Result in casbin - Rust

    Type Definition casbin::Result

    source ·
    pub type Result<T> = Result<T, Error>;
    \ No newline at end of file +Result in casbin - Rust

    Type Alias casbin::Result

    source ·
    pub type Result<T> = Result<T, Error>;

    Aliased Type§

    enum Result<T> {
    +    Ok(T),
    +    Err(Error),
    +}

    Variants§

    §1.0.0

    Ok(T)

    Contains the success value

    +
    §1.0.0

    Err(Error)

    Contains the error value

    +
    \ No newline at end of file diff --git a/help.html b/help.html index 0f975955..f8d8cade 100644 --- a/help.html +++ b/help.html @@ -1 +1 @@ -Rustdoc help

    Rustdoc help

    Back
    \ No newline at end of file +Rustdoc help

    Rustdoc help

    Back
    \ No newline at end of file diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js index 94bf4455..fba15867 100644 --- a/implementors/core/clone/trait.Clone.js +++ b/implementors/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Clone for EffectKind"],["impl<'a> Clone for Filter<'a>"],["impl Clone for DefaultEffectStream"],["impl Clone for EventData"],["impl Clone for DefaultModel"],["impl Clone for Assertion"]] +"casbin":[["impl Clone for Assertion"],["impl<'a> Clone for Filter<'a>"],["impl Clone for DefaultModel"],["impl Clone for EventData"],["impl Clone for DefaultEffectStream"],["impl Clone for EffectKind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.Eq.js b/implementors/core/cmp/trait.Eq.js index f5e26899..35a1e6e2 100644 --- a/implementors/core/cmp/trait.Eq.js +++ b/implementors/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Eq for EffectKind"],["impl Eq for Event"]] +"casbin":[["impl Eq for EffectKind"],["impl Eq for Event"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.PartialEq.js b/implementors/core/cmp/trait.PartialEq.js index be169f5e..832dec04 100644 --- a/implementors/core/cmp/trait.PartialEq.js +++ b/implementors/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl PartialEq<EffectKind> for EffectKind"],["impl PartialEq<Event> for Event"]] +"casbin":[["impl PartialEq<Event> for Event"],["impl PartialEq<EffectKind> for EffectKind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.From.js b/implementors/core/convert/trait.From.js index c9de0279..037038fc 100644 --- a/implementors/core/convert/trait.From.js +++ b/implementors/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl From<Box<EvalAltResult, Global>> for Error"],["impl From<RbacError> for Error"],["impl From<ModelError> for Error"],["impl From<AdapterError> for Error"],["impl From<ParseError> for Error"],["impl From<PolicyError> for Error"],["impl From<RequestError> for Error"],["impl From<Error> for Error"]] +"casbin":[["impl From<ModelError> for Error"],["impl From<Box<EvalAltResult, Global>> for Error"],["impl From<AdapterError> for Error"],["impl From<RequestError> for Error"],["impl From<PolicyError> for Error"],["impl From<RbacError> for Error"],["impl From<Error> for Error"],["impl From<ParseError> for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/default/trait.Default.js b/implementors/core/default/trait.Default.js index 5b478dc6..038c0c75 100644 --- a/implementors/core/default/trait.Default.js +++ b/implementors/core/default/trait.Default.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Default for FunctionMap"],["impl Default for Assertion"],["impl Default for DefaultModel"],["impl Default for DefaultEffector"],["impl Default for MemoryAdapter"]] +"casbin":[["impl Default for DefaultModel"],["impl Default for MemoryAdapter"],["impl Default for Assertion"],["impl Default for DefaultEffector"],["impl Default for FunctionMap"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/error/trait.Error.js b/implementors/core/error/trait.Error.js index 272bf8d9..ccd96540 100644 --- a/implementors/core/error/trait.Error.js +++ b/implementors/core/error/trait.Error.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Error for PolicyError"],["impl Error for AdapterError"],["impl Error for ModelError"],["impl Error for RequestError"],["impl Error for RbacError"],["impl Error for Error"]] +"casbin":[["impl Error for PolicyError"],["impl Error for RbacError"],["impl Error for Error"],["impl Error for RequestError"],["impl Error for AdapterError"],["impl Error for ModelError"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index e06ef04b..dfa9b4cf 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Debug for Error"],["impl Debug for AdapterError"],["impl Debug for RequestError"],["impl Debug for ModelError"],["impl Debug for RbacError"],["impl Debug for PolicyError"]] +"casbin":[["impl Debug for ModelError"],["impl Debug for AdapterError"],["impl Debug for RequestError"],["impl Debug for Error"],["impl Debug for PolicyError"],["impl Debug for RbacError"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Display.js b/implementors/core/fmt/trait.Display.js index 9850ea31..f379121d 100644 --- a/implementors/core/fmt/trait.Display.js +++ b/implementors/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Display for ModelError"],["impl Display for RequestError"],["impl Display for RbacError"],["impl Display for Error"],["impl Display for EventData"],["impl Display for PolicyError"],["impl Display for AdapterError"]] +"casbin":[["impl Display for ModelError"],["impl Display for PolicyError"],["impl Display for RequestError"],["impl Display for RbacError"],["impl Display for EventData"],["impl Display for Error"],["impl Display for AdapterError"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/hash/trait.Hash.js b/implementors/core/hash/trait.Hash.js index 70dddd93..63e4951f 100644 --- a/implementors/core/hash/trait.Hash.js +++ b/implementors/core/hash/trait.Hash.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Hash for Event"]] +"casbin":[["impl Hash for Event"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Copy.js b/implementors/core/marker/trait.Copy.js index 582d9367..05c3a397 100644 --- a/implementors/core/marker/trait.Copy.js +++ b/implementors/core/marker/trait.Copy.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl Copy for EffectKind"]] +"casbin":[["impl Copy for EffectKind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js index 54126912..3e1a4855 100644 --- a/implementors/core/marker/trait.Freeze.js +++ b/implementors/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl<P> Freeze for FileAdapter<P>where\n P: Freeze,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Freeze for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Freeze for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Freeze for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Freeze for EffectKind",1,["casbin::effector::EffectKind"]],["impl Freeze for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Freeze for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Freeze for Event",1,["casbin::emitter::Event"]],["impl Freeze for EventData",1,["casbin::emitter::EventData"]],["impl Freeze for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Freeze for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Freeze for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Freeze for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Freeze for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Freeze for ModelError",1,["casbin::error::ModelError"]],["impl Freeze for RequestError",1,["casbin::error::RequestError"]],["impl Freeze for PolicyError",1,["casbin::error::PolicyError"]],["impl Freeze for RbacError",1,["casbin::error::RbacError"]],["impl Freeze for AdapterError",1,["casbin::error::AdapterError"]],["impl Freeze for Error",1,["casbin::error::Error"]]] +"casbin":[["impl<P> Freeze for FileAdapter<P>where\n P: Freeze,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Freeze for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Freeze for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Freeze for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Freeze for EffectKind",1,["casbin::effector::EffectKind"]],["impl Freeze for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Freeze for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Freeze for Event",1,["casbin::emitter::Event"]],["impl Freeze for EventData",1,["casbin::emitter::EventData"]],["impl Freeze for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Freeze for EnforceContext",1,["casbin::enforcer::EnforceContext"]],["impl Freeze for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Freeze for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Freeze for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Freeze for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Freeze for ModelError",1,["casbin::error::ModelError"]],["impl Freeze for RequestError",1,["casbin::error::RequestError"]],["impl Freeze for PolicyError",1,["casbin::error::PolicyError"]],["impl Freeze for RbacError",1,["casbin::error::RbacError"]],["impl Freeze for AdapterError",1,["casbin::error::AdapterError"]],["impl Freeze for Error",1,["casbin::error::Error"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js index 01f964e0..23c776ce 100644 --- a/implementors/core/marker/trait.Send.js +++ b/implementors/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl<P> Send for FileAdapter<P>where\n P: Send,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Send for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Send for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Send for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Send for EffectKind",1,["casbin::effector::EffectKind"]],["impl Send for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Send for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Send for Event",1,["casbin::emitter::Event"]],["impl Send for EventData",1,["casbin::emitter::EventData"]],["impl Send for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Send for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Send for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Send for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Send for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Send for ModelError",1,["casbin::error::ModelError"]],["impl Send for RequestError",1,["casbin::error::RequestError"]],["impl Send for PolicyError",1,["casbin::error::PolicyError"]],["impl Send for RbacError",1,["casbin::error::RbacError"]],["impl Send for AdapterError",1,["casbin::error::AdapterError"]],["impl Send for Error",1,["casbin::error::Error"]]] +"casbin":[["impl<P> Send for FileAdapter<P>where\n P: Send,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Send for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Send for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Send for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Send for EffectKind",1,["casbin::effector::EffectKind"]],["impl Send for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Send for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Send for Event",1,["casbin::emitter::Event"]],["impl Send for EventData",1,["casbin::emitter::EventData"]],["impl Send for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Send for EnforceContext",1,["casbin::enforcer::EnforceContext"]],["impl Send for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Send for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Send for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Send for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Send for ModelError",1,["casbin::error::ModelError"]],["impl Send for RequestError",1,["casbin::error::RequestError"]],["impl Send for PolicyError",1,["casbin::error::PolicyError"]],["impl Send for RbacError",1,["casbin::error::RbacError"]],["impl Send for AdapterError",1,["casbin::error::AdapterError"]],["impl Send for Error",1,["casbin::error::Error"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralEq.js b/implementors/core/marker/trait.StructuralEq.js index 36210fc6..134026e7 100644 --- a/implementors/core/marker/trait.StructuralEq.js +++ b/implementors/core/marker/trait.StructuralEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl StructuralEq for Event"],["impl StructuralEq for EffectKind"]] +"casbin":[["impl StructuralEq for Event"],["impl StructuralEq for EffectKind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralPartialEq.js b/implementors/core/marker/trait.StructuralPartialEq.js index 2e688a6a..ad1ee785 100644 --- a/implementors/core/marker/trait.StructuralPartialEq.js +++ b/implementors/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl StructuralPartialEq for EffectKind"],["impl StructuralPartialEq for Event"]] +"casbin":[["impl StructuralPartialEq for Event"],["impl StructuralPartialEq for EffectKind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js index dec2f12e..903c35d1 100644 --- a/implementors/core/marker/trait.Sync.js +++ b/implementors/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl<P> Sync for FileAdapter<P>where\n P: Sync,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Sync for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Sync for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Sync for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Sync for EffectKind",1,["casbin::effector::EffectKind"]],["impl Sync for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Sync for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Sync for Event",1,["casbin::emitter::Event"]],["impl Sync for EventData",1,["casbin::emitter::EventData"]],["impl Sync for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Sync for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Sync for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Sync for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Sync for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Sync for ModelError",1,["casbin::error::ModelError"]],["impl Sync for RequestError",1,["casbin::error::RequestError"]],["impl Sync for PolicyError",1,["casbin::error::PolicyError"]],["impl Sync for RbacError",1,["casbin::error::RbacError"]],["impl Sync for AdapterError",1,["casbin::error::AdapterError"]],["impl Sync for Error",1,["casbin::error::Error"]]] +"casbin":[["impl<P> Sync for FileAdapter<P>where\n P: Sync,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Sync for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Sync for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Sync for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Sync for EffectKind",1,["casbin::effector::EffectKind"]],["impl Sync for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Sync for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Sync for Event",1,["casbin::emitter::Event"]],["impl Sync for EventData",1,["casbin::emitter::EventData"]],["impl Sync for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Sync for EnforceContext",1,["casbin::enforcer::EnforceContext"]],["impl Sync for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Sync for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Sync for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Sync for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Sync for ModelError",1,["casbin::error::ModelError"]],["impl Sync for RequestError",1,["casbin::error::RequestError"]],["impl Sync for PolicyError",1,["casbin::error::PolicyError"]],["impl Sync for RbacError",1,["casbin::error::RbacError"]],["impl Sync for AdapterError",1,["casbin::error::AdapterError"]],["impl Sync for Error",1,["casbin::error::Error"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js index 10d07dba..69617c53 100644 --- a/implementors/core/marker/trait.Unpin.js +++ b/implementors/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl<P> Unpin for FileAdapter<P>where\n P: Unpin,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Unpin for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Unpin for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Unpin for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Unpin for EffectKind",1,["casbin::effector::EffectKind"]],["impl Unpin for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Unpin for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Unpin for Event",1,["casbin::emitter::Event"]],["impl Unpin for EventData",1,["casbin::emitter::EventData"]],["impl Unpin for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Unpin for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Unpin for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Unpin for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Unpin for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Unpin for ModelError",1,["casbin::error::ModelError"]],["impl Unpin for RequestError",1,["casbin::error::RequestError"]],["impl Unpin for PolicyError",1,["casbin::error::PolicyError"]],["impl Unpin for RbacError",1,["casbin::error::RbacError"]],["impl Unpin for AdapterError",1,["casbin::error::AdapterError"]],["impl Unpin for Error",1,["casbin::error::Error"]]] +"casbin":[["impl<P> Unpin for FileAdapter<P>where\n P: Unpin,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl Unpin for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl Unpin for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> Unpin for Filter<'a>",1,["casbin::adapter::Filter"]],["impl Unpin for EffectKind",1,["casbin::effector::EffectKind"]],["impl Unpin for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl Unpin for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl Unpin for Event",1,["casbin::emitter::Event"]],["impl Unpin for EventData",1,["casbin::emitter::EventData"]],["impl Unpin for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl Unpin for EnforceContext",1,["casbin::enforcer::EnforceContext"]],["impl Unpin for Assertion",1,["casbin::model::assertion::Assertion"]],["impl Unpin for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl Unpin for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl Unpin for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl Unpin for ModelError",1,["casbin::error::ModelError"]],["impl Unpin for RequestError",1,["casbin::error::RequestError"]],["impl Unpin for PolicyError",1,["casbin::error::PolicyError"]],["impl Unpin for RbacError",1,["casbin::error::RbacError"]],["impl Unpin for AdapterError",1,["casbin::error::AdapterError"]],["impl Unpin for Error",1,["casbin::error::Error"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js index bdc269a4..4f063954 100644 --- a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl<P> RefUnwindSafe for FileAdapter<P>where\n P: RefUnwindSafe,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl RefUnwindSafe for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl RefUnwindSafe for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> RefUnwindSafe for Filter<'a>",1,["casbin::adapter::Filter"]],["impl RefUnwindSafe for EffectKind",1,["casbin::effector::EffectKind"]],["impl RefUnwindSafe for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl RefUnwindSafe for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl RefUnwindSafe for Event",1,["casbin::emitter::Event"]],["impl RefUnwindSafe for EventData",1,["casbin::emitter::EventData"]],["impl !RefUnwindSafe for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl !RefUnwindSafe for Assertion",1,["casbin::model::assertion::Assertion"]],["impl !RefUnwindSafe for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl RefUnwindSafe for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl RefUnwindSafe for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl RefUnwindSafe for ModelError",1,["casbin::error::ModelError"]],["impl RefUnwindSafe for RequestError",1,["casbin::error::RequestError"]],["impl RefUnwindSafe for PolicyError",1,["casbin::error::PolicyError"]],["impl RefUnwindSafe for RbacError",1,["casbin::error::RbacError"]],["impl !RefUnwindSafe for AdapterError",1,["casbin::error::AdapterError"]],["impl !RefUnwindSafe for Error",1,["casbin::error::Error"]]] +"casbin":[["impl<P> RefUnwindSafe for FileAdapter<P>where\n P: RefUnwindSafe,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl RefUnwindSafe for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl RefUnwindSafe for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> RefUnwindSafe for Filter<'a>",1,["casbin::adapter::Filter"]],["impl RefUnwindSafe for EffectKind",1,["casbin::effector::EffectKind"]],["impl RefUnwindSafe for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl RefUnwindSafe for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl RefUnwindSafe for Event",1,["casbin::emitter::Event"]],["impl RefUnwindSafe for EventData",1,["casbin::emitter::EventData"]],["impl !RefUnwindSafe for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl RefUnwindSafe for EnforceContext",1,["casbin::enforcer::EnforceContext"]],["impl !RefUnwindSafe for Assertion",1,["casbin::model::assertion::Assertion"]],["impl !RefUnwindSafe for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl RefUnwindSafe for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl RefUnwindSafe for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl RefUnwindSafe for ModelError",1,["casbin::error::ModelError"]],["impl RefUnwindSafe for RequestError",1,["casbin::error::RequestError"]],["impl RefUnwindSafe for PolicyError",1,["casbin::error::PolicyError"]],["impl RefUnwindSafe for RbacError",1,["casbin::error::RbacError"]],["impl !RefUnwindSafe for AdapterError",1,["casbin::error::AdapterError"]],["impl !RefUnwindSafe for Error",1,["casbin::error::Error"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js index 62c6f8a0..0cfe3f5a 100644 --- a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"casbin":[["impl<P> UnwindSafe for FileAdapter<P>where\n P: UnwindSafe,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl UnwindSafe for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl UnwindSafe for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> UnwindSafe for Filter<'a>",1,["casbin::adapter::Filter"]],["impl UnwindSafe for EffectKind",1,["casbin::effector::EffectKind"]],["impl UnwindSafe for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl UnwindSafe for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl UnwindSafe for Event",1,["casbin::emitter::Event"]],["impl UnwindSafe for EventData",1,["casbin::emitter::EventData"]],["impl !UnwindSafe for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl !UnwindSafe for Assertion",1,["casbin::model::assertion::Assertion"]],["impl !UnwindSafe for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl UnwindSafe for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl UnwindSafe for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl UnwindSafe for ModelError",1,["casbin::error::ModelError"]],["impl UnwindSafe for RequestError",1,["casbin::error::RequestError"]],["impl UnwindSafe for PolicyError",1,["casbin::error::PolicyError"]],["impl UnwindSafe for RbacError",1,["casbin::error::RbacError"]],["impl !UnwindSafe for AdapterError",1,["casbin::error::AdapterError"]],["impl !UnwindSafe for Error",1,["casbin::error::Error"]]] +"casbin":[["impl<P> UnwindSafe for FileAdapter<P>where\n P: UnwindSafe,",1,["casbin::adapter::file_adapter::FileAdapter"]],["impl UnwindSafe for MemoryAdapter",1,["casbin::adapter::memory_adapter::MemoryAdapter"]],["impl UnwindSafe for NullAdapter",1,["casbin::adapter::null_adapter::NullAdapter"]],["impl<'a> UnwindSafe for Filter<'a>",1,["casbin::adapter::Filter"]],["impl UnwindSafe for EffectKind",1,["casbin::effector::EffectKind"]],["impl UnwindSafe for DefaultEffectStream",1,["casbin::effector::DefaultEffectStream"]],["impl UnwindSafe for DefaultEffector",1,["casbin::effector::DefaultEffector"]],["impl UnwindSafe for Event",1,["casbin::emitter::Event"]],["impl UnwindSafe for EventData",1,["casbin::emitter::EventData"]],["impl !UnwindSafe for Enforcer",1,["casbin::enforcer::Enforcer"]],["impl UnwindSafe for EnforceContext",1,["casbin::enforcer::EnforceContext"]],["impl !UnwindSafe for Assertion",1,["casbin::model::assertion::Assertion"]],["impl !UnwindSafe for DefaultModel",1,["casbin::model::default_model::DefaultModel"]],["impl UnwindSafe for FunctionMap",1,["casbin::model::function_map::FunctionMap"]],["impl UnwindSafe for DefaultRoleManager",1,["casbin::rbac::default_role_manager::DefaultRoleManager"]],["impl UnwindSafe for ModelError",1,["casbin::error::ModelError"]],["impl UnwindSafe for RequestError",1,["casbin::error::RequestError"]],["impl UnwindSafe for PolicyError",1,["casbin::error::PolicyError"]],["impl UnwindSafe for RbacError",1,["casbin::error::RbacError"]],["impl !UnwindSafe for AdapterError",1,["casbin::error::AdapterError"]],["impl !UnwindSafe for Error",1,["casbin::error::Error"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/search-index.js b/search-index.js index 6cbd9d0b..c3465c7e 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"casbin":{"doc":"","t":"INNNDNNNIDDDDNEIIIDCEEIIDDINIGDIIDNINNNGINIIKLKLLLLLKLKLKLKLKLKLKLKKLLLLLLKLKKLLLLLLKLKLKLLLLLLLLLLLLLLLLLLLLLLLLLLLKKLLLKKLLLKKLKKKLLLLLLLLLLLLLLLLLLLLLKLLLKLLLKLKLKLKLKLKLKLKLKLKLLLLLLLLLALLLLLLLLLLLLLLLLAMKLLLKLKLKLKLKLLLKLLLLLLLKLKLKLLLLLLKLKLKLKKLLKLKKLLLKLKLOKLKLLLLKLKLKLKLKLKLKLKLKLLLKLKLKLKLLLKLLLLLLLLLLLLLLLKLKKLLLLMKKLLLLKKLLLLKLKLLLKLKLKLKLKLMMAKLOOLLKLKLKKLLLLLLKLLLLLKLKLKLKLKKLLLLLLKLKKLLLLLLKLAMKKLLLLKLKLKLKLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLKLKLLLLLLLLLLLLLMDNNENNENNNNENNENENNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLFFFFLLLCCCCCCCCCCCCCCCCCCDGNNNGINNNDDNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEDNNDSENNNNNEDNINSGDNDNENDNNSNNNNNNNNGNNNDNSSSDSRRGDEDNNNINNSDDNSSSSSDSNNNNDNNNNNNNNNSLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOLLLLLALLLLLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLFLLXXOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLMLLLLLLLLLLLLLLLLLLLAKKLLLLLLALLLLLLLLLLLLLLLLLLLOLLFFLLLALLLLLLLOOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLADLLLLLLFLLLLLFLLLDDDDDDDDDDDDDDIDKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLEDDNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEEENDNNNNDDNIDNNNSNGDLLLLLLLLLLLLLLLLKLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLXXOLLLLLLLLLLLLLLLLLLLKLLLLLLLLLKLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOLLLLLLLLLLLLLLLLLLLLMMMMMMMMSDIDSDTSSSLFFFMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLFFLLLLLLLLLLLLLLLLLFFLLLLLLLLLLLLLMFFFLLOLFMFFFLLLLLLLFFLLLLLFFLLLLLLLLLLLLLLLFMFLLLFLDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLL","n":["Adapter","AddPolicies","AddPolicy","Allow","Assertion","ClearCache","ClearCache","ClearPolicy","CoreApi","DefaultEffectStream","DefaultEffector","DefaultModel","DefaultRoleManager","Deny","EffectKind","Effector","EffectorStream","EnforceArgs","Enforcer","Error","Event","EventData","EventEmitter","EventKey","FileAdapter","Filter","IEnforcer","Indeterminate","InternalApi","MatchingFn","MemoryAdapter","MgmtApi","Model","NullAdapter","PolicyChange","RbacApi","RemoveFilteredPolicy","RemovePolicies","RemovePolicy","Result","RoleManager","SavePolicy","TryIntoAdapter","TryIntoModel","add_def","add_def","add_function","add_function","add_grouping_policies","add_grouping_policies","add_grouping_policy","add_grouping_policy","add_link","add_link","add_named_grouping_policies","add_named_grouping_policies","add_named_grouping_policy","add_named_grouping_policy","add_named_policies","add_named_policies","add_named_policy","add_named_policy","add_permission_for_user","add_permission_for_user","add_permissions_for_user","add_permissions_for_user","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies_internal","add_policies_internal","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy_internal","add_policy_internal","add_role_for_user","add_role_for_user","add_roles_for_user","add_roles_for_user","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build_incremental_role_links","build_incremental_role_links","build_incremental_role_links","build_incremental_role_links","build_incremental_role_links","build_role_links","build_role_links","build_role_links","build_role_links","build_role_links","cache_key","clear","clear","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","default","delete_link","delete_link","delete_permission","delete_permission","delete_permission_for_user","delete_permission_for_user","delete_permissions_for_user","delete_permissions_for_user","delete_role","delete_role","delete_role_for_user","delete_role_for_user","delete_roles_for_user","delete_roles_for_user","delete_user","delete_user","emit","emit","enable_auto_build_role_links","enable_auto_build_role_links","enable_auto_save","enable_auto_save","enable_enforce","enable_enforce","enforce","enforce","enforce_mut","enforce_mut","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","error","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from_file","from_str","function_map","g","get_adapter","get_adapter","get_all_actions","get_all_actions","get_all_grouping_policy","get_all_grouping_policy","get_all_named_actions","get_all_named_actions","get_all_named_objects","get_all_named_objects","get_all_named_roles","get_all_named_roles","get_all_named_subjects","get_all_named_subjects","get_all_objects","get_all_objects","get_all_policy","get_all_policy","get_all_roles","get_all_roles","get_all_subjects","get_all_subjects","get_filtered_grouping_policy","get_filtered_grouping_policy","get_filtered_named_grouping_policy","get_filtered_named_grouping_policy","get_filtered_named_policy","get_filtered_named_policy","get_filtered_policy","get_filtered_policy","get_filtered_policy","get_filtered_policy","get_grouping_policy","get_grouping_policy","get_hash","get_implicit_permissions_for_user","get_implicit_permissions_for_user","get_implicit_roles_for_user","get_implicit_roles_for_user","get_implicit_users_for_permission","get_implicit_users_for_permission","get_model","get_model","get_model","get_model","get_mut_adapter","get_mut_adapter","get_mut_model","get_mut_model","get_mut_model","get_mut_model","get_mut_policy","get_named_grouping_policy","get_named_grouping_policy","get_named_policy","get_named_policy","get_or_err","get_permissions_for_user","get_permissions_for_user","get_policy","get_policy","get_policy","get_policy","get_policy","get_role_manager","get_role_manager","get_roles","get_roles","get_roles_for_user","get_roles_for_user","get_users","get_users","get_users_for_role","get_users_for_role","get_values_for_field_in_policy","get_values_for_field_in_policy","has_auto_build_role_links_enabled","has_auto_build_role_links_enabled","has_auto_save_enabled","has_auto_save_enabled","has_grouping_named_policy","has_grouping_named_policy","has_grouping_policy","has_grouping_policy","has_link","has_link","has_named_policy","has_named_policy","has_permission_for_user","has_permission_for_user","has_policy","has_policy","has_policy","has_policy","has_role_for_user","has_role_for_user","hash","into","into","into","into","into","into","into","into","into","into","into","into","into","is_enabled","is_enabled","is_filtered","is_filtered","is_filtered","is_filtered","is_filtered","is_filtered","key","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_policy","load_policy","load_policy","load_policy","load_policy","load_policy","matching_fn","matching_fn","new","new","new","new","new_raw","new_raw","new_stream","new_stream","next","next","off","off","on","on","p","policy","prelude","push_effect","push_effect","push_index_if_explain","register_g_function","remove_filtered_grouping_policy","remove_filtered_grouping_policy","remove_filtered_named_grouping_policy","remove_filtered_named_grouping_policy","remove_filtered_named_policy","remove_filtered_named_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy_internal","remove_filtered_policy_internal","remove_grouping_policies","remove_grouping_policies","remove_grouping_policy","remove_grouping_policy","remove_named_grouping_policies","remove_named_grouping_policies","remove_named_grouping_policy","remove_named_grouping_policy","remove_named_policies","remove_named_policies","remove_named_policy","remove_named_policy","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies_internal","remove_policies_internal","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy_internal","remove_policy_internal","rhai","rm","save_policy","save_policy","save_policy","save_policy","save_policy","save_policy","set_adapter","set_adapter","set_effector","set_effector","set_model","set_model","set_role_manager","set_role_manager","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","tokens","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_adapter","try_into_adapter","try_into_adapter","try_into_adapter","try_into_model","try_into_model","try_into_vec","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value","AdapterError","AdapterError","E","Error","IoError","M","ModelError","ModelError","NotFound","Other","P","PolicyError","PolicyError","R","RbacError","RbacError","RequestError","RequestError","RhaiError","RhaiParseError","UnmatchPolicyDefinition","UnmatchRequestDefinition","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","provide","provide","provide","provide","provide","provide","source","to_string","to_string","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FunctionMap","add_function","borrow","borrow_mut","default","from","get_functions","into","key_match","key_match2","key_match3","regex_match","try_from","try_into","type_id","CoreApi","DefaultModel","Enforcer","Event","EventData","EventEmitter","FileAdapter","Filter","IEnforcer","InternalApi","MemoryAdapter","MgmtApi","Model","NullAdapter","RbacApi","Result","TryIntoAdapter","TryIntoModel","AST","Array","AssignmentToConstant","AssignmentToInvalidLHS","BadInput","Blob","CustomType","DuplicatedProperty","DuplicatedSwitchCase","DuplicatedVariable","Dynamic","Engine","ErrorArithmetic","ErrorArrayBounds","ErrorAssignmentToConstant","ErrorBitFieldBounds","ErrorCustomSyntax","ErrorDataRace","ErrorDataTooLarge","ErrorDotExpr","ErrorFor","ErrorForbiddenVariable","ErrorFunctionNotFound","ErrorInFunctionCall","ErrorInModule","ErrorIndexNotFound","ErrorIndexingType","ErrorMismatchDataType","ErrorMismatchOutputType","ErrorModuleNotFound","ErrorNonPureMethodCallOnConstant","ErrorParsing","ErrorPropertyNotFound","ErrorRuntime","ErrorStackOverflow","ErrorStringBounds","ErrorSystem","ErrorTerminated","ErrorTooManyModules","ErrorTooManyOperations","ErrorUnboundThis","ErrorVariableExists","ErrorVariableNotFound","EvalAltResult","EvalContext","ExprExpected","ExprTooDeep","Expression","FALSE","FnAccess","FnDuplicatedDefinition","FnDuplicatedParam","FnMissingBody","FnMissingName","FnMissingParams","FnNamespace","FnPtr","ForbiddenVariable","FuncArgs","Global","HUNDRED","INT","ImmutableString","ImproperSymbol","Instant","Internal","LexError","LiteralTooLarge","Locked","LoopBreak","LoopBreak","MILLION","MalformedCallExpr","MalformedCapture","MalformedChar","MalformedEscapeSequence","MalformedIdentifier","MalformedInExpr","MalformedIndexExpr","MalformedNumber","Map","MismatchedType","MissingSymbol","MissingToken","Module","ModuleUndefined","NEGATIVE_ONE","NEGATIVE_TWO","NONE","NativeCallContext","ONE","OP_CONTAINS","OP_EQUALS","OptimizationLevel","ParseError","ParseErrorType","Position","Private","PropertyExpected","Public","RegisterNativeFunction","Reserved","Return","START","Scope","Shared","StringTooLong","TEN","THOUSAND","THREE","TRUE","TWO","TypeBuilder","UNIT","UnexpectedEOF","UnexpectedInput","UnknownOperator","UnterminatedString","VarDefInfo","VariableExists","VariableExpected","VariableUndefined","WrongDocComment","WrongExport","WrongFnDefinition","WrongSwitchCaseCondition","WrongSwitchDefaultCase","WrongSwitchIntegerCase","ZERO","add","add","add","add","add","add","add","add","add","add","add","add","add","add","add","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_curry","as_bool","as_char","as_fd","as_immutable_string","as_int","as_ptr","as_raw_fd","as_ref","as_ref","as_ref","as_ref","as_ref","as_string","as_unit","assume_init","assume_init","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build_index","call","call_dynamic","call_fn","call_fn_dynamic_raw","call_fn_raw","call_level","call_level","call_native_fn","call_native_fn_raw","call_raw","call_within_context","cast","cause","checked_add","checked_duration_since","checked_sub","clear","clear","clear_id","clear_poison","clear_position","clear_source","clear_statements","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_cast","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_statements_only","clone_visible","cmp","cmp","cmp","cmp","cmp","combine","combine","combine_flatten","combine_with_exported_module","compare","compare","compare","compare","compare","config","contains","contains_fn","contains_indexed_global_functions","contains_iter","contains_qualified_fn","contains_qualified_iter","contains_sub_module","contains_var","count","curry","decrement_strong_count","deep_scan","def_package","default","default","default","default","default","default","default","default","deref","deref","deref","description","deserialize","deserialize","deserialize","deserialize","downcast","downcast_unchecked","downgrade","drop","drop","duration_since","elapsed","empty","engine","engine","eq","eq","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","err_type","eval","eval_expression_tree","eval_expression_tree_raw","eval_file","eval_with_context","eval_with_context_raw","export_fn","export_module","exported_module","extend","extend","extend","fill_with","flatten","flatten_clone","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fn_name","fn_name","format_map_as_json","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_array","from_blob","from_bool","from_char","from_int","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_map","from_raw","from_str","from_str","from_timestamp","ge","get","get_custom_type","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_literal_value","get_mut","get_mut","get_mut","get_mut_unchecked","get_string_value","get_sub_module","get_value","get_var","get_var_value","get_variable_name","gt","has_context","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","id","increment_strong_count","index","index_mut","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_array","into_blob","into_callable_function","into_deserializer","into_err","into_immutable_string","into_inner","into_inner","into_iter","into_iter","into_owned","into_raw","into_read_only","into_string","into_typed_array","is","is_array","is_beginning_of_line","is_blob","is_bool","is_catchable","is_char","is_const","is_constant","is_curried","is_empty","is_empty","is_global_namespace","is_indexed","is_int","is_iterable","is_map","is_module_namespace","is_none","is_poisoned","is_pseudo_error","is_read_only","is_string","is_system_exception","is_timestamp","is_unit","is_variant","iter","iter_curry","iter_curry_mut","iter_literal_variables","iter_raw","iter_sub_modules","iter_var","le","len","line","lt","make_mut","merge","merge","name","ne","nesting_level","new","new","new","new","new","new","new","new","new","new_const","new_cyclic","new_uninit","new_uninit_slice","new_zeroed","new_zeroed_slice","now","num_curried","num_params","or_else","packages","param_types","parse","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","pin","plugin","pop","position","position","position","position","position","provide","provide","provide","provide","provide","ptr_eq","ptr_eq","push","push_constant","push_constant_dynamic","push_dynamic","read","read_lock","register_exported_fn","remove","rewind","run","run_file","saturating_duration_since","scope","scope_mut","serde","serialize","serialize","serialize","serialize","set_curry","set_custom_type","set_custom_type_raw","set_exported_fn","set_exported_global_fn","set_fn","set_getter_fn","set_getter_setter_fn","set_id","set_indexer_get_fn","set_indexer_get_set_fn","set_indexer_set_fn","set_iter","set_iter_result","set_iterable","set_iterable_result","set_iterator","set_iterator_result","set_native_fn","set_or_push","set_position","set_raw_fn","set_setter_fn","set_source","set_sub_module","set_tag","set_value","set_var","source","source","source","source","strong_count","sub","sub","sub","sub","sub","sub","sub","sub","sub","sub","sub_assign","sub_assign","sub_assign","sub_assign","sub_assign","sub_assign","tag","tag","tag","tag_mut","take","take_position","this_ptr","this_ptr_mut","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","try_cast","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_new","try_new_uninit","try_new_zeroed","try_pin","try_read","try_unwrap","try_write","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_name","unwrap_inner","unwrap_or_clone","update_fn_namespace","weak_count","will_shadow","with_capacity","with_capacity","with_fn","with_get","with_get_result","with_get_set","with_indexer_get","with_indexer_get_result","with_indexer_get_set","with_indexer_set","with_indexer_set_result","with_name","with_result_fn","with_set","with_set_result","write","write_lock","hashing","SusLock","borrow","borrow_mut","default","drop","from","get","get_ahash_seed","get_or_init","init","into","is_initialized","new","set_ahash_seed","try_from","try_into","type_id","ArithmeticPackage","BasicArrayPackage","BasicBlobPackage","BasicFnPackage","BasicIteratorPackage","BasicMapPackage","BasicMathPackage","BasicStringPackage","BasicTimePackage","BitFieldPackage","CorePackage","LanguageCorePackage","LogicPackage","MoreStringPackage","Package","StandardPackage","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","register_into_engine","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","CallableFunction","Dynamic","Engine","ErrorArithmetic","ErrorArrayBounds","ErrorAssignmentToConstant","ErrorBitFieldBounds","ErrorCustomSyntax","ErrorDataRace","ErrorDataTooLarge","ErrorDotExpr","ErrorFor","ErrorForbiddenVariable","ErrorFunctionNotFound","ErrorInFunctionCall","ErrorInModule","ErrorIndexNotFound","ErrorIndexingType","ErrorMismatchDataType","ErrorMismatchOutputType","ErrorModuleNotFound","ErrorNonPureMethodCallOnConstant","ErrorParsing","ErrorPropertyNotFound","ErrorRuntime","ErrorStackOverflow","ErrorStringBounds","ErrorSystem","ErrorTerminated","ErrorTooManyModules","ErrorTooManyOperations","ErrorUnboundThis","ErrorVariableExists","ErrorVariableNotFound","EvalAltResult","FnAccess","FnNamespace","Global","ImmutableString","Internal","Iterator","LoopBreak","Method","Module","NativeCallContext","Plugin","PluginFunction","Position","Private","Public","Pure","RAW","Return","RhaiResult","TypeId","access","allow_if_expression","allow_loop_expressions","allow_looping","allow_shadowing","allow_statement_expression","allow_switch_expression","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build_type","call","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","combine_with_exported_module","compact_script","compare","compare","compile","compile_expression","compile_expression_with_scope","compile_file","compile_file_with_scope","compile_scripts_with_scope","compile_with_scope","const_empty_string","consume","consume_ast","consume_ast_with_scope","consume_file","consume_file_with_scope","consume_with_scope","default","default_tag","default_tag_mut","disable_symbol","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","eval","eval_ast","eval_ast_with_scope","eval_expression","eval_expression_with_scope","eval_file","eval_file_with_scope","eval_with_scope","export_fn","export_module","exported_module","fail_on_invalid_map_property","fast_operators","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","get_encapsulated_environ","get_hash","get_hash","get_iter_fn","get_native_fn","get_plugin_fn","has_context","has_context","hash","hash","into","into","into","into","is_iter","is_method","is_method_call","is_native","is_plugin_fn","is_private","is_public","is_pure","is_pure","is_script","is_symbol_disabled","map_type_name","max_array_size","max_call_levels","max_expr_depth","max_function_expr_depth","max_map_size","max_modules","max_operations","max_string_size","mem","new","new_raw","of","on_debug","on_def_var","on_print","on_var","parse_json","partial_cmp","partial_cmp","register_custom_operator","register_custom_syntax","register_custom_syntax_raw","register_custom_syntax_with_state_raw","register_exported_fn","register_fn","register_get","register_get_result","register_get_set","register_global_module","register_indexer_get","register_indexer_get_result","register_indexer_get_set","register_indexer_set","register_indexer_set_result","register_iterator","register_iterator_result","register_raw_fn","register_result_fn","register_set","register_set_result","register_type","register_type_with_name","register_type_with_name_raw","run","run_ast","run_ast_with_scope","run_file","run_file_with_scope","run_with_scope","set_allow_if_expression","set_allow_loop_expressions","set_allow_looping","set_allow_shadowing","set_allow_statement_expression","set_allow_switch_expression","set_default_tag","set_exported_fn","set_exported_global_fn","set_fail_on_invalid_map_property","set_fast_operators","set_strict_variables","strict_variables","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","func","func","func","func","has_context","has_context","is_pure","is_pure","ALIGNMENT","Assume","BikeshedIntrinsicFrom","Discriminant","LIFETIMES","ManuallyDrop","MaybeUninit","NOTHING","SAFETY","VALIDITY","add","align_of","align_of_val","align_of_val_raw","alignment","and","array_assume_init","as_bytes","as_bytes_mut","as_mut_ptr","as_ptr","assume_init","assume_init_drop","assume_init_mut","assume_init_read","assume_init_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","but_not","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","cmp","compare","copy","default","deref","deref_mut","discriminant","drop","drop","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","forget","forget_unsized","from","from","from","from","get_hash","get_hash","hash","hash","into","into","into","into","into_inner","lifetimes","min_align_of","min_align_of_val","needs_drop","new","new","offset_of","partial_cmp","replace","safety","size_of","size_of_val","size_of_val_raw","slice_as_bytes","slice_as_bytes_mut","slice_as_mut_ptr","slice_as_ptr","slice_assume_init_mut","slice_assume_init_ref","sub","swap","take","take","to_owned","to_owned","to_owned","to_owned","transmute","transmute_copy","transpose","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","uninit","uninit_array","uninitialized","validity","variant_count","write","write_slice","write_slice_cloned","zeroed","zeroed","DynamicDeserializer","DynamicSerializer","borrow","borrow","borrow_mut","borrow_mut","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_i128","deserialize_i16","deserialize_i32","deserialize_i64","deserialize_i8","deserialize_identifier","deserialize_ignored_any","deserialize_map","deserialize_newtype_struct","deserialize_option","deserialize_seq","deserialize_str","deserialize_string","deserialize_struct","deserialize_tuple","deserialize_tuple_struct","deserialize_u128","deserialize_u16","deserialize_u32","deserialize_u64","deserialize_u8","deserialize_unit","deserialize_unit_struct","end","end","end","end","end","from","from","from_dynamic","into","into","new","new","serialize_bool","serialize_bytes","serialize_char","serialize_element","serialize_element","serialize_entry","serialize_f32","serialize_f64","serialize_field","serialize_field","serialize_i128","serialize_i16","serialize_i32","serialize_i64","serialize_i8","serialize_key","serialize_map","serialize_newtype_struct","serialize_newtype_variant","serialize_none","serialize_seq","serialize_some","serialize_str","serialize_struct","serialize_struct_variant","serialize_tuple","serialize_tuple_struct","serialize_tuple_variant","serialize_u128","serialize_u16","serialize_u32","serialize_u64","serialize_u8","serialize_unit","serialize_unit_struct","serialize_unit_variant","serialize_value","to_dynamic","try_from","try_from","try_into","try_into","type_id","type_id"],"q":[[0,"casbin"],[481,"casbin::error"],[578,"casbin::function_map"],[593,"casbin::prelude"],[611,"casbin::rhai"],[1460,"casbin::rhai::config"],[1461,"casbin::rhai::config::hashing"],[1478,"casbin::rhai::packages"],[1678,"casbin::rhai::plugin"],[1916,"casbin::rhai::plugin::CallableFunction"],[1924,"casbin::rhai::plugin::mem"],[2059,"casbin::rhai::serde"]],"d":["","","","","","","","","","","","","","","","","","","Enforcer is the main interface for authorization …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Enforce decides whether a “subject” can access a “…","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AdapterError error represents any type of errors in adapter…","","","General casbin error","","","ModelError represents any type of errors in model …","","","","","PolicyError represents any type of errors in policy","","","RBAC error represents any type of errors in RBAC role …","","RequestError represents any type of errors in coming …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","Compiled AST (abstract syntax tree) of a Rhai script.","Variable-sized array of Dynamic values.","Assignment to an a constant variable. Wrapped value is the …","Assignment to an inappropriate LHS (left-hand-side) …","Error in the script text. Wrapped value is the lex error.","Variable-sized array of u8 values (byte array).","Trait to build the API of a custom type for use with an …","A map definition has duplicated property names. Wrapped …","A switch case is duplicated.","A variable name is duplicated. Wrapped value is the …","Dynamic type containing any value.","Rhai main scripting engine.","Arithmetic error encountered. Wrapped value is the error …","Array access out-of-bounds. Wrapped values are the current …","Assignment to a constant variable. Wrapped value is the …","Bit-field indexing out-of-bounds. Wrapped values are the …","Error encountered for a custom syntax. Wrapped values are …","Data race detected when accessing a variable. Wrapped …","Data value over maximum size limit. Wrapped value is the …","Inappropriate property access. Wrapped value is the …","The for statement encounters a type that is not iterable.","Forbidden variable name. Wrapped value is the variable …","Call to an unknown function. Wrapped value is the function …","An error has occurred inside a called function. Wrapped …","An error has occurred while loading a module. Wrapped …","Access of an invalid index. Wrapped value is the index …","Trying to index into a type that has no indexer function …","Data is not of the required type. Wrapped values are the …","Returned type is not the same as the required output type. …","Usage of an unknown module. Wrapped value is the module …","Calling a non-pure method on a constant. Wrapped value is …","Syntax error.","Access of an unknown object map property. Wrapped value is …","Run-time error encountered. Wrapped value is the error …","Call stack over maximum limit.","String indexing out-of-bounds. Wrapped values are the …","System error. Wrapped values are the error message and the …","The script is prematurely terminated. Wrapped value is the …","Modules over maximum limit.","Number of operations over maximum limit.","Access to this that is not bound.","Shadowing of an existing variable disallowed. Wrapped …","Access of an unknown variable. Wrapped value is the …","Evaluation result.","Context of a script evaluation process.","Missing an expression. Wrapped value is the expression …","Expression exceeding the maximum levels of complexity.","An expression sub-tree in an AST.","A Dynamic containing a false.","A type representing the access mode of a function.","Defining a function with a name that conflicts with an …","A function definition has duplicated parameters. Wrapped …","A function definition is missing the body. Wrapped value …","Missing a function name after the fn keyword.","A function definition is missing the parameters list. …","A type representing the namespace of a function.","A general function pointer, which may carry additional …","Forbidden variable name. Wrapped value is the variable …","Trait that parses arguments to a function call.","Expose to global namespace.","A Dynamic containing the integer 100.","The system integer type. It is defined as i32 since the …","The system immutable string type.","Bad symbol encountered when tokenizing the script text.","A measurement of a monotonically nondecreasing clock. …","Module namespace only.","Error encountered when tokenizing the script text.","Literal exceeding the maximum size. Wrapped values are the …","A reader-writer lock","Breaking out of loops - not an error if within a loop. The …","Break statement not inside a loop.","A Dynamic containing the integer 1,000,000.","An expression in function call arguments () has syntax …","A capturing has syntax error. Wrapped value is the error …","An character literal is in an invalid format.","An string/character/numeric escape sequence is in an …","An identifier is in an invalid format.","An expression in an in expression has syntax error. …","An expression in indexing brackets [] has syntax error. …","An numeric literal is in an invalid format.","A dictionary of Dynamic values with string keys.","An expression is of the wrong type. Wrapped values are the …","Expecting a particular symbol but not finding one. Wrapped …","Expecting a particular token but not finding one. Wrapped …","A module which may contain variables, sub-modules, …","An imported module is not found.","A Dynamic containing the integer -1.","A Dynamic containing the integer -2.","A Position representing no position.","Context of a native Rust function call.","A Dynamic containing the integer 1.","Standard containment testing function.","Standard equality comparison operator.","Placeholder for the optimization level.","Error when parsing a script.","Error encountered when parsing a script.","A location (line number + character position) in the input …","Private function.","Missing a property name for custom types and maps.","Public function.","Trait to register custom Rust functions.","An identifier is a reserved symbol.","Not an error: Value returned from a script via the return …","A Position representing the first position.","Type containing information about the current scope. …","A thread-safe reference-counting pointer. ‘Arc’ stands …","An identifier or string literal is longer than the maximum …","A Dynamic containing the integer 10.","A Dynamic containing the integer 1,000.","A Dynamic containing the integer 3.","A Dynamic containing a true.","A Dynamic containing the integer 2.","Builder to build the API of a custom type for use with an …","A Dynamic containing a ().","The script ends prematurely.","An unexpected symbol is encountered when tokenizing the …","An unknown operator is encountered. Wrapped value is the …","A string literal is not terminated before a new-line or …","Information on a variable definition.","A variable is already defined.","Missing a variable name after the let, const, for or catch …","A variable is not found.","Defining a doc-comment in an appropriate place (e.g. not …","Export statement not at global level.","Defining a function fn in an appropriate place (e.g. …","The case condition of a switch statement is not …","The default case of a switch statement is in an …","A numeric case of a switch statement is in an appropriate …","A Dynamic containing the integer zero.","","","","Panics","","","","","","","","","","","","","","","","","","","","","Add a new curried argument.","Cast the Dynamic as a bool. Returns the name of the actual …","Cast the Dynamic as a char. Returns the name of the actual …","","Convert the Dynamic into an ImmutableString and return it. …","Cast the Dynamic as the system integer type INT. Returns …","Provides a raw pointer to the data.","","","","","","","Convert the Dynamic into a String and return it. If there …","Cast the Dynamic as a unit (). Returns the name of the …","Converts to Arc<T>.","Converts to Arc<[T]>.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Builds the custom type for use with the Engine.","Scan through all the sub-modules in the Module and build a …","Call the function pointer with curried arguments (if any). …","Call the function pointer with curried arguments (if any). …","Call a function inside the call context with the provided …","Call a function inside the call context.","Call a function (native Rust or scripted) inside the call …","The current nesting level of function calls.","Current nesting level of function calls.","Call a registered native Rust function inside the call …","Call a registered native Rust function inside the call …","Call the function pointer with curried arguments (if any). …","Call the function pointer with curried arguments (if any). …","Convert the Dynamic value into a specific type.","","Returns Some(t) where t is the time self + duration if t …","Returns the amount of time elapsed from another instant to …","Returns Some(t) where t is the time self - duration if t …","Clear the Module.","Empty the Scope.","Clear the ID of the Module.","Clear the poisoned state from a lock","Remove the position information from this error.","Clear the source.","Clear all statements in the AST, leaving only function …","Clone the Dynamic value.","","","Makes a clone of the Arc pointer.","","","","","","","","","","","Clone the Dynamic value and convert it into a specific …","","","","","","","","","","","","","","","Clone the AST’s script statements into a new AST. No …","Clone the Scope, keeping only the last instances of each …","Comparison for two Arcs.","","","","","Combine one AST with another. The second AST is consumed.","Combine another Module into this Module. The other Module …","Combine another Module into this Module. The other Module …","Macro to combine a plugin module into an existing module.","","","","","","Configuration for Rhai.","Does the Scope contain the entry?","Does the particular Rust function exist in the Module?","Does the Module contain indexed functions that have been …","Does a type iterator exist in the module?","Does the particular namespace-qualified function exist in …","Does a type iterator exist in the entire module tree?","Does a sub-module exist in the Module?","Does a variable exist in the Module?","Get the number of variables, functions and type iterators …","Get the curried arguments.","Decrements the strong reference count on the Arc<T> …","Recursively scan for Dynamic values within this Dynamic …","Macro that makes it easy to define a package (which is …","","","Creates a new Arc<T>, with the Default value for T.","Creates a new RwLock<T>, with the Default value for T.","","","","","","","","","","","","","Attempt to downcast the Arc<dyn Any + Send + Sync> to a …","Downcasts the Arc<dyn Any + Send + Sync> to a concrete …","Creates a new Weak pointer to this allocation.","","Drops the Arc.","Returns the amount of time elapsed from another instant to …","Returns the amount of time elapsed since this instant.","Create an empty AST.","The current Engine.","The current Engine.","Equality for two Arcs.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Get the type of this parse error.","Evaluate a string as a script, returning the result value …","Evaluate an expression tree within this evaluation context.","Evaluate an expression tree within this evaluation context.","Evaluate a script file, returning the result value or an …","Evaluate this expression tree within an evaluation context.","Evaluate this expression tree within an evaluation context.","Attribute, when put on a Rust function, turns it into a …","Attribute, when put on a Rust module, turns it into a …","Macro to generate a Rhai Module from a plugin module …","","","","Polyfill this Module with another Module. Only items not …","Flatten the Dynamic.","Flatten the Dynamic and clone it.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Name of the function called.","Get the name of the function.","Return the JSON representation of an object map.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","Create a Dynamic from any type. A Dynamic value is simply …","","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Converts an atomically reference-counted string slice into …","Converts a Path into an Arc by copying the Path data into …","Create an atomically reference-counted pointer from a …","Converts a T into an Arc<T>","Allocate a reference-counted slice and move v’s items …","Converts a CString into an Arc<CStr> by moving the CString …","Converts a PathBuf into an Arc<Path> by moving the PathBuf …","Copies the string into a newly allocated Arc<OsStr>.","Allocate a reference-counted str and copy v into it.","Converts an OsString into an Arc<OsStr> by moving the …","Move a boxed object to a new, reference-counted allocation.","Allocate a reference-counted slice and fill it by cloning v…","Returns the argument unchanged.","","Converts a &CStr into a Arc<CStr>, by copying the contents …","Allocate a reference-counted str and copy v into it.","Creates a new instance of an RwLock<T> which is unlocked. …","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a Dynamic from an Array.","Create a Dynamic from a Blob.","Create a new Dynamic from a bool.","Create a new Dynamic from a char.","Create a new Dynamic from an INT.","","Takes each element in the Iterator and collects it into an …","","","","","","","","Create a Dynamic from a Map.","Constructs an Arc<T> from a raw pointer.","","","Create a new Dynamic from an Instant.","‘Greater than or equal to’ comparison for two Arcs.","Get a reference to an entry in the Scope.","Get the display name of a registered custom type.","","","","","","","","","","","","","Get the value of this expression if it is a literal …","Returns a mutable reference into the given Arc, if there …","Returns a mutable reference to the underlying data.","Get a mutable reference to the value of an entry in the …","Returns a mutable reference into the given Arc, without …","Get the value of this expression if it is a variable name …","Get a sub-module in the Module.","Get the value of an entry in the Scope, starting from the …","Get a Module variable as a Dynamic.","Get the value of a Module variable.","If this expression is a variable name, return it. …","Greater-than comparison for two Arcs.","Is there a NativeCallContext parameter for this function?","Hash the Dynamic value.","","","","","","","","","","","","Get the ID of the Module, if any.","Increments the strong reference count on the Arc<T> …","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Convert the Dynamic into an Array. Returns the name of the …","Convert the Dynamic into a Blob. Returns the name of the …","Convert this function into a CallableFunction.","","Convert a LexError into a ParseError.","Convert the Dynamic into an ImmutableString. Returns the …","Returns the inner value, if the Arc has exactly one strong …","Consumes this RwLock, returning the underlying data.","","","Consume the ImmutableString and convert it into a String.","Consumes the Arc, returning the wrapped pointer.","Make this Dynamic read-only (i.e. a constant).","Convert the Dynamic into a String. If there are other …","Convert the Dynamic into a Vec. Returns the name of the …","Is the value held by this Dynamic a particular type?","Return true if the Dynamic holds an Array.","Is this Position at the beginning of a line?","Return true if the Dynamic holds a Blob.","Return true if the Dynamic holds a bool.","Can this error be caught?","Return true if the Dynamic holds a char.","true if the statement is const, otherwise it is let.","Check if the named entry in the Scope is constant.","Is the function pointer curried?","Returns true if this Module contains no items.","Returns true if this Scope contains no variables.","Is this a global namespace?","Is the Module indexed?","Return true if the Dynamic holds the system integer type …","Register a type iterator. This is an advanced API.","Return true if the Dynamic holds a Map.","Is this a module namespace?","Is there no Position?","Determines whether the lock is poisoned.","Is this a pseudo error? A pseudo error is one that does …","Is this Dynamic read-only?","Return true if the Dynamic holds an ImmutableString.","Is this error a system exception?","Return true if the Dynamic holds a timestamp.","Return true if the Dynamic holds a ().","Does this Dynamic hold a variant data type instead of one …","Get an iterator to entries in the Scope. Shared values are …","Iterate the curried arguments.","Mutably-iterate the curried arguments.","Extract all top-level literal constant and/or variable …","Get an iterator to entries in the Scope. Shared values are …","Get an iterator to the sub-modules in the Module.","Get an iterator to the variables in the Module.","‘Less than or equal to’ comparison for two Arcs.","Get the number of entries inside the Scope.","Get the line number (1-based), or None if there is no …","Less-than comparison for two Arcs.","Makes a mutable reference into the given Arc.","Merge two AST into one. Both AST’s are untouched and a …","Merge another Module into this Module.","Name of the variable to be defined.","Inequality for two Arcs.","The current nesting level, with zero being the global …","Create a new EvalContext.","Create a new NativeCallContext.","Constructs a new Arc<T>.","Creates a new instance of an RwLock<T> which is unlocked.","Create a new Module.","Create a new function pointer.","Create a new ImmutableString.","Create a new Position.","Create a new Scope.","Create a new Position.","Constructs a new Arc<T> while giving you a Weak<T> to the …","Constructs a new Arc with uninitialized contents.","Constructs a new atomically reference-counted slice with …","Constructs a new Arc with uninitialized contents, with the …","Constructs a new atomically reference-counted slice with …","Returns an instant corresponding to “now”.","Get the number of curried arguments.","Get the number of parameters for this function.","Returns an fallback Position if it is NONE?","Module containing all built-in packages available to Rhai, …","Get the type ID’s of this function’s parameters.","Parse function call arguments into a container.","Partial comparison for two Arcs.","","","","","Constructs a new Pin<Arc<T>>. If T does not implement Unpin…","Module defining macros for developing plugins.","Remove the last entry from the Scope.","Get the position of this expression.","Position of the function call.","Get the position of this error.","Get the position of this parse error.","Get the character position (1-based), or None if at …","","","","","","Returns true if the two Arcs point to the same allocation …","Returns true if the two ImmutableString’s point to the …","Add (push) a new entry to the Scope.","Add (push) a new constant to the Scope.","Add (push) a new constant with a Dynamic value to the …","Add (push) a new Dynamic entry to the Scope.","Locks this RwLock with shared read access, blocking the …","Get a reference of a specific type to the Dynamic. Casting …","Macro to register a plugin function (defined via …","Remove the last entry in the Scope by the specified name …","Truncate (rewind) the Scope to a previous size.","Evaluate a string as a script.","Evaluate a file.","Returns the amount of time elapsed from another instant to …","The current Scope.","Get a mutable reference to the current Scope.","(serde) Serialization and deserialization support for serde…","","","","","Set curried arguments to the function pointer.","Map a custom type to a friendly display name.","Map a custom type to a friendly display name.","Macro to register a plugin function into a Rhai Module.","Macro to register a plugin function into a Rhai Module and …","Set a native Rust function into the Module, returning a u64…","Set a Rust getter function taking one mutable parameter, …","Set a pair of Rust getter and setter functions into the …","Set the ID of the Module.","Set a Rust index getter taking two parameters (the first …","Set a pair of Rust index getter and setter functions into …","Set a Rust index setter taking three parameters (the first …","Set a type iterator into the Module.","Set a fallible type iterator into the Module.","Set a type iterator into the Module.","Set a fallible type iterator into the Module.","Set an iterator type into the Module as a type iterator.","Set a iterator type into the Module as a fallible type …","Set a native Rust function into the Module, returning a u64…","Update the value of the named entry in the Scope if it …","Override the position of this error.","Set a native Rust function into the Module, returning a u64…","Set a Rust setter function taking two parameters (the …","Set the source.","Set a sub-module into the Module.","Attach arbitrary data to this Dynamic.","Update the value of the named entry in the Scope.","Set a variable into the Module.","The current source.","Get the source, if any.","The current source.","","Gets the number of strong (Arc) pointers to this …","Returns the amount of time elapsed from another instant to …","","","","","","","","","","","","","","","","Custom state kept in a Dynamic.","Get the arbitrary data attached to this Dynamic.","Custom state kept in a Dynamic.","Mutable reference to the custom state kept in a Dynamic.","Return this Dynamic, replacing it with Dynamic::UNIT.","Remove the position information from this error and return …","The current bound this pointer, if any.","Mutable reference to the current bound this pointer, if …","","","","","","","","","","","","","","","","","","","","","","","","","Convert the Dynamic value into specific type.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Constructs a new Arc<T>, returning an error if allocation …","Constructs a new Arc with uninitialized contents, …","Constructs a new Arc with uninitialized contents, with the …","Constructs a new Pin<Arc<T>>, return an error if …","Attempts to acquire this RwLock with shared read access.","Returns the inner value, if the Arc has exactly one strong …","Attempts to lock this RwLock with exclusive write access.","","","Get the TypeId of the value held by this Dynamic.","","","","","","","","","","","","","","","","","","","Get the name of the type of the value held by this Dynamic.","Unwrap this error and get the very base error.","If we have the only reference to T then unwrap it. …","Update the namespace of a registered function.","Gets the number of Weak pointers to this allocation.","Will the variable shadow an existing variable?","Create a new Module with a pre-sized capacity for …","Create a new Scope with a particular capacity.","Register a custom function.","Register a getter function.","Register a fallible getter function.","Short-hand for registering both getter and setter …","Register an index getter.","Register an fallible index getter.","Short-hand for registering both index getter and setter …","Register an index setter.","Register an fallible index setter.","Set a pretty-print name for the type_of function.","Register a custom fallible function.","Register a setter function.","Register a fallible setter function.","Locks this RwLock with exclusive write access, blocking …","Get a mutable reference of a specific type to the Dynamic. …","Fixed hashing seeds for stable hashing.","Safety","","","","","Returns the argument unchanged.","Return the value of the SusLock (if initialized).","Get the current hashing Seed.","Return the value of the SusLock, initializing it if not …","Initialize the value of the SusLock.","Calls U::from(self).","Is the SusLock initialized?","Create a new SusLock.","Set the hashing seed. This is used to hash functions etc.","","","","Basic arithmetic package.","Package of basic array utilities.","Package of basic BLOB utilities.","Package of basic function pointer utilities.","Package of basic range iterators","Package of basic object map utilities.","Basic mathematical package.","Package of basic string utilities (e.g. printing)","Package of basic timing utilities.","Package of basic bit-field utilities.","Core package containing basic facilities.","Package of core language features.","Package of basic logic operators.","Package of additional string utilities over …","Trait that all packages must implement.","Standard package containing all built-in features.","Get a reference to a shared module from this package.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Initialize the package. Functions should be registered …","","","","","","","","","","","","","","","","Initialize the package with an Engine.","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Create a new ArithmeticPackage","Create a new BasicArrayPackage","Create a new BitFieldPackage","Create a new BasicBlobPackage","Create a new BasicFnPackage","Create a new BasicIteratorPackage","Create a new LanguageCorePackage","Create a new LogicPackage","Create a new BasicMapPackage","Create a new BasicMathPackage","Create a new CorePackage","Create a new StandardPackage","Create a new BasicStringPackage","Create a new MoreStringPackage","Create a new BasicTimePackage","Register the package with an Engine.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","(internals) A type encapsulating a function callable by …","Dynamic type containing any value.","Rhai main scripting engine.","Arithmetic error encountered. Wrapped value is the error …","Array access out-of-bounds. Wrapped values are the current …","Assignment to a constant variable. Wrapped value is the …","Bit-field indexing out-of-bounds. Wrapped values are the …","Error encountered for a custom syntax. Wrapped values are …","Data race detected when accessing a variable. Wrapped …","Data value over maximum size limit. Wrapped value is the …","Inappropriate property access. Wrapped value is the …","The for statement encounters a type that is not iterable.","Forbidden variable name. Wrapped value is the variable …","Call to an unknown function. Wrapped value is the function …","An error has occurred inside a called function. Wrapped …","An error has occurred while loading a module. Wrapped …","Access of an invalid index. Wrapped value is the index …","Trying to index into a type that has no indexer function …","Data is not of the required type. Wrapped values are the …","Returned type is not the same as the required output type. …","Usage of an unknown module. Wrapped value is the module …","Calling a non-pure method on a constant. Wrapped value is …","Syntax error.","Access of an unknown object map property. Wrapped value is …","Run-time error encountered. Wrapped value is the error …","Call stack over maximum limit.","String indexing out-of-bounds. Wrapped values are the …","System error. Wrapped values are the error message and the …","The script is prematurely terminated. Wrapped value is the …","Modules over maximum limit.","Number of operations over maximum limit.","Access to this that is not bound.","Shadowing of an existing variable disallowed. Wrapped …","Access of an unknown variable. Wrapped value is the …","Evaluation result.","A type representing the access mode of a function.","A type representing the namespace of a function.","Expose to global namespace.","The system immutable string type.","Module namespace only.","An iterator function.","Breaking out of loops - not an error if within a loop. The …","A native Rust object method with the first argument passed …","A module which may contain variables, sub-modules, …","Context of a native Rust function call.","A plugin function,","Trait implemented by a plugin function.","A location (line number + character position) in the input …","Private function.","Public function.","A pure native Rust function with all arguments passed by …","An empty raw Engine.","Not an error: Value returned from a script via the return …","Result of a Rhai function.","A TypeId represents a globally unique identifier for a …","Get the access mode.","Is if-expression allowed? Default is true.","Are loop expressions allowed? Default is true.","Is looping allowed? Default is true.","Is variables shadowing allowed? Default is true.","Is statement-expression allowed? Default is true.","Is switch expression allowed? Default is true.","","","","","","","","","Build the API of a custom type for use with the Engine.","Call the plugin function with the arguments provided.","","","","","","","","","Macro to combine a plugin module into an existing module.","Compact a script to eliminate insignificant whitespaces …","","","Compile a string into an AST, which can be used later for …","Compile a string containing an expression into an AST, …","Compile a string containing an expression into an AST …","Compile a script file into an AST, which can be used later …","Compile a script file into an AST using own scope, which …","When passed a list of strings, first join the strings into …","Compile a string into an AST using own scope, which can be …","Get an empty ImmutableString which refers to a shared …","Evaluate a string, but throw away the result and only …","Evaluate an AST, but throw away the result and only return …","Evaluate an AST with own scope, but throw away the result …","Evaluate a file, but throw away the result and only return …","Evaluate a file with own scope, but throw away the result …","Evaluate a string with own scope, but throw away the …","","Get the default value of the custom state for each …","Get a mutable reference to the default value of the custom …","Disable a particular keyword or operator in the language.","","","","","","","","","Evaluate a string as a script, returning the result value …","Evaluate an AST, returning the result value or an error.","Evaluate an AST with own scope, returning the result value …","Evaluate a string containing an expression, returning the …","Evaluate a string containing an expression with own scope, …","Evaluate a script file, returning the result value or an …","Evaluate a script file with own scope, returning the …","Evaluate a string as a script with own scope, returning …","Attribute, when put on a Rust function, turns it into a …","Attribute, when put on a Rust module, turns it into a …","Macro to generate a Rhai Module from a plugin module …","Raise error if an object map property does not exist? …","Is fast operators mode enabled? Default is false.","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Get a reference to the shared encapsulated environment of …","","","Get a reference to an iterator function.","Get a shared reference to a native Rust function.","Get a shared reference to a plugin function.","Does this plugin function contain a NativeCallContext …","Is there a NativeCallContext parameter?","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Is this an iterator function?","Is this a native Rust method function?","Is this plugin function a method?","Is this a native Rust function?","Is this a plugin function?","Is this function private?","Is this function public?","Is this plugin function pure?","Is this a pure native Rust function?","Is this a script-defined function?","Is a particular keyword or operator disabled?","Pretty-print a type name.","The maximum length of arrays (0 for unlimited).","The maximum levels of function calls allowed for a script.","The depth limit for expressions (0 for unlimited).","The depth limit for expressions in functions (0 for …","The maximum size of object maps (0 for unlimited).","The maximum number of imported modules allowed for a …","The maximum number of operations allowed for a script to …","The maximum length of strings (0 for unlimited).","Basic functions for dealing with memory.","Create a new Engine.","Create a new Engine with minimal built-in functions. It …","Returns the TypeId of the type this generic function has …","Override default action of debug (print to stdout using …","Provide a callback that will be invoked before the …","Override default action of print (print to stdout using …","Provide a callback that will be invoked before each …","Parse a JSON string into an object map.","","","Register a custom operator with a precedence into the …","Register a custom syntax with the Engine.","Register a custom syntax with the Engine.","Register a custom syntax with the Engine with custom …","Macro to register a plugin function (defined via …","Register a custom function with the Engine.","Register a getter function for a member of a registered …","Register a getter function for a member of a registered …","Short-hand for registering both getter and setter functions","Register a shared Module into the global namespace of …","Register an index getter for a custom type with the Engine.","Register an index getter for a custom type with the Engine.","Short-hand for registering both index getter and setter …","Register an index setter for a custom type with the Engine.","Register an index setter for a custom type with the Engine.","Register a type iterator for an iterable type with the …","Register a fallible type iterator for an iterable type …","Register a function of the Engine.","Register a custom fallible function with the Engine.","Register a setter function for a member of a registered …","Register a setter function for a member of a registered …","Register a custom type for use with the Engine. The type …","Register a custom type for use with the Engine, with a …","Register a custom type for use with the Engine, with a …","Evaluate a string as a script.","Evaluate an AST.","Evaluate an AST with own scope.","Evaluate a file.","Evaluate a file with own scope.","Evaluate a string as a script with own scope.","Set whether if-expression is allowed.","Set whether loop expressions are allowed.","Set whether looping is allowed.","Set whether variables shadowing is allowed.","Set whether statement-expression is allowed.","Set whether switch expression is allowed.","Set the default value of the custom state for each …","Macro to register a plugin function into a Rhai Module.","Macro to register a plugin function into a Rhai Module and …","Set whether to raise error if an object map property does …","Set whether fast operators mode is enabled.","Set whether strict variables mode is enabled.","Is strict variables mode enabled? Default is false.","","","","","","","","","","","","","","","","","Shared function pointer.","Shared function pointer.","Shared function pointer.","Shared function pointer.","Does the function take a NativeCallContext parameter?","Does the function take a NativeCallContext parameter?","This is a dummy field and is not used.","Allow operating on constants?","Assume only that alignment conditions are met.","What transmutation safety conditions shall the compiler …","Are values of a type transmutable into values of another …","Opaque type representing the discriminant of an enum.","Assume only that lifetime conditions are met.","A wrapper to inhibit compiler from automatically calling T…","A wrapper type to construct uninitialized instances of T.","Do not assume that you have ensured any safety properties …","Assume only that safety conditions are met.","Assume only that dynamically-satisfiable validity …","","Returns the ABI-required minimum alignment of a type in …","Returns the ABI-required minimum alignment of the type of …","Returns the ABI-required minimum alignment of the type of …","When true, the compiler assumes that you are ensuring …","Assume both self and other_assumptions.","Extracts the values from an array of MaybeUninit …","Returns the contents of this MaybeUninit as a slice of …","Returns the contents of this MaybeUninit as a mutable …","Gets a mutable pointer to the contained value. Reading …","Gets a pointer to the contained value. Reading from this …","Extracts the value from the MaybeUninit<T> container. This …","Drops the contained value in place.","Gets a mutable (unique) reference to the contained value.","Reads the value from the MaybeUninit<T> container. The …","Gets a shared reference to the contained value.","","","","","","","","","Assume self, excepting other_assumptions.","","","","","","","","","","","Bitwise-copies a value.","","","","Returns a value uniquely identifying the enum variant in v.","Disposes of a value.","Manually drops the contained value. This is exactly …","","","","","","","","","","","","","","","","","Takes ownership and “forgets” about the value without …","Like forget, but also accepts unsized values.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Extracts the value from the ManuallyDrop container.","When true, the compiler assume that you are ensuring that …","Returns the ABI-required minimum alignment of a type in …","Returns the ABI-required minimum alignment of the type of …","Returns true if dropping values of type T matters.","Wrap a value to be manually dropped.","Creates a new MaybeUninit<T> initialized with the given …","Expands to the offset in bytes of a field from the …","","Moves src into the referenced dest, returning the previous …","When true, the compiler assumes that you have ensured that …","Returns the size of a type in bytes.","Returns the size of the pointed-to value in bytes.","Returns the size of the pointed-to value in bytes.","Returns the contents of this slice of MaybeUninit as a …","Returns the contents of this mutable slice of MaybeUninit …","Gets a mutable pointer to the first element of the array.","Gets a pointer to the first element of the array.","Assuming all the elements are initialized, get a mutable …","Assuming all the elements are initialized, get a slice to …","","Swaps the values at two mutable locations, without …","Replaces dest with the default value of T, returning the …","Takes the value from the ManuallyDrop<T> container out.","","","","","Reinterprets the bits of a value of one type as another …","Interprets src as having type &Dst, and then reads src …","Transposes a MaybeUninit<[T; N]> into a [MaybeUninit<T>; N]…","","","","","","","","","","","","","Creates a new MaybeUninit<T> in an uninitialized state.","Create a new array of MaybeUninit<T> items, in an …","Bypasses Rust’s normal memory-initialization checks by …","When true, the compiler assumes that you are ensuring that …","Returns the number of variants in the enum type T.","Sets the value of the MaybeUninit<T>.","Copies the elements from src to this, returning a mutable …","Clones the elements from src to this, returning a mutable …","Returns the value of type T represented by the all-zero …","Creates a new MaybeUninit<T> in an uninitialized state, …","Deserializer for Dynamic.","Serializer for Dynamic.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Deserialize a Dynamic value into a Rust type that …","Calls U::from(self).","Calls U::from(self).","Create a DynamicDeserializer from a reference to a Dynamic …","Create a DynamicSerializer from a Dynamic value.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Serialize a Rust type that implements serde::Serialize …","","","","","",""],"i":[0,23,23,28,0,31,23,23,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,31,0,23,23,23,0,0,23,0,0,42,3,182,4,183,183,183,183,20,12,183,4,183,4,183,4,183,4,184,4,184,4,42,36,17,18,19,183,183,3,185,4,42,36,17,18,19,183,183,3,185,4,184,4,184,4,17,18,4,12,19,27,28,29,30,31,23,25,3,17,18,4,12,19,27,28,29,30,31,23,25,3,42,182,4,25,3,42,182,4,25,3,33,20,12,42,36,182,17,18,4,19,3,27,28,29,23,25,3,27,28,29,23,25,3,19,30,25,3,20,12,184,184,184,4,184,184,184,4,184,4,184,4,184,4,186,4,182,4,182,4,182,4,182,4,182,4,28,31,28,28,28,31,31,31,0,23,17,18,4,12,19,27,28,29,30,31,23,25,3,3,3,0,27,182,4,183,183,183,4,183,4,183,4,183,4,183,4,183,183,183,4,183,183,183,183,183,183,183,4,183,4,42,183,183,3,183,183,31,184,4,184,4,184,4,42,182,4,3,182,4,42,182,4,3,25,183,4,183,4,0,184,4,42,183,183,25,3,182,4,20,12,184,4,20,12,184,4,42,3,182,4,182,4,183,4,183,183,20,12,183,4,184,4,42,183,183,3,184,4,31,17,18,4,12,19,27,28,29,30,31,23,25,3,182,4,36,182,17,18,4,19,25,36,182,17,18,4,19,36,182,17,18,4,19,20,12,182,17,4,12,182,4,49,30,48,29,186,4,186,4,27,25,0,48,29,0,0,183,183,183,4,183,4,42,36,17,18,19,183,183,3,185,4,183,183,183,183,183,4,183,4,183,4,183,4,42,36,17,18,19,183,183,3,185,4,42,36,17,18,19,183,183,3,185,4,0,25,36,182,17,18,4,19,182,4,182,4,182,4,182,4,27,28,29,23,25,3,23,25,17,18,4,12,19,27,28,29,30,31,23,25,3,17,18,4,12,19,27,28,29,30,31,23,25,3,47,17,18,19,46,3,33,17,18,4,12,19,27,28,29,30,31,23,25,3,25,0,58,53,0,58,53,0,58,56,53,53,0,58,53,0,58,0,58,58,58,55,54,53,54,55,56,57,58,53,54,55,56,57,58,53,53,54,54,55,55,56,56,57,57,58,58,53,54,55,56,57,58,58,58,58,58,58,58,58,58,53,54,55,56,57,58,53,54,55,56,57,58,58,53,54,55,56,57,58,53,54,55,56,57,58,53,54,55,56,57,58,53,54,55,56,57,58,0,64,64,64,64,64,64,64,0,0,0,0,64,64,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,99,99,0,0,99,99,99,0,0,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,0,0,99,99,0,51,0,99,99,99,99,99,0,0,99,0,97,51,0,0,98,0,97,0,99,0,60,99,51,99,99,98,98,98,99,99,98,0,99,99,99,0,99,51,51,72,0,51,0,0,0,0,0,0,141,99,141,0,99,60,72,0,0,98,51,51,51,51,51,0,51,99,98,99,98,0,99,99,99,99,99,99,99,99,99,51,66,67,67,68,70,70,70,70,70,70,70,70,70,70,72,66,67,68,70,70,70,70,70,72,74,51,51,22,51,51,22,22,79,66,22,70,70,51,51,22,22,86,93,51,110,79,79,66,66,91,22,22,96,97,67,68,60,74,70,70,70,98,99,59,72,95,86,93,51,110,79,66,91,22,96,97,67,68,60,74,70,98,99,59,72,95,187,67,74,74,91,91,91,93,91,91,91,74,74,51,22,68,68,68,67,95,67,96,60,66,66,51,79,66,22,97,67,68,74,70,98,99,59,72,95,51,51,79,66,22,97,67,68,74,70,98,99,59,72,95,66,95,22,97,68,70,72,66,67,67,0,22,97,68,70,72,0,95,67,67,67,67,67,67,67,67,74,22,51,0,51,66,22,96,67,70,72,95,79,22,70,22,51,96,70,95,22,22,22,86,22,68,68,66,93,91,22,97,68,70,98,99,59,72,22,22,22,97,97,97,68,68,68,70,70,70,98,98,98,99,99,99,59,59,59,72,72,72,59,0,93,93,0,79,79,0,0,0,74,95,95,67,51,51,51,51,110,79,66,91,22,22,22,96,97,67,68,60,60,74,74,70,70,98,98,99,99,59,59,72,72,95,95,91,74,0,86,93,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,110,79,79,66,91,91,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,96,96,96,97,67,68,60,60,60,60,74,70,70,70,70,70,70,70,98,99,99,59,72,95,51,51,51,51,51,51,22,70,70,70,70,70,95,95,51,22,51,70,51,22,95,67,51,110,22,97,68,74,70,98,99,59,72,95,79,22,96,95,22,79,67,95,67,67,79,22,142,51,110,22,97,68,74,70,98,99,59,72,95,67,22,74,74,86,93,51,110,79,66,91,22,96,97,67,68,60,74,70,98,99,59,72,95,51,51,142,51,98,51,22,96,95,95,70,22,51,51,51,51,51,72,51,51,60,51,110,95,74,67,95,97,67,51,86,51,97,72,96,60,51,51,60,51,51,51,95,74,74,66,95,67,67,22,95,72,22,22,66,67,110,22,110,93,91,22,96,67,74,70,72,95,72,22,22,22,22,22,68,74,142,72,0,142,88,22,97,68,70,72,22,0,95,79,91,60,59,72,22,22,60,98,59,22,70,95,95,95,95,96,51,0,95,95,0,0,68,93,93,0,51,96,70,95,74,67,67,0,0,67,67,67,67,67,67,67,67,67,67,67,67,67,67,95,60,67,67,66,67,51,95,67,93,66,91,22,22,68,68,70,70,70,70,70,70,70,70,68,70,70,70,70,70,93,51,91,93,51,60,93,93,51,79,66,22,97,67,68,74,70,98,99,59,72,95,51,22,60,74,70,98,99,59,72,95,51,86,93,51,110,79,66,91,22,22,96,97,67,68,60,74,74,70,98,99,59,72,95,86,93,51,110,79,66,91,22,96,97,67,68,60,74,70,98,99,59,72,95,22,22,22,22,96,22,96,86,93,51,51,110,79,66,91,22,96,97,67,68,60,74,70,98,99,59,72,95,51,60,22,67,22,110,67,95,86,86,86,86,86,86,86,86,86,86,86,86,86,96,51,0,0,149,149,149,149,149,149,0,149,149,149,149,149,0,149,149,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,188,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,188,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,188,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,0,0,0,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,0,0,0,97,0,97,130,60,130,0,0,130,0,0,141,141,130,87,60,0,0,130,87,87,87,87,87,87,87,141,130,52,87,141,130,52,87,165,141,130,52,141,130,52,141,52,0,87,141,52,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,141,52,141,141,141,52,52,52,87,87,87,87,87,87,87,87,0,0,0,87,87,87,141,130,130,52,87,141,130,130,130,52,130,141,52,130,130,130,165,130,141,52,87,141,130,52,130,130,165,130,130,141,141,165,130,130,87,87,87,87,87,87,87,87,87,87,0,87,87,52,87,87,87,87,87,141,52,87,87,87,87,0,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,0,0,87,87,87,87,141,130,52,130,87,141,130,52,87,141,130,52,87,141,130,52,189,190,191,192,189,190,189,190,167,0,0,0,167,0,0,167,167,167,167,0,0,0,167,167,85,85,85,85,85,85,85,85,85,85,168,169,85,167,168,169,85,167,167,168,169,85,167,168,169,85,167,169,169,0,169,169,169,0,0,169,168,169,167,168,168,168,169,169,169,167,167,167,168,169,85,167,0,0,168,169,85,167,168,169,168,169,168,169,85,167,169,167,0,0,0,169,85,0,169,0,167,0,0,0,85,85,85,85,85,85,167,0,0,169,168,169,85,167,0,0,85,168,169,85,167,168,169,85,167,168,169,85,167,85,85,0,167,0,85,85,85,0,85,0,0,171,173,171,173,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,173,173,173,173,173,171,173,0,171,173,171,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,0,171,173,171,173,171,173],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,1,1],2],[[3,1,1,1],2],[1],[[4,1]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[1,1,[11,[1]]]],[[12,1,1,[11,[1]]]],[[1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,1,[7,[[7,[6]]]]],2],[[1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[18,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[19,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[3,1,1,[7,[[7,[6]]]]],2],[[1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,1,[7,[6]]],2],[[1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[18,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[19,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[3,1,1,[7,[6]]],2],[[1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,1,[11,[1]]],[[10,[[9,[8]]]]]],[[1,1,[11,[1]]],[[10,[[9,[8,13]]]]]],[[1,[7,[6]],[11,[1]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]],[11,[1]]],[[10,[[9,[8,13]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[22,[[21,[20]]]],23],24],[23,24],[[4,23],24],[[25,[22,[[21,[20]]]],23],24],[[3,[22,[[21,[20]]]],23],24],[[[22,[[21,[20]]]]],24],[[],24],[4,24],[[25,[22,[[21,[20]]]]],24],[[3,[22,[[21,[20]]]]],24],[[],26],[[]],[12],[[]],[[],[[10,[[9,[8]]]]]],[[],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]]],[[10,[[9,[8]]]]]],[18,[[10,[[9,[8]]]]]],[4,[[10,[[9,[8]]]]]],[19,[[10,[[9,[8]]]]]],[3],[27,27],[28,28],[29,29],[23,23],[25,25],[3,3],[[]],[[]],[[]],[[]],[[]],[[]],[[],19],[[],30],[[],25],[[],3],[[1,1,[11,[1]]],24],[[12,1,1,[11,[1]]],24],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[5,1],[[10,[[9,[8]]]]]],[[5,1],[[10,[[9,[8]]]]]],[1,[[10,[[9,[8]]]]]],[1,[[10,[[9,[8,13]]]]]],[[1,1,[11,[1]]],[[10,[[9,[8]]]]]],[[1,1,[11,[1]]],[[10,[[9,[8,13]]]]]],[[1,[11,[1]]],[[10,[[9,[8]]]]]],[[1,[11,[1]]],[[10,[[9,[8,13]]]]]],[1,[[10,[[9,[8]]]]]],[1,[[10,[[9,[8,13]]]]]],[23],[[4,31,23]],[2],[[4,2]],[2],[[4,2]],[2],[[4,2]],[[32,33],[[24,[2]]]],[[4,33],[[24,[2]]]],[[32,33],[[24,[2]]]],[[4,33],[[24,[2]]]],[[28,28],2],[[31,31],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],0,[[23,34],35],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[15,[14]]],[[24,[3]]]],[1,[[24,[3]]]],0,0,[[],36],[4,36],[[],[[7,[6]]]],[[],[[7,[6]]]],[[],[[7,[[7,[6]]]]]],[[],[[7,[[7,[6,13]],13]]]],[1,[[7,[6]]]],[1,[[7,[6,13]]]],[1,[[7,[6]]]],[1,[[7,[6,13]]]],[1,[[7,[6]]]],[1,[[7,[6,13]]]],[1,[[7,[6]]]],[1,[[7,[6,13]]]],[[],[[7,[6]]]],[[],[[7,[6]]]],[[],[[7,[[7,[6]]]]]],[[],[[7,[[7,[6,13]],13]]]],[[],[[7,[6]]]],[[],[[7,[6]]]],[[],[[7,[6]]]],[[],[[7,[6]]]],[[37,[7,[6]]],[[7,[[7,[6]]]]]],[[37,[7,[6]]],[[7,[[7,[6]]]]]],[[1,37,[7,[6]]],[[7,[[7,[6]]]]]],[[1,37,[7,[6,13]]],[[7,[[7,[6,13]],13]]]],[[1,37,[7,[6]]],[[7,[[7,[6]]]]]],[[1,37,[7,[6,13]]],[[7,[[7,[6,13]],13]]]],[[1,1,37,[7,[6]]],[[7,[[7,[6]]]]]],[[37,[7,[6]]],[[7,[[7,[6]]]]]],[[37,[7,[6]]],[[7,[[7,[6]]]]]],[[3,1,1,37,[7,[6]]],[[7,[[7,[6]]]]]],[[],[[7,[[7,[6]]]]]],[[],[[7,[[7,[6]]]]]],[[[0,[38,32]],39],26],[[1,[11,[1]]],[[7,[[7,[6]]]]]],[[1,[11,[1]]],[[7,[[7,[6,13]],13]]]],[[1,[11,[1]]],[[7,[6]]]],[[1,[11,[1]]],[[7,[6,13]]]],[[[7,[6]]],[[10,[[9,[8]]]]]],[[[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[],[[41,[6,[40,[6,25]]]]]],[[],42],[4,42],[3,[[41,[6,[40,[6,25]]]]]],[[],36],[4,36],[[],[[41,[6,[40,[6,25]]]]]],[[],42],[4,42],[3,[[41,[6,[40,[6,25]]]]]],[25,[[43,[[7,[6]]]]]],[1,[[7,[[7,[6]]]]]],[1,[[7,[[7,[6,13]],13]]]],[1,[[7,[[7,[6]]]]]],[1,[[7,[[7,[6,13]],13]]]],0,[[1,[11,[1]]],[[7,[[7,[6]]]]]],[[1,[11,[1]]],[[7,[[7,[6,13]],13]]]],[[1,1],[[7,[[7,[6]]]]]],[[],[[7,[[7,[6]]]]]],[[],[[7,[[7,[6]]]]]],[25,[[43,[[7,[6]]]]]],[[3,1,1],[[7,[[7,[6]]]]]],[[],[[22,[[21,[20]]]]]],[4,[[22,[[21,[20]]]]]],[[1,[11,[1]]],[[7,[6]]]],[[12,1,[11,[1]]],[[7,[6]]]],[[1,[11,[1]]],[[7,[6]]]],[[1,[11,[1]]],[[7,[6,13]]]],[[1,[11,[1]]],[[7,[6]]]],[[12,1,[11,[1]]],[[7,[6]]]],[[1,[11,[1]]],[[7,[6]]]],[[1,[11,[1]]],[[7,[6,13]]]],[[1,1,37],[[7,[6]]]],[[3,1,1,37],[[7,[6]]]],[[],2],[4,2],[[],2],[4,2],[[1,[7,[6]]],2],[[1,[7,[6,13]]],2],[[[7,[6]]],2],[[[7,[6]]],2],[[1,1,[11,[1]]],2],[[12,1,1,[11,[1]]],2],[[1,[7,[6]]],2],[[1,[7,[6,13]]],2],[[1,[7,[6]]],2],[[1,[7,[6,13]]],2],[[1,1,[7,[6]]],2],[[[7,[6]]],2],[[[7,[6]]],2],[[3,1,1,[7,[6]]],2],[[1,1,[11,[1]]],2],[[1,1,[11,[1]]],2],[[31,44]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],2],[4,2],[[],2],[[],2],[[[17,[[0,[[15,[14]],5,16]]]]],2],[18,2],[4,2],[19,2],0,[[42,27],[[10,[[9,[8]]]]]],[27,[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],42,27],[[10,[[9,[8]]]]]],[[18,42,27],[[10,[[9,[8]]]]]],[[4,27],[[10,[[9,[8]]]]]],[[19,42,27],[[10,[[9,[8]]]]]],[42,[[10,[[9,[8]]]]]],[[],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],42],[[10,[[9,[8]]]]]],[[18,42],[[10,[[9,[8]]]]]],[4,[[10,[[9,[8]]]]]],[[19,42],[[10,[[9,[8]]]]]],[[[11,[45]],[11,[45]]]],[[12,[11,[45]],[11,[45]]]],[[46,47],[[10,[[9,[8]]]]]],[[[0,[[15,[14]],5,16]]],[[17,[[0,[[15,[14]],5,16]]]]]],[[46,47],[[10,[[9,[8]]]]]],[37,12],[[46,47],[[10,[[9,[8]]]]]],[[46,47],[[10,[[9,[8]]]]]],[[1,37],[[9,[48]]]],[[30,1,37],[[9,[48]]]],[[],2],[29,2],[[]],[[4,31]],[32],[[4,31]],0,0,0,[28,2],[[29,28],2],0,0,[[5,37,[7,[6]]],[[10,[[9,[8]]]]]],[[5,37,[7,[6]]],[[10,[[9,[8]]]]]],[[1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[1,37,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[1,37,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,1,37,[7,[6]]]],[[1,1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],1,1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[18,1,1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[19,1,1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[5,37,[7,[6]]],[[10,[[9,[8]]]]]],[[5,37,[7,[6]]],[[10,[[9,[8]]]]]],[[3,1,1,37,[7,[6]]]],[[1,1,37,[7,[6]]],[[10,[[9,[8]]]]]],[[1,1,37,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],[[1,1,[7,[[7,[6]]]]],2],[[1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[18,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[19,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[5,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[3,1,1,[7,[[7,[6]]]]],2],[[1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[1,1,[7,[[7,[6,13]],13]]],[[10,[[9,[8,13]]]]]],[[1,1,[7,[6]]],2],[[1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[18,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[19,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[5,[7,[6]]],[[10,[[9,[8]]]]]],[[3,1,1,[7,[6]]],2],[[1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[1,1,[7,[6,13]]],[[10,[[9,[8,13]]]]]],0,0,[42,[[10,[[9,[8]]]]]],[[],[[10,[[9,[8]]]]]],[[[17,[[0,[[15,[14]],5,16]]]],42],[[10,[[9,[8]]]]]],[[18,42],[[10,[[9,[8]]]]]],[4,[[10,[[9,[8]]]]]],[[19,42],[[10,[[9,[8]]]]]],[[32,47],[[10,[[9,[8]]]]]],[[4,47],[[10,[[9,[8]]]]]],[[[9,[49]]]],[[4,[9,[49]]]],[[32,46],[[10,[[9,[8]]]]]],[[4,46],[[10,[[9,[8]]]]]],[[[22,[[21,[20]]]]],24],[[4,[22,[[21,[20]]]]],24],[[]],[[]],[[]],[[]],[[]],[[]],[[],6],0,[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],[[10,[[9,[8]]]]]],[[],[[10,[[9,[8,13]]]]]],[[],[[10,[[9,[8,13]]]]]],[[],[[10,[[9,[8,13]]]]]],[[],[[10,[[9,[8]]]]]],[[],[[10,[[9,[8,13]]]]]],[[],[[24,[[7,[51]]]]]],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[53,34],35],[[53,34],35],[[54,34],35],[[54,34],35],[[55,34],35],[[55,34],35],[[56,34],35],[[56,34],35],[[57,34],35],[[57,34],35],[[58,34],35],[[58,34],35],[[]],[[]],[[]],[[]],[[]],[59,58],[[]],[55,58],[[[9,[60]]],58],[56,58],[54,58],[57,58],[61,58],[53,58],[[]],[[]],[[]],[[]],[[]],[[]],[62],[62],[62],[62],[62],[62],[58,[[11,[63]]]],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],0,[[64,1]],[[]],[[]],[[],64],[[]],[64,65],[[]],[[1,1],2],[[1,1],2],[[1,1],2],[[1,1],2],[[],50],[[],50],[[],52],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[66,[15,[66]]]],[[67,[15,[67]]]],[[67,[15,[67]]]],[[68,69],68],[[70,70]],[[70,6]],[[70,70]],[[70,6]],[[70,71]],[[70,70]],[[70,1]],[[70,71]],[[70,70]],[[70,1]],[[72,72]],[[66,[73,[66]]]],[[67,[73,[67]]]],[[68,69]],[[70,6]],[[70,70]],[[70,1]],[[70,71]],[[70,70]],[[72,72]],[[74,51],74],[51,[[50,[2,1]]]],[51,[[50,[71,1]]]],[[[22,[75]]],76],[51,[[50,[70,1]]]],[51,[[50,[77,1]]]],[[[22,[32]]]],[[[22,[78]]],77],[79,80],[66,[[82,[81]]]],[[[22,[32]]],32],[70,1],[70,[[84,[83]]]],[51,[[50,[6,1]]]],[51,[[50,[1]]]],[[[22,[85]]],22],[[[22,[[82,[85]]]]],[[22,[82]]]],[[]],[[]],[[]],[[]],[[]],[79,80],[[]],[66,[[82,[81]]]],[[]],[[[22,[32]]],32],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[70,[[84,[83]]]],[70,1],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[86],[67,67],[[74,87,66,88],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[74,91,[11,[51]],[92,[[82,[51]]]]],[[50,[51,[9,[60,13]]]]]],[[91,[15,[1]],88],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[91,[15,[1]],2,[82,[51]]],[[50,[51,[9,[60,13]]]]]],[[91,[15,[1]],2,2,[82,[51]]],[[50,[51,[9,[60,13]]]]]],[93,37],[91,37],[[91,[15,[1]],88],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[91,[15,[1]],2,[82,[51]]],[[50,[51,[9,[60,13]]]]]],[[74,91,[11,[51]],[92,[[82,[51]]]]],[[50,[51,[9,[60,13]]]]]],[[74,91,88],[[50,[[0,[89,90]],[9,[60,13]]]]]],[51,[[0,[94,90]]]],[[[22,[[0,[63,32]]]]],[[11,[63]]]],[[68,69],[[11,[68]]]],[[68,68],[[11,[69]]]],[[68,69],[[11,[68]]]],[67],[95,95],[67,67],[[[96,[32]]]],[60,60],[66,66],[66,66],[51,51],[79,79],[66,66],[[[22,[32]]],[[22,[32]]]],[97,97],[67,67],[68,68],[74,74],[70,70],[98,98],[99,99],[59,59],[72,72],[95,95],[51,[[0,[94,90]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[66,66],[95,95],[[[22,[[0,[100,32]]]],[22,[[0,[100,32]]]]],101],[[97,97],101],[[68,68],101],[[70,70],101],[[72,72],101],[[66,66],66],[[67,67],67],[[67,67],67],0,[[],101],[[],101],[[],101],[[],101],[[],101],0,[[95,1],2],[[67,26],2],[67,2],[[67,52],2],[[67,26],2],[[67,52],2],[[67,1],2],[[67,1],2],[67],[74,[[82,[51]]]],[[]],[[51,102]],0,[[],51],[[],66],[[],[[22,[103]]]],[[],[[96,[103]]]],[[],67],[[],70],[[],72],[[],95],[79],[[[22,[32]]],32],[70],[[[22,[[0,[63,32]]]]],1],[104,[[50,[51]]]],[104,[[50,[[96,[105]]]]]],[104,[[50,[70]]]],[104,[[50,[95]]]],[[[22,[94]]],[[50,[[22,[[0,[94,5,16]]]],[22,[94]]]]]],[[[22,[94]]],[[22,[[0,[94,5,16]]]]]],[[[22,[32]]],[[106,[32]]]],[[[86,[[0,[89,90]]]]]],[[[22,[32]]]],[[68,68],69],[68,69],[[],66],[93,87],[91,87],[[[22,[[0,[[107,[[0,[[107,[[0,[[107,[[0,[107,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[107,[[0,[[107,[[0,[[107,[[0,[107,32]]]],32]]]],32]]]],32]]]]],2],[[97,97],2],[[68,68],2],[[70,[15,[1]]],2],[[98,98],2],[[99,99],2],[[59,59],2],[[72,72],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[59,99],[1,[[50,[[0,[89,90]],[9,[60,13]]]]]],[[93,79],[[50,[51,[9,[60,13]]]]]],[[93,79,2],[[50,[51,[9,[60,13]]]]]],[[[15,[14]]],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[79,93],[[50,[51,[9,[60,13]]]]]],[[79,93,2],[[50,[51,[9,[60,13]]]]]],0,0,0,[[74,108]],[[95,108]],[[95,108]],[[67,67],67],[51,51],[51,51],[[51,34],[[50,[109]]]],[[51,34],[[50,[109]]]],[[110,34],[[50,[109]]]],[[79,34],[[50,[109]]]],[[66,34],[[50,[109]]]],[[91,34],[[50,[109]]]],[[[22,[[0,[111,32]]]],34],[[50,[109]]]],[[[22,[[0,[112,32]]]],34],[[50,[109]]]],[[[22,[32]],34],[[50,[109]]]],[[[96,[[0,[111,32]]]],34],[[50,[109]]]],[[97,34],[[50,[109]]]],[[67,34],[[50,[109]]]],[[68,34],[[50,[109]]]],[[60,34],[[50,[109]]]],[[60,34],[[50,[109]]]],[[74,34],[[50,[109]]]],[[74,34],[[50,[109]]]],[[70,34],[[50,[109]]]],[[70,34],[[50,[109]]]],[[98,34],[[50,[109]]]],[[98,34],[[50,[109]]]],[[99,34],[[50,[109]]]],[[99,34],[[50,[109]]]],[[59,34],[[50,[109]]]],[[59,34],[[50,[109]]]],[[72,34],[[50,[109]]]],[[72,34],[[50,[109]]]],[[95,34],[[50,[109]]]],[[95,34],[[50,[109]]]],[91,1],[74,1],[[[113,[[84,[83]],51,13]]],6],[[]],[[]],[68,51],[74,51],[[[114,[[73,[[84,[83]]]],13]]],51],[[[73,[70]]],51],[77,51],[2,51],[[[113,[[73,[[84,[83]]]],[0,[89,90]],13]]],51],[[[7,[[0,[89,90]],13]]],51],[[[0,[89,90]]],51],[[[115,[77]]],51],[[],51],[[[117,[[73,[[84,[83]]]],116]]],51],[[]],[[[82,[[0,[89,90]]]]],51],[70,51],[[[118,[77]]],51],[[[41,[[73,[[84,[83]]]],[0,[89,90]],116]]],51],[71,51],[[]],[80,79],[[]],[[]],[[]],[[],91],[[[22,[1]]],[[22,[[82,[119]]]]]],[14,[[22,[14]]]],[[[121,[[0,[120,32]]]]],[[22,[[0,[120,32]]]]]],[[],22],[[[7,[13]]],[[22,[82]]]],[122,[[22,[123]]]],[124,[[22,[14]]]],[125,[[22,[125]]]],[1,[[22,[1]]]],[126,[[22,[125]]]],[[[9,[32,13]]],[[22,[32]]]],[[[82,[90]]],[[22,[[82,[90]]]]]],[[]],[127],[123,[[22,[123]]]],[6,[[22,[1]]]],[[],96],[[]],[127],[[]],[[]],[[]],[59,60],[[[15,[1]]],60],[99,60],[[]],[[]],[[[84,[83]]],70],[6,70],[6,70],[1,70],[[[84,[83]]],70],[[]],[[[9,[1,13]]],70],[[]],[98,99],[[]],[[]],[[]],[[]],[[[7,[51,13]]],51],[[[7,[119,13]]],51],[2,51],[71,51],[77,51],[108,51],[108,[[22,[82]]]],[108,70],[108,70],[108,70],[108,70],[108,70],[108,95],[108,95],[[[113,[[84,[83]],51,13]]],51],[[],[[22,[32]]]],[1,[[50,[51]]]],[1,[[50,[70]]]],[68,51],[[[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]]],2],[[95,1],[[11,[51]]]],[[67,1],[[11,[1]]]],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[79,[[11,[89]]]],[[[22,[32]]],[[11,[32]]]],[[[96,[32]]],[[50,[32,[129,[32]]]]]],[[95,1],[[11,[51]]]],[[[22,[32]]],32],[79,[[11,[1]]]],[[67,1],[[11,[67]]]],[[95,1],[[11,[[0,[89,90]]]]]],[[67,1],[[11,[51]]]],[[67,1],[[11,[[0,[89,90]]]]]],[79,[[11,[1]]]],[[[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]]],2],[[],2],[[51,44]],[[110,44]],[[[22,[[0,[38,32]]]],44]],[[97,44]],[[68,44]],[[74,44]],[[70,44]],[[98,44]],[[99,44]],[[59,44]],[[72,44]],[[95,44]],[67,[[11,[1]]]],[[]],[[74,37]],[[74,37]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[51,[[50,[[7,[51,13]],1]]]],[51,[[50,[[7,[119,13]],1]]]],[[[84,[83]],2],130],[51],[[98,72],59],[51,[[50,[70,1]]]],[22,11],[[[96,[32]]],[[50,[32,[129,[32]]]]]],[95],[95],[70,6],[[[22,[32]]]],[51,51],[51,[[50,[6,1]]]],[51,[[50,[[7,[[0,[89,90]],13]],1]]]],[51,2],[51,2],[72,2],[51,2],[51,2],[60,2],[51,2],0,[[95,1],[[11,[2]]]],[74,2],[67,2],[95,2],[97,2],[67,2],[51,2],[[[86,[[0,[89,90,108]]]]],[[86,[[0,[89,90,108]]]]]],[51,2],[97,2],[72,2],[[[96,[32]]],2],[60,2],[51,2],[51,2],[60,2],[51,2],[51,2],[51,2],[95,65],[74,65],[74,65],[[66,2,2],65],[95,65],[67,65],[67,65],[[[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]]],2],[95,37],[72,[[11,[37]]]],[[[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]]],2],[[[22,[90]]],90],[[66,66],66],[[67,67],67],0,[[[22,[[0,[[107,[[0,[[107,[[0,[[107,[[0,[107,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[107,[[0,[[107,[[0,[[107,[[0,[107,32]]]],32]]]],32]]]],32]]]]],2],0,[[87,131,132,95,[11,[51]]],93],[[87,1,[82,[[22,[67]]]]],91],[[],22],[[],96],[[],67],[[[73,[70]]],[[50,[74,[9,[60,13]]]]]],[[],70],[[133,133],72],[[],95],[[133,133],[[11,[72]]]],[134,22],[[],[[22,[85]]]],[37,[[22,[[82,[85]]]]]],[[],[[22,[85]]]],[37,[[22,[[82,[85]]]]]],[[],68],[74,37],[[],37],[[72,72],72],0,[[],[[135,[52]]]],[[[136,[51]]]],[[[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]],[22,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]]],[[11,[101]]]],[[97,97],[[11,[101]]]],[[68,68],[[11,[101]]]],[[70,[15,[1]]],[[11,[101]]]],[[72,72],[[11,[101]]]],[[],[[10,[22]]]],0,[95,95],[79,72],[91,72],[60,72],[59,72],[72,[[11,[37]]]],[[[22,[[0,[63,32]]]],62]],[62],[62],[62],[62],[[[22,[32]],[22,[32]]],2],[[70,70],2],[[95,[73,[[84,[83]]]],[0,[89,90]]],95],[[95,[73,[[84,[83]]]],[0,[89,90]]],95],[[95,[73,[[84,[83]]]],51],95],[[95,[73,[[84,[83]]]],51],95],[[[96,[32]]],[[50,[[137,[32]],[129,[[137,[32]]]]]]]],[51,[[11,[[138,[[0,[94,90]]]]]]]],0,[[95,1],[[11,[[0,[89,90]]]]]],[[95,37],95],[1,[[50,[[9,[60,13]]]]]],[[[15,[14]]],[[50,[[9,[60,13]]]]]],[[68,68],69],[93,95],[93,95],0,[[51,139],50],[[[96,[[0,[140,32]]]],139],50],[[70,139],50],[[95,139],50],[[74,108],74],[[67,1],67],[[67,[73,[[84,[83]]]],[73,[[84,[83]]]]],67],0,0,[[67,[15,[1]],97,141,[11,[[82,[1]]]],[15,[[82,[52]]]],130],26],[[67,[15,[1]],[0,[[142,[[0,[89,90]]]],143]]],26],[[67,[15,[1]],[0,[[142,[[0,[89,90]]]],143]],[0,[142,143]]]],[[67,[73,[70]]],67],[[67,[0,[[142,[[0,[89,90]]]],143]]],26],[[67,[0,[[142,[[0,[89,90]]]],143]],[0,[142,143]]]],[[67,[0,[142,143]]],26],[[67,52,[0,[144,143]]],67],[[67,52,[0,[144,143]]],67],[67,67],[67,67],[67,67],[67,67],[[67,[0,[[15,[1]],[73,[[84,[83]]]]]],[142,[[0,[89,90]]]]],26],[[95,[0,[[15,[1]],[73,[[84,[83]]]]]],[0,[89,90]]],95],[[60,72],60],[[67,[15,[1]],97,141,[15,[[82,[52]]]],[0,[144,143]]],26],[[67,[15,[1]],[0,[142,143]]],26],[[66,[73,[70]]],66],[[67,[73,[[84,[83]]]],[73,[[22,[67]]]]],67],[[51,77],51],[[95,[0,[[15,[1]],[73,[[84,[83]]]]]],[0,[89,90]]],95],[[67,[73,[[84,[83]]]],[0,[89,90]]],67],[93,[[11,[1]]]],[66,[[11,[1]]]],[91,[[11,[1]]]],[[[22,[[0,[63,32]]]]],[[11,[63]]]],[[[22,[32]]],37],[[68,68],69],[[68,69],68],[[70,70]],[[70,71]],[[70,1]],[[70,71]],[[70,6]],[[70,1]],[[70,70]],[[70,6]],[[68,69]],[[70,71]],[[70,6]],[[70,1]],[[70,70]],[[70,70]],[93,51],[51,77],[91,[[11,[51]]]],[93,51],[51,51],[60,72],[93,[[11,[51]]]],[93,[[11,[51]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],[51,[[11,[94]]]],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[[22,[82]]],[[50,[[22,[135]]]]]],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[70,[[50,[74,[9,[60,13]]]]]],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],[[50,[22,145]]]],[[],[[50,[[22,[85]],145]]]],[[],[[50,[[22,[85]],145]]]],[[],[[50,[[10,[22]],145]]]],[[[96,[32]]],[[50,[[137,[32]],[146,[[137,[32]]]]]]]],[22,[[50,[22]]]],[[[96,[32]]],[[50,[[147,[32]],[146,[[147,[32]]]]]]]],[[],52],[[],52],[51,52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[51,1],[60,60],[[[22,[90]]],90],[[67,26,97],67],[[[22,[32]]],37],0,[37,67],[37,95],[[[86,[[0,[89,90]]]],[0,[[15,[1]],[73,[[84,[83]]]]]],[142,[[0,[89,90]]]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[15,[1]],[0,[[142,[[0,[89,90]]]],143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[15,[1]],[0,[[142,[[0,[89,90]]]],143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[15,[1]],[0,[[142,[[0,[89,90]]]],143]],[0,[142,143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[0,[[142,[[0,[89,90]]]],143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[0,[[142,[[0,[89,90]]]],143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[0,[[142,[[0,[89,90]]]],143]],[0,[142,143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[0,[142,143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[0,[142,143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],1],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[0,[[15,[1]],[73,[[84,[83]]]]]],[142,[[0,[89,90]]]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[15,[1]],[0,[142,143]]],[[86,[[0,[89,90]]]]]],[[[86,[[0,[89,90]]]],[15,[1]],[0,[142,143]]],[[86,[[0,[89,90]]]]]],[[[96,[32]]],[[50,[[147,[32]],[129,[[147,[32]]]]]]]],[51,[[11,[[148,[[0,[94,90]]]]]]]],0,0,[[]],[[]],[[],149],[149],[[]],[149,11],[[],[[11,[[135,[26]]]]]],[[149,134]],[149,50],[[]],[149,2],[[],149],[[[11,[[135,[26]]]]],[[50,[[11,[[135,[26]]]]]]]],[[],50],[[],50],[[],52],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[],[[22,[67]]]],[150,[[22,[67]]]],[151,[[22,[67]]]],[152,[[22,[67]]]],[153,[[22,[67]]]],[154,[[22,[67]]]],[155,[[22,[67]]]],[156,[[22,[67]]]],[157,[[22,[67]]]],[158,[[22,[67]]]],[159,[[22,[67]]]],[160,[[22,[67]]]],[161,[[22,[67]]]],[162,[[22,[67]]]],[163,[[22,[67]]]],[164,[[22,[67]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],150],[[],151],[[],152],[[],153],[[],154],[[],155],[[],156],[[],157],[[],158],[[],159],[[],160],[[],161],[[],162],[[],163],[[],164],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[67],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[87],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],150],[[],151],[[],152],[[],153],[[],154],[[],155],[[],156],[[],157],[[],158],[[],159],[[],160],[[],161],[[],162],[[],163],[[],164],[87],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],[[],52],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[130,141],[87,2],[87,2],[87,2],[87,2],[87,2],[87,2],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[87,87],[[[11,[91]],[82,[51]]],[[50,[51,[9,[60,13]]]]]],[141,141],[130,130],[52,52],[[]],[[]],[[]],[[141,141],101],[[52,52],101],0,[[87,[15,[1]]],[[50,[6,59]]]],[[],101],[[],101],[[87,[15,[1]]],[[50,[66,59]]]],[[87,[15,[1]]],[[50,[66,59]]]],[[87,95,[15,[1]]],[[50,[66,59]]]],[[87,124],[[50,[66,[9,[60,13]]]]]],[[87,95,124],[[50,[66,[9,[60,13]]]]]],[[87,95,[15,[[82,[[15,[1]]]]]]],[[50,[66,59]]]],[[87,95,[15,[1]]],[[50,[66,59]]]],[87,70],[[87,1],[[50,[[9,[60,13]]]]]],[[87,66],[[50,[[9,[60,13]]]]]],[[87,95,66],[[50,[[9,[60,13]]]]]],[[87,124],[[50,[[9,[60,13]]]]]],[[87,95,124],[[50,[[9,[60,13]]]]]],[[87,95,1],[[50,[[9,[60,13]]]]]],[[],87],[87,51],[87,51],[[87,[73,[[84,[83]]]]],87],[[141,141],2],[[52,52],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[87,1],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,66],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,95,66],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,1],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,95,1],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,124],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,95,124],[[50,[[0,[89,90]],[9,[60,13]]]]]],[[87,95,1],[[50,[[0,[89,90]],[9,[60,13]]]]]],0,0,0,[87,2],[87,2],[[87,34],[[50,[109]]]],[[141,34],[[50,[109]]]],[[130,34],[[50,[109]]]],[[130,34],[[50,[109]]]],[[52,34],[[50,[109]]]],[[]],[[]],[[]],[[[0,[165,143]]],130],[[[22,[165]]],130],[[]],[130,[[11,[166]]]],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[130,[[11,[144]]]],[130,[[11,[[22,[144]]]]]],[130,[[11,[[22,[165]]]]]],[[],2],[130,2],[[141,44]],[[52,44]],[[]],[[]],[[]],[[]],[130,2],[130,2],[[],2],[130,2],[130,2],[141,2],[141,2],[[],2],[130,2],[130,2],[[87,1],2],[[87,1],1],[87,37],[87,37],[87,37],[87,37],[87,37],[87,37],[87,26],[87,37],0,[[],87],[[],87],[[],52],[[87,[0,[144,143]]],87],[[87,[0,[144,143]]],87],[[87,[0,[144,143]]],87],[[87,[0,[144,143]]],87],[[87,[15,[1]],2],[[50,[[113,[[84,[83]],51,13]],[9,[60,13]]]]]],[[141,141],[[11,[101]]]],[[52,52],[[11,[101]]]],[[87,[15,[1]],119],[[50,[87,6]]]],[[87,[15,[[82,[[0,[[15,[1]],[73,[[84,[83]]]]]]]]]],2,[0,[144,143]]],[[50,[87,59]]]],[[87,[73,[[84,[83]]]],[0,[144,143]],2,[0,[144,143]]],87],[[87,[73,[[84,[83]]]],[0,[144,143]],2,[0,[144,143]]],87],0,[[87,[0,[[15,[1]],[73,[[84,[83]]]]]],[142,[[0,[89,90]]]]],87],[[87,[15,[1]],[0,[[142,[[0,[89,90]]]],143]]],87],[[87,[15,[1]],[0,[[142,[[0,[89,90]]]],143]]],87],[[87,[15,[1]],[0,[[142,[[0,[89,90]]]],143]],[0,[142,143]]],87],[[87,[22,[67]]],87],[[87,[0,[[142,[[0,[89,90]]]],143]]],87],[[87,[0,[[142,[[0,[89,90]]]],143]]],87],[[87,[0,[[142,[[0,[89,90]]]],143]],[0,[142,143]]],87],[[87,[0,[142,143]]],87],[[87,[0,[142,143]]],87],[87,87],[87,87],[[87,[0,[[15,[1]],[73,[[84,[83]]]]]],[15,[[82,[52]]]],[0,[144,143]]],87],[[87,[0,[[15,[1]],[73,[[84,[83]]]]]],[142,[[0,[89,90]]]]],87],[[87,[15,[1]],[0,[142,143]]],87],[[87,[15,[1]],[0,[142,143]]],87],[87,87],[[87,1],87],[[87,[73,[[84,[83]]]],[73,[[84,[83]]]]],87],[[87,1],[[50,[[9,[60,13]]]]]],[[87,66],[[50,[[9,[60,13]]]]]],[[87,95,66],[[50,[[9,[60,13]]]]]],[[87,124],[[50,[[9,[60,13]]]]]],[[87,95,124],[[50,[[9,[60,13]]]]]],[[87,95,1],[[50,[[9,[60,13]]]]]],[[87,2],87],[[87,2],87],[[87,2],87],[[87,2],87],[[87,2],87],[[87,2],87],[[87,[73,[51]]],87],0,0,[[87,2],87],[[87,2],87],[[87,2],87],[87,2],[[]],[[]],[[]],[[],6],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],52],[[],52],[[],52],[[],52],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[167,167],167],[[],37],[32,37],[[],37],0,[[167,167],167],[[[135,[85]]],135],[85,[[82,[[85,[119]]]]]],[85,[[82,[[85,[119]]]]]],[85],[85],[85],[85],[85],[85],[85],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[167,167],167],[168,168],[[[169,[[0,[90,32]]]]],[[169,[[0,[90,32]]]]]],[[[85,[170]]],[[85,[170]]]],[167,167],[[]],[[]],[[]],[[]],[[[169,[[0,[100,32]]]],[169,[[0,[100,32]]]]],101],[[],101],[170,170],[[],[[169,[[0,[103,32]]]]]],[[[169,[32]]],32],[[[169,[32]]],32],[[],168],[[]],[[[169,[32]]]],[[168,168],2],[[[169,[[0,[[107,[[0,[[107,[[0,[[107,[[0,[107,32]]]],32]]]],32]]]],32]]]],[169,[[0,[[107,[[0,[[107,[[0,[[107,[[0,[107,32]]]],32]]]],32]]]],32]]]]],2],[[167,167],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[],2],[[168,34],[[50,[109]]]],[[[169,[[0,[111,32]]]],34],[[50,[109]]]],[[85,34],[[50,[109]]]],[[167,34],[[50,[109]]]],[[]],[32],[[]],[[]],[[]],[[]],[[[0,[38,32]],39],26],[[[0,[38,32]],39],26],[[168,44]],[[[169,[[0,[38,32]]]],44]],[[]],[[]],[[]],[[]],[169],0,[[],37],[32,37],[[],2],[[],169],[[],85],0,[[[169,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]],[169,[[0,[[128,[[0,[[128,[[0,[[128,[[0,[128,32]]]],32]]]],32]]]],32]]]]],[[11,[101]]]],[[]],0,[[],37],[32,37],[[],37],[[[82,[85]]],[[82,[[85,[119]]]]]],[[[82,[85]]],[[82,[[85,[119]]]]]],[[[82,[85]]]],[[[82,[85]]]],[[[82,[85]]],82],[[[82,[85]]],82],[[167,167],167],[[]],[103,103],[169],[[]],[[]],[[]],[[]],[[]],[[]],[[[85,[135]]],[[135,[85]]]],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],50],[[],52],[[],52],[[],52],[[],52],[[],85],[[],[[135,[85]]]],[[]],0,[[],37],[85],[[[82,[[85,[170]]]],[82,[170]]],[[82,[170]]]],[[[82,[[85,[90]]]],[82,[90]]],[[82,[90]]]],[[]],[[],85],0,0,[[]],[[]],[[]],[[]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,1,[82,[1]],172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,1,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,1,[82,[1]],172],[[50,[[9,[60,13]]]]]],[[171,37,172],[[50,[[9,[60,13]]]]]],[[171,1,37,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,172],[[50,[[9,[60,13]]]]]],[[171,1,172],[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[[]],[[]],[51,[[50,[105,[9,[60,13]]]]]],[[]],[[]],[51,171],[51,173],[[173,2],[[50,[[9,[60,13]]]]]],[[173,[82,[119]]],[[50,[[9,[60,13]]]]]],[[173,71],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]],[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,174],[[50,[[9,[60,13]]]]]],[[173,175],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,1,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,176],[[50,[[9,[60,13]]]]]],[[173,177],[[50,[[9,[60,13]]]]]],[[173,77],[[50,[[9,[60,13]]]]]],[[173,178],[[50,[[9,[60,13]]]]]],[[173,179],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,[11,[37]]],[[50,[[9,[60,13]]]]]],[[173,1,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,1,180,1,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[[173,[11,[37]]],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[[173,1],[[50,[[9,[60,13]]]]]],[[173,1,37],[[50,[[9,[60,13]]]]]],[[173,1,180,1,37],[[50,[[9,[60,13]]]]]],[[173,37],[[50,[[9,[60,13]]]]]],[[173,1,37],[[50,[[9,[60,13]]]]]],[[173,1,180,1,37],[[50,[[9,[60,13]]]]]],[[173,181],[[50,[[9,[60,13]]]]]],[[173,133],[[50,[[9,[60,13]]]]]],[[173,180],[[50,[[9,[60,13]]]]]],[[173,26],[[50,[[9,[60,13]]]]]],[[173,119],[[50,[[9,[60,13]]]]]],[173,[[50,[[9,[60,13]]]]]],[[173,1],[[50,[[9,[60,13]]]]]],[[173,1,180,1],[[50,[[9,[60,13]]]]]],[[173,[0,[140,32]]],[[50,[[9,[60,13]]]]]],[140,[[50,[51,[9,[60,13]]]]]],[[],50],[[],50],[[],50],[[],50],[[],52],[[],52]],"c":[619,768,777,829,831,971,974,1126,1225,1233,1240,1443,1447,1450,1453,1455,1457,1770,1771,1772,1773,1774,1775,1851,1853,1859,1864,1868,1871,1875,1877,2008,2009,2051],"p":[[15,"str"],[15,"bool"],[3,"DefaultModel"],[3,"Enforcer"],[8,"Send"],[3,"String"],[3,"Vec"],[8,"Future"],[3,"Box"],[3,"Pin"],[4,"Option"],[3,"DefaultRoleManager"],[3,"Global"],[3,"Path"],[8,"AsRef"],[8,"Sync"],[3,"FileAdapter"],[3,"NullAdapter"],[3,"MemoryAdapter"],[8,"RoleManager"],[6,"RwLock"],[3,"Shared"],[4,"EventData"],[6,"Result"],[3,"Assertion"],[15,"u64"],[3,"Filter"],[4,"EffectKind"],[3,"DefaultEffectStream"],[3,"DefaultEffector"],[4,"Event"],[8,"Sized"],[8,"EnforceArgs"],[3,"Formatter"],[6,"Result"],[8,"Adapter"],[15,"usize"],[8,"Hash"],[8,"BuildHasher"],[3,"LinkedHashMap"],[3,"HashMap"],[8,"Model"],[3,"LinkedHashSet"],[8,"Hasher"],[6,"MatchingFn"],[8,"TryIntoModel"],[8,"TryIntoAdapter"],[8,"EffectorStream"],[8,"Effector"],[4,"Result"],[3,"Dynamic"],[3,"TypeId"],[4,"ModelError"],[4,"RequestError"],[4,"PolicyError"],[4,"RbacError"],[3,"AdapterError"],[4,"Error"],[3,"ParseError"],[4,"EvalAltResult"],[3,"Error"],[3,"Demand"],[8,"Error"],[3,"FunctionMap"],[8,"Iterator"],[3,"AST"],[3,"Module"],[3,"Instant"],[3,"Duration"],[3,"ImmutableString"],[15,"char"],[3,"Position"],[8,"Into"],[3,"FnPtr"],[8,"AsFd"],[3,"BorrowedFd"],[15,"i32"],[8,"AsRawFd"],[3,"Expression"],[4,"Expr"],[4,"Stmt"],[15,"slice"],[3,"LazyCompact"],[3,"SmartString"],[19,"MaybeUninit"],[3,"TypeBuilder"],[3,"Engine"],[8,"FuncArgs"],[8,"Variant"],[8,"Clone"],[3,"NativeCallContext"],[8,"AsMut"],[3,"EvalContext"],[8,"Any"],[3,"Scope"],[3,"Locked"],[4,"FnNamespace"],[4,"LexError"],[4,"ParseErrorType"],[8,"Ord"],[4,"Ordering"],[8,"FnMut"],[8,"Default"],[8,"Deserializer"],[8,"Deserialize"],[3,"Weak"],[8,"PartialEq"],[8,"IntoIterator"],[3,"Error"],[3,"VarDefInfo"],[8,"Debug"],[8,"Display"],[3,"BTreeMap"],[3,"BTreeSet"],[3,"RangeInclusive"],[3,"RandomState"],[3,"HashSet"],[3,"Range"],[15,"u8"],[8,"ToOwned"],[4,"Cow"],[3,"CString"],[3,"CStr"],[3,"PathBuf"],[3,"OsStr"],[3,"OsString"],[15,"never"],[8,"PartialOrd"],[3,"PoisonError"],[4,"CallableFunction"],[3,"GlobalRuntimeState"],[3,"Caches"],[15,"u16"],[8,"FnOnce"],[15,"array"],[8,"Extend"],[3,"RwLockReadGuard"],[3,"DynamicReadLock"],[8,"Serializer"],[8,"Serialize"],[4,"FnAccess"],[8,"RegisterNativeFunction"],[8,"SendSync"],[8,"Fn"],[3,"AllocError"],[4,"TryLockError"],[3,"RwLockWriteGuard"],[3,"DynamicWriteLock"],[3,"SusLock"],[3,"ArithmeticPackage"],[3,"BasicArrayPackage"],[3,"BitFieldPackage"],[3,"BasicBlobPackage"],[3,"BasicFnPackage"],[3,"BasicIteratorPackage"],[3,"LanguageCorePackage"],[3,"LogicPackage"],[3,"BasicMapPackage"],[3,"BasicMathPackage"],[3,"CorePackage"],[3,"StandardPackage"],[3,"BasicStringPackage"],[3,"MoreStringPackage"],[3,"BasicTimePackage"],[8,"PluginFunction"],[3,"EncapsulatedEnviron"],[3,"Assume"],[3,"Discriminant"],[3,"ManuallyDrop"],[8,"Copy"],[3,"DynamicDeserializer"],[8,"Visitor"],[3,"DynamicSerializer"],[15,"f32"],[15,"f64"],[15,"i128"],[15,"i16"],[15,"i64"],[15,"i8"],[15,"u32"],[15,"u128"],[8,"CoreApi"],[8,"MgmtApi"],[8,"RbacApi"],[8,"InternalApi"],[8,"EventEmitter"],[8,"CustomType"],[8,"Package"],[13,"Pure"],[13,"Method"],[13,"Iterator"],[13,"Plugin"]]}\ +"casbin":{"doc":"","t":"INNNDNNNIDDDDNEIIIDDNCEEIIDDINIGDIIDNNINNNGINIIKLKLLLLLKLKLKLKLKLKLKLKKLLLLLLKLKKLLLLLLKLKLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKKLLLKKLLLKKLKKKLLLLLLLLLLLLLLLLLLLLLKLLLKLLLKLKLKLKLMKLKLKLKLKLKLKLLLLLLLLLALLLLLLLLLLLLLLLLLAMKLLLKLKLKLKLKLLLKLLLLLLLLKLKLKLLLLLLKLKLKLKKLLKLKKLLLKLKLOOKLKLLLLKLKLKLKLKLKLKLKLKLLLKLKLKLKLLLKLLLLLLLLLLLLLLLLKLKKLLLLMKKLLLLKKLLLLMKLKLLLLKLKLKLKLKLMMMAKLOMOLLKLKLKKLLLLLLKLLLLLKLKLKLKLKKLLLLLLKLKKLLLLLLKLAMKKLLLLKLKLKLKLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLKLKLLLLLLLLLLLLLLMDNNENNENNNNENNENENNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLFFFFLLLCCCCCCCCCCCCCCCCCCDGNNNGINNNDDNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEDNNNDSENNNNNEDNINSGDNDNENDNNSNNNNNNNNGNNNDNSSSDSRRDEDNNNINNSDDNSSSSSDSNNNNDNNNNNNNNNSLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOLLLLLALLLLLLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLFLLXXOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLMLLLLLLLLLLLLLLLLLLLLLLLLLLAKKLLLLLLLALLLLLLLLLLLLLLLLLLLLOLLFFLLLLALLLLLLLOOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLADLLLLLLLLLLLLLLLFLLLLLLLLFLLLLLLLLDDDDDDDDDDDDDDIDKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLEDDNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNENEENDNNNNDDNNIDNNNSNGDLLLLLLLLLLLLLLLLKLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLXXOLLLLLLLLLLLLLLLLLLLKLLLLLLLLLKLLLLLLLLLALLLLLLLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOLLLLLLLLLLLLLLLLLLLLMMMMMMMMSDIDSDTSSSLFFFMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLFFLLLLLLLLLLLLLLLLLFFLLLLLLLLLLLLLMFFFLLOLFMFFFLLLLLLLFFLLLLLFFLLLLLLLLLLLLLLLFMFLLLFLDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLL","n":["Adapter","AddPolicies","AddPolicy","Allow","Assertion","ClearCache","ClearCache","ClearPolicy","CoreApi","DefaultEffectStream","DefaultEffector","DefaultModel","DefaultRoleManager","Deny","EffectKind","Effector","EffectorStream","EnforceArgs","EnforceContext","Enforcer","Err","Error","Event","EventData","EventEmitter","EventKey","FileAdapter","Filter","IEnforcer","Indeterminate","InternalApi","MatchingFn","MemoryAdapter","MgmtApi","Model","NullAdapter","Ok","PolicyChange","RbacApi","RemoveFilteredPolicy","RemovePolicies","RemovePolicy","Result","RoleManager","SavePolicy","TryIntoAdapter","TryIntoModel","add_def","add_def","add_function","add_function","add_grouping_policies","add_grouping_policies","add_grouping_policy","add_grouping_policy","add_link","add_link","add_named_grouping_policies","add_named_grouping_policies","add_named_grouping_policy","add_named_grouping_policy","add_named_policies","add_named_policies","add_named_policy","add_named_policy","add_permission_for_user","add_permission_for_user","add_permissions_for_user","add_permissions_for_user","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies","add_policies_internal","add_policies_internal","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy","add_policy_internal","add_policy_internal","add_role_for_user","add_role_for_user","add_roles_for_user","add_roles_for_user","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build_incremental_role_links","build_incremental_role_links","build_incremental_role_links","build_incremental_role_links","build_incremental_role_links","build_role_links","build_role_links","build_role_links","build_role_links","build_role_links","cache_key","clear","clear","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clear_policy","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","default","delete_link","delete_link","delete_permission","delete_permission","delete_permission_for_user","delete_permission_for_user","delete_permissions_for_user","delete_permissions_for_user","delete_role","delete_role","delete_role_for_user","delete_role_for_user","delete_roles_for_user","delete_roles_for_user","delete_user","delete_user","e_type","emit","emit","enable_auto_build_role_links","enable_auto_build_role_links","enable_auto_save","enable_auto_save","enable_enforce","enable_enforce","enforce","enforce","enforce_mut","enforce_mut","enforce_with_context","enforce_with_context","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","error","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_file","from_str","function_map","g","get_adapter","get_adapter","get_all_actions","get_all_actions","get_all_grouping_policy","get_all_grouping_policy","get_all_named_actions","get_all_named_actions","get_all_named_objects","get_all_named_objects","get_all_named_roles","get_all_named_roles","get_all_named_subjects","get_all_named_subjects","get_all_objects","get_all_objects","get_all_policy","get_all_policy","get_all_roles","get_all_roles","get_all_subjects","get_all_subjects","get_cache_key","get_filtered_grouping_policy","get_filtered_grouping_policy","get_filtered_named_grouping_policy","get_filtered_named_grouping_policy","get_filtered_named_policy","get_filtered_named_policy","get_filtered_policy","get_filtered_policy","get_filtered_policy","get_filtered_policy","get_grouping_policy","get_grouping_policy","get_hash","get_implicit_permissions_for_user","get_implicit_permissions_for_user","get_implicit_roles_for_user","get_implicit_roles_for_user","get_implicit_users_for_permission","get_implicit_users_for_permission","get_model","get_model","get_model","get_model","get_mut_adapter","get_mut_adapter","get_mut_model","get_mut_model","get_mut_model","get_mut_model","get_mut_policy","get_named_grouping_policy","get_named_grouping_policy","get_named_policy","get_named_policy","get_or_err","get_or_err_with_context","get_permissions_for_user","get_permissions_for_user","get_policy","get_policy","get_policy","get_policy","get_policy","get_role_manager","get_role_manager","get_roles","get_roles","get_roles_for_user","get_roles_for_user","get_users","get_users","get_users_for_role","get_users_for_role","get_values_for_field_in_policy","get_values_for_field_in_policy","has_auto_build_role_links_enabled","has_auto_build_role_links_enabled","has_auto_save_enabled","has_auto_save_enabled","has_grouping_named_policy","has_grouping_named_policy","has_grouping_policy","has_grouping_policy","has_link","has_link","has_named_policy","has_named_policy","has_permission_for_user","has_permission_for_user","has_policy","has_policy","has_policy","has_policy","has_role_for_user","has_role_for_user","hash","into","into","into","into","into","into","into","into","into","into","into","into","into","into","is_enabled","is_enabled","is_filtered","is_filtered","is_filtered","is_filtered","is_filtered","is_filtered","key","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_filtered_policy","load_policy","load_policy","load_policy","load_policy","load_policy","load_policy","m_type","matching_fn","matching_fn","new","new","new","new","new","new_raw","new_raw","new_stream","new_stream","next","next","off","off","on","on","p","p_type","policy","prelude","push_effect","push_effect","push_index_if_explain","r_type","register_g_function","remove_filtered_grouping_policy","remove_filtered_grouping_policy","remove_filtered_named_grouping_policy","remove_filtered_named_grouping_policy","remove_filtered_named_policy","remove_filtered_named_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy","remove_filtered_policy_internal","remove_filtered_policy_internal","remove_grouping_policies","remove_grouping_policies","remove_grouping_policy","remove_grouping_policy","remove_named_grouping_policies","remove_named_grouping_policies","remove_named_grouping_policy","remove_named_grouping_policy","remove_named_policies","remove_named_policies","remove_named_policy","remove_named_policy","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies","remove_policies_internal","remove_policies_internal","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy","remove_policy_internal","remove_policy_internal","rhai","rm","save_policy","save_policy","save_policy","save_policy","save_policy","save_policy","set_adapter","set_adapter","set_effector","set_effector","set_model","set_model","set_role_manager","set_role_manager","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","tokens","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_adapter","try_into_adapter","try_into_adapter","try_into_adapter","try_into_model","try_into_model","try_into_vec","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value","AdapterError","AdapterError","E","Error","IoError","M","ModelError","ModelError","NotFound","Other","P","PolicyError","PolicyError","R","RbacError","RbacError","RequestError","RequestError","RhaiError","RhaiParseError","UnmatchPolicyDefinition","UnmatchRequestDefinition","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","source","to_string","to_string","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FunctionMap","add_function","borrow","borrow_mut","default","from","get_functions","into","key_match","key_match2","key_match3","regex_match","try_from","try_into","type_id","CoreApi","DefaultModel","Enforcer","Event","EventData","EventEmitter","FileAdapter","Filter","IEnforcer","InternalApi","MemoryAdapter","MgmtApi","Model","NullAdapter","RbacApi","Result","TryIntoAdapter","TryIntoModel","AST","Array","AssignmentToConstant","AssignmentToInvalidLHS","BadInput","Blob","CustomType","DuplicatedProperty","DuplicatedSwitchCase","DuplicatedVariable","Dynamic","Engine","ErrorArithmetic","ErrorArrayBounds","ErrorAssignmentToConstant","ErrorBitFieldBounds","ErrorCustomSyntax","ErrorDataRace","ErrorDataTooLarge","ErrorDotExpr","ErrorFor","ErrorForbiddenVariable","ErrorFunctionNotFound","ErrorInFunctionCall","ErrorInModule","ErrorIndexNotFound","ErrorIndexingType","ErrorMismatchDataType","ErrorMismatchOutputType","ErrorModuleNotFound","ErrorNonPureMethodCallOnConstant","ErrorParsing","ErrorPropertyNotFound","ErrorRuntime","ErrorStackOverflow","ErrorStringBounds","ErrorSystem","ErrorTerminated","ErrorTooManyModules","ErrorTooManyOperations","ErrorTooManyVariables","ErrorUnboundThis","ErrorVariableExists","ErrorVariableNotFound","EvalAltResult","EvalContext","Exit","ExprExpected","ExprTooDeep","Expression","FALSE","FnAccess","FnDuplicatedDefinition","FnDuplicatedParam","FnMissingBody","FnMissingName","FnMissingParams","FnNamespace","FnPtr","ForbiddenVariable","FuncArgs","Global","HUNDRED","INT","ImmutableString","ImproperSymbol","Instant","Internal","LexError","LiteralTooLarge","Locked","LoopBreak","LoopBreak","MILLION","MalformedCallExpr","MalformedCapture","MalformedChar","MalformedEscapeSequence","MalformedIdentifier","MalformedInExpr","MalformedIndexExpr","MalformedNumber","Map","MismatchedType","MissingSymbol","MissingToken","Module","ModuleUndefined","NEGATIVE_ONE","NEGATIVE_TWO","NONE","NativeCallContext","ONE","OP_CONTAINS","OP_EQUALS","ParseError","ParseErrorType","Position","Private","PropertyExpected","Public","RegisterNativeFunction","Reserved","Return","START","Scope","Shared","StringTooLong","TEN","THOUSAND","THREE","TRUE","TWO","TypeBuilder","UNIT","UnexpectedEOF","UnexpectedInput","UnknownOperator","UnterminatedString","VarDefInfo","VariableExists","VariableExpected","VariableUndefined","WrongDocComment","WrongExport","WrongFnDefinition","WrongSwitchCaseCondition","WrongSwitchDefaultCase","WrongSwitchIntegerCase","ZERO","add","add","add","add","add","add","add","add","add","add","add","add","add","add","add","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_assign","add_curry","allocator","as_bool","as_char","as_fd","as_immutable_string","as_int","as_ptr","as_raw_fd","as_ref","as_ref","as_ref","as_ref","as_ref","as_string","as_unit","assume_init","assume_init","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build_index","call","call_dynamic","call_fn","call_fn_dynamic_raw","call_fn_raw","call_level","call_level","call_native_fn","call_native_fn_raw","call_raw","call_within_context","cast","cause","checked_add","checked_duration_since","checked_sub","clear","clear","clear_id","clear_poison","clear_position","clear_source","clear_statements","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_cast","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_statements_only","clone_visible","cmp","cmp","cmp","cmp","cmp","combine","combine","combine_flatten","combine_with_exported_module","compare","compare","compare","compare","compare","config","contains","contains_fn","contains_indexed_global_functions","contains_iter","contains_qualified_fn","contains_qualified_iter","contains_sub_module","contains_var","count","curry","decrement_strong_count","decrement_strong_count_in","deep_scan","def_package","default","default","default","default","default","default","default","default","deref","deref","deref","description","deserialize","deserialize","deserialize","deserialize","downcast","downcast_unchecked","downgrade","drop","drop","duration_since","elapsed","empty","engine","engine","eq","eq","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","err_type","eval","eval_expression_tree","eval_expression_tree_raw","eval_file","eval_with_context","eval_with_context_raw","export_fn","export_module","exported_module","extend","extend","extend","fill_with","flatten","flatten_clone","flush","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fn_name","fn_name","format_map_as_json","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_array","from_blob","from_bool","from_char","from_int","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_map","from_raw","from_raw_in","from_str","from_str","from_timestamp","ge","get","get_custom_type","get_custom_type_display","get_custom_type_display_by_name","get_custom_type_raw","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_hash","get_literal_value","get_mut","get_mut","get_mut","get_mut_unchecked","get_string_value","get_sub_module","get_value","get_var","get_var_value","get_variable_name","gt","has_context","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","id","increment_strong_count","increment_strong_count_in","index","index_mut","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_array","into_blob","into_callable_function","into_deserializer","into_err","into_immutable_string","into_inner","into_inner","into_iter","into_iter","into_owned","into_raw","into_read_only","into_string","into_typed_array","is","is_array","is_beginning_of_line","is_blob","is_bool","is_catchable","is_char","is_const","is_const","is_constant","is_curried","is_empty","is_empty","is_global_namespace","is_indexed","is_int","is_iterable","is_map","is_module_namespace","is_none","is_poisoned","is_pseudo_error","is_read_only","is_read_vectored","is_string","is_system_exception","is_timestamp","is_unit","is_variant","is_write_vectored","iter","iter_curry","iter_curry_mut","iter_literal_variables","iter_raw","iter_sub_modules","iter_var","le","len","line","lt","make_mut","merge","merge","name","name","ne","nesting_level","nesting_level","new","new","new","new","new","new","new","new","new","new_const","new_cyclic","new_in","new_uninit","new_uninit_in","new_uninit_slice","new_uninit_slice_in","new_zeroed","new_zeroed_in","new_zeroed_slice","new_zeroed_slice_in","now","num_curried","num_params","on_debug","on_print","or_else","packages","param_types","parse","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","pin","pin_in","plugin","pop","position","position","position","position","position","provide","ptr_eq","ptr_eq","push","push_constant","push_constant_dynamic","push_dynamic","read","read","read_buf","read_lock","read_to_end","read_to_string","read_vectored","register_exported_fn","remove","rewind","run","run_file","saturating_duration_since","scope","scope_mut","seek","serde","serialize","serialize","serialize","serialize","set_curry","set_custom_type","set_custom_type_raw","set_exported_fn","set_exported_global_fn","set_fn","set_getter_fn","set_getter_setter_fn","set_id","set_indexer_get_fn","set_indexer_get_set_fn","set_indexer_set_fn","set_iter","set_iter_result","set_iterable","set_iterable_result","set_iterator","set_iterator_result","set_native_fn","set_or_push","set_position","set_raw_fn","set_setter_fn","set_source","set_sub_module","set_tag","set_value","set_var","source","source","source","source","strong_count","sub","sub","sub","sub","sub","sub","sub","sub","sub","sub","sub_assign","sub_assign","sub_assign","sub_assign","sub_assign","sub_assign","tag","tag","tag","tag_mut","take","take_position","this_ptr","this_ptr_mut","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","try_cast","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_new","try_new_in","try_new_uninit","try_new_uninit_in","try_new_zeroed","try_new_zeroed_in","try_pin","try_pin_in","try_read","try_unwrap","try_write","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_name","unwrap_inner","unwrap_or_clone","update_fn_namespace","weak_count","will_shadow","will_shadow_other_variables","with_capacity","with_capacity","with_fn","with_get","with_get_result","with_get_set","with_indexer_get","with_indexer_get_result","with_indexer_get_set","with_indexer_set","with_indexer_set_result","with_name","with_result_fn","with_set","with_set_result","write","write","write_lock","write_vectored","hashing","OnceCell","borrow","borrow_mut","clone","clone_from","clone_into","default","eq","equivalent","equivalent","equivalent","fmt","from","from","from","get","get_ahash_seed","get_mut","get_or_init","get_or_try_init","get_unchecked","into","into_inner","new","set","set_ahash_seed","take","to_owned","try_from","try_insert","try_into","type_id","wait","with_value","ArithmeticPackage","BasicArrayPackage","BasicBlobPackage","BasicFnPackage","BasicIteratorPackage","BasicMapPackage","BasicMathPackage","BasicStringPackage","BasicTimePackage","BitFieldPackage","CorePackage","LanguageCorePackage","LogicPackage","MoreStringPackage","Package","StandardPackage","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","as_shared_module","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","init_engine","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","register_into_engine","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","CallableFunction","Dynamic","Engine","Err","ErrorArithmetic","ErrorArrayBounds","ErrorAssignmentToConstant","ErrorBitFieldBounds","ErrorCustomSyntax","ErrorDataRace","ErrorDataTooLarge","ErrorDotExpr","ErrorFor","ErrorForbiddenVariable","ErrorFunctionNotFound","ErrorInFunctionCall","ErrorInModule","ErrorIndexNotFound","ErrorIndexingType","ErrorMismatchDataType","ErrorMismatchOutputType","ErrorModuleNotFound","ErrorNonPureMethodCallOnConstant","ErrorParsing","ErrorPropertyNotFound","ErrorRuntime","ErrorStackOverflow","ErrorStringBounds","ErrorSystem","ErrorTerminated","ErrorTooManyModules","ErrorTooManyOperations","ErrorTooManyVariables","ErrorUnboundThis","ErrorVariableExists","ErrorVariableNotFound","EvalAltResult","Exit","FnAccess","FnNamespace","Global","ImmutableString","Internal","Iterator","LoopBreak","Method","Module","NativeCallContext","Ok","Plugin","PluginFunction","Position","Private","Public","Pure","RAW","Return","RhaiResult","TypeId","access","allow_if_expression","allow_loop_expressions","allow_looping","allow_shadowing","allow_statement_expression","allow_switch_expression","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build_type","call","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","combine_with_exported_module","compact_script","compare","compare","compile","compile_expression","compile_expression_with_scope","compile_file","compile_file_with_scope","compile_scripts_with_scope","compile_with_scope","const_empty_string","consume","consume_ast","consume_ast_with_scope","consume_file","consume_file_with_scope","consume_with_scope","default","default_tag","default_tag_mut","deserialize","disable_symbol","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","eval","eval_ast","eval_ast_with_scope","eval_expression","eval_expression_with_scope","eval_file","eval_file_with_scope","eval_with_scope","export_fn","export_module","exported_module","fail_on_invalid_map_property","fast_operators","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","get_encapsulated_environ","get_hash","get_hash","get_iter_fn","get_native_fn","get_plugin_fn","has_context","has_context","hash","hash","into","into","into","into","is_iter","is_method","is_method_call","is_native","is_plugin_fn","is_private","is_public","is_pure","is_pure","is_script","is_symbol_disabled","map_type_name","mem","new","new_raw","of","on_debug","on_def_var","on_print","on_var","parse_json","partial_cmp","partial_cmp","register_custom_operator","register_custom_syntax","register_custom_syntax_raw","register_custom_syntax_with_state_raw","register_exported_fn","register_fn","register_get","register_get_result","register_get_set","register_global_module","register_indexer_get","register_indexer_get_result","register_indexer_get_set","register_indexer_set","register_indexer_set_result","register_iterator","register_iterator_result","register_raw_fn","register_result_fn","register_set","register_set_result","register_type","register_type_with_name","register_type_with_name_raw","run","run_ast","run_ast_with_scope","run_file","run_file_with_scope","run_with_scope","serialize","set_allow_if_expression","set_allow_loop_expressions","set_allow_looping","set_allow_shadowing","set_allow_statement_expression","set_allow_switch_expression","set_default_tag","set_exported_fn","set_exported_global_fn","set_fail_on_invalid_map_property","set_fast_operators","set_strict_variables","strict_variables","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","func","func","func","func","has_context","has_context","is_pure","is_pure","ALIGNMENT","Assume","BikeshedIntrinsicFrom","Discriminant","LIFETIMES","ManuallyDrop","MaybeUninit","NOTHING","SAFETY","VALIDITY","add","align_of","align_of_val","align_of_val_raw","alignment","and","array_assume_init","as_bytes","as_bytes_mut","as_mut_ptr","as_ptr","assume_init","assume_init_drop","assume_init_mut","assume_init_read","assume_init_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","but_not","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","cmp","compare","copy","default","deref","deref_mut","discriminant","drop","drop","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","forget","forget_unsized","from","from","from","from","get_hash","get_hash","hash","hash","into","into","into","into","into_inner","lifetimes","min_align_of","min_align_of_val","needs_drop","new","new","offset_of","partial_cmp","replace","safety","size_of","size_of_val","size_of_val_raw","slice_as_bytes","slice_as_bytes_mut","slice_as_mut_ptr","slice_as_ptr","slice_assume_init_mut","slice_assume_init_ref","sub","swap","take","take","to_owned","to_owned","to_owned","to_owned","transmute","transmute_copy","transpose","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","uninit","uninit_array","uninitialized","validity","variant_count","write","write_slice","write_slice_cloned","zeroed","zeroed","DynamicDeserializer","DynamicSerializer","borrow","borrow","borrow_mut","borrow_mut","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_i128","deserialize_i16","deserialize_i32","deserialize_i64","deserialize_i8","deserialize_identifier","deserialize_ignored_any","deserialize_map","deserialize_newtype_struct","deserialize_option","deserialize_seq","deserialize_str","deserialize_string","deserialize_struct","deserialize_tuple","deserialize_tuple_struct","deserialize_u128","deserialize_u16","deserialize_u32","deserialize_u64","deserialize_u8","deserialize_unit","deserialize_unit_struct","end","end","end","end","end","from","from","from_dynamic","into","into","new","new","serialize_bool","serialize_bytes","serialize_char","serialize_element","serialize_element","serialize_entry","serialize_f32","serialize_f64","serialize_field","serialize_field","serialize_i128","serialize_i16","serialize_i32","serialize_i64","serialize_i8","serialize_key","serialize_map","serialize_newtype_struct","serialize_newtype_variant","serialize_none","serialize_seq","serialize_some","serialize_str","serialize_struct","serialize_struct_variant","serialize_tuple","serialize_tuple_struct","serialize_tuple_variant","serialize_u128","serialize_u16","serialize_u32","serialize_u64","serialize_u8","serialize_unit","serialize_unit_struct","serialize_unit_variant","serialize_value","to_dynamic","try_from","try_from","try_into","try_into","type_id","type_id"],"q":[[0,"casbin"],[500,"casbin::error"],[591,"casbin::function_map"],[606,"casbin::prelude"],[624,"casbin::rhai"],[1508,"casbin::rhai::config"],[1509,"casbin::rhai::config::hashing"],[1543,"casbin::rhai::packages"],[1743,"casbin::rhai::plugin"],[1979,"casbin::rhai::plugin::CallableFunction"],[1987,"casbin::rhai::plugin::mem"],[2122,"casbin::rhai::serde"],[2215,"alloc::string"],[2216,"alloc::vec"],[2217,"core::future::future"],[2218,"alloc::boxed"],[2219,"core::pin"],[2220,"core::marker"],[2221,"core::option"],[2222,"alloc::alloc"],[2223,"std::path"],[2224,"core::convert"],[2225,"core::marker"],[2226,"core::marker"],[2227,"core::fmt"],[2228,"core::hash"],[2229,"std::collections::hash::map"],[2230,"ritelinked::set"],[2231,"core::hash"],[2232,"std::io::error"],[2233,"core::error"],[2234,"core::iter::traits::iterator"],[2235,"core::time"],[2236,"core::convert"],[2237,"std::os::fd::owned"],[2238,"std::os::fd::owned"],[2239,"rhai::ast::expr"],[2240,"rhai::ast::stmt"],[2241,"smartstring::config"],[2242,"smartstring"],[2243,"core::clone"],[2244,"rhai::types::variant"],[2245,"core::convert"],[2246,"core::cmp"],[2247,"core::cmp"],[2248,"core::default"],[2249,"serde::de"],[2250,"serde::de"],[2251,"core::iter::traits::collect"],[2252,"std::fs"],[2253,"core::fmt"],[2254,"core::ops::range"],[2255,"std::collections::hash::map"],[2256,"alloc::collections::btree::set"],[2257,"rhai::eval::global_state"],[2258,"alloc::ffi::c_str"],[2259,"core::ffi::c_str"],[2260,"std::ffi::os_str"],[2261,"std::ffi::os_str"],[2262,"alloc::borrow"],[2263,"std::sync::poison"],[2264,"rhai::eval::cache"],[2265,"core::ops::function"],[2266,"core::iter::traits::collect"],[2267,"std::io::readbuf"],[2268,"rhai::types::dynamic"],[2269,"std::io"],[2270,"std::io"],[2271,"serde::ser"],[2272,"core::alloc"],[2273,"core::marker"]],"d":["","","","","","","","","","","","","","","","","","","","Enforcer is the main interface for authorization …","Contains the error value","","","","","","","","","","","","","","","","Contains the success value","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Enforce decides whether a “subject” can access a “…","","","","Enforce decides whether a “subject” can access a “…","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","AdapterError error represents any type of errors in adapter…","","","General casbin error","","","ModelError represents any type of errors in model …","","","","","PolicyError represents any type of errors in policy","","","RBAC error represents any type of errors in RBAC role …","","RequestError represents any type of errors in coming …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","Compiled AST (abstract syntax tree) of a Rhai script.","Variable-sized array of Dynamic values.","Assignment to an a constant variable. Wrapped value is the …","Assignment to an inappropriate LHS (left-hand-side) …","Error in the script text. Wrapped value is the lex error.","Variable-sized array of u8 values (byte array).","Trait to build the API of a custom type for use with an …","A map definition has duplicated property names. Wrapped …","A switch case is duplicated.","A variable name is duplicated. Wrapped value is the …","Dynamic type containing any value.","Rhai main scripting engine.","Arithmetic error encountered. Wrapped value is the error …","Array access out-of-bounds. Wrapped values are the current …","Assignment to a constant variable. Wrapped value is the …","Bit-field indexing out-of-bounds. Wrapped values are the …","Error encountered for a custom syntax. Wrapped values are …","Data race detected when accessing a variable. Wrapped …","Data value over maximum size limit. Wrapped value is the …","Inappropriate property access. Wrapped value is the …","The for statement encounters a type that is not iterable.","Forbidden variable name. Wrapped value is the variable …","Call to an unknown function. Wrapped value is the function …","An error has occurred inside a called function. Wrapped …","An error has occurred while loading a module. Wrapped …","Access of an invalid index. Wrapped value is the index …","Trying to index into a type that has no indexer function …","Data is not of the required type. Wrapped values are the …","Returned type is not the same as the required output type. …","Usage of an unknown module. Wrapped value is the module …","Calling a non-pure method on a constant. Wrapped value is …","Syntax error.","Access of an unknown object map property. Wrapped value is …","Run-time error encountered. Wrapped value is the error …","Call stack over maximum limit.","String indexing out-of-bounds. Wrapped values are the …","System error. Wrapped values are the error message and the …","The script is prematurely terminated. Wrapped value is the …","Modules over maximum limit.","Number of operations over maximum limit.","Number of variables over maximum limit.","Access to this that is not bound.","Shadowing of an existing variable disallowed. Wrapped …","Access of an unknown variable. Wrapped value is the …","Evaluation result.","Context of a script evaluation process.","Not an error: Value returned from a script via the exit …","Missing an expression. Wrapped value is the expression …","Expression exceeding the maximum levels of complexity.","An expression sub-tree in an AST.","A Dynamic containing a false.","A type representing the access mode of a function.","Defining a function with a name that conflicts with an …","A function definition has duplicated parameters. Wrapped …","A function definition is missing the body. Wrapped value …","Missing a function name after the fn keyword.","A function definition is missing the parameters list. …","A type representing the namespace of a function.","A general function pointer, which may carry additional …","Forbidden variable name. Wrapped value is the variable …","Trait that parses arguments to a function call.","Expose to global namespace.","A Dynamic containing the integer 100.","The system integer type. It is defined as i32 since the …","The system immutable string type.","Bad symbol encountered when tokenizing the script text.","A measurement of a monotonically nondecreasing clock. …","Module namespace only.","Error encountered when tokenizing the script text.","Literal exceeding the maximum size. Wrapped values are the …","A reader-writer lock","Breaking out of loops - not an error if within a loop. The …","Break statement not inside a loop.","A Dynamic containing the integer 1,000,000.","An expression in function call arguments () has syntax …","A capturing has syntax error. Wrapped value is the error …","An character literal is in an invalid format.","An string/character/numeric escape sequence is in an …","An identifier is in an invalid format.","An expression in an in expression has syntax error. …","An expression in indexing brackets [] has syntax error. …","An numeric literal is in an invalid format.","A dictionary of Dynamic values with string keys.","An expression is of the wrong type. Wrapped values are the …","Expecting a particular symbol but not finding one. Wrapped …","Expecting a particular token but not finding one. Wrapped …","A module which may contain variables, sub-modules, …","An imported module is not found.","A Dynamic containing the integer -1.","A Dynamic containing the integer -2.","A Position representing no position.","Context of a native Rust function call.","A Dynamic containing the integer 1.","Standard containment testing function.","Standard equality comparison operator.","Error when parsing a script.","Error encountered when parsing a script.","A location (line number + character position) in the input …","Private function.","Missing a property name for custom types and maps.","Public function.","Trait to register custom Rust functions.","An identifier is a reserved symbol.","Not an error: Value returned from a script via the return …","A Position representing the first position.","Type containing information about the current scope. …","A thread-safe reference-counting pointer. ‘Arc’ stands …","An identifier or string literal is longer than the maximum …","A Dynamic containing the integer 10.","A Dynamic containing the integer 1,000.","A Dynamic containing the integer 3.","A Dynamic containing a true.","A Dynamic containing the integer 2.","Builder to build the API of a custom type for use with an …","A Dynamic containing a ().","The script ends prematurely.","An unexpected symbol is encountered when tokenizing the …","An unknown operator is encountered. Wrapped value is the …","A string literal is not terminated before a new-line or …","Information on a variable definition.","A variable is already defined.","Missing a variable name after the let, const, for or catch …","A variable is not found.","Defining a doc-comment in an appropriate place (e.g. not …","Export statement not at global level.","Defining a function fn in an appropriate place (e.g. …","The case condition of a switch statement is not …","The default case of a switch statement is in an …","A numeric case of a switch statement is in an appropriate …","A Dynamic containing the integer zero.","","","","Panics","","","","","","","","","","","","","","","","","","","","","Add a new curried argument.","Returns a reference to the underlying allocator.","Cast the Dynamic as a bool. Returns the name of the actual …","Cast the Dynamic as a char. Returns the name of the actual …","","Convert the Dynamic into an ImmutableString and return it. …","Cast the Dynamic as the system integer type INT. Returns …","Provides a raw pointer to the data.","","","","","","","Convert the Dynamic into a String and return it. If there …","Cast the Dynamic as a unit (). Returns the name of the …","Converts to Arc<T>.","Converts to Arc<[T]>.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Builds the custom type for use with the Engine.","Scan through all the sub-modules in the Module and build a …","Call the function pointer with curried arguments (if any). …","Call the function pointer with curried arguments (if any). …","Call a function inside the call context with the provided …","Call a function inside the call context.","Call a function (native Rust or scripted) inside the call …","The current nesting level of function calls.","Current nesting level of function calls.","Call a registered native Rust function inside the call …","Call a registered native Rust function inside the call …","Call the function pointer with curried arguments (if any). …","Call the function pointer with curried arguments (if any). …","Convert the Dynamic value into a specific type.","","Returns Some(t) where t is the time self + duration if t …","Returns the amount of time elapsed from another instant to …","Returns Some(t) where t is the time self - duration if t …","Clear the Module.","Empty the Scope.","Clear the ID of the Module.","Clear the poisoned state from a lock","Remove the position information from this error.","Clear the source.","Clear all statements in the AST, leaving only function …","Clone the Dynamic value.","","","Makes a clone of the Arc pointer.","","","","","","","","","","","","Clone the Dynamic value and convert it into a specific …","","","","","","","","","","","","","","","","Clone the AST’s script statements into a new AST. No …","Clone the Scope, keeping only the last instances of each …","Comparison for two Arcs.","","","","","Combine one AST with another. The second AST is consumed.","Combine another Module into this Module. The other Module …","Combine another Module into this Module. The other Module …","Macro to combine a plugin module into an existing module.","","","","","","Configuration for Rhai.","Does the Scope contain the entry?","Does the particular Rust function exist in the Module?","Does the Module contain indexed functions that have been …","Does a type iterator exist in the module?","Does the particular namespace-qualified function exist in …","Does a type iterator exist in the entire module tree?","Does a sub-module exist in the Module?","Does a variable exist in the Module?","Get the number of variables, functions and type iterators …","Get the curried arguments.","Decrements the strong reference count on the Arc<T> …","Decrements the strong reference count on the Arc<T> …","Recursively scan for Dynamic values within this Dynamic …","Macro that makes it easy to define a package (which is …","","","Creates a new Arc<T>, with the Default value for T.","Creates a new RwLock<T>, with the Default value for T.","","","","","","","","","","","","","Attempt to downcast the Arc<dyn Any + Send + Sync> to a …","Downcasts the Arc<dyn Any + Send + Sync> to a concrete …","Creates a new Weak pointer to this allocation.","","Drops the Arc.","Returns the amount of time elapsed from another instant to …","Returns the amount of time elapsed since this instant.","Create an empty AST.","The current Engine.","The current Engine.","Equality for two Arcs.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Get the type of this parse error.","Evaluate a string as a script, returning the result value …","Evaluate an expression tree within this evaluation context.","Evaluate an expression tree within this evaluation context.","Evaluate a script file, returning the result value or an …","Evaluate this expression tree within an evaluation context.","Evaluate this expression tree within an evaluation context.","Attribute, when put on a Rust function, turns it into a …","Attribute, when put on a Rust module, turns it into a …","Macro to generate a Rhai Module from a plugin module …","","","","Polyfill this Module with another Module. Only items not …","Flatten the Dynamic.","Flatten the Dynamic and clone it.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Name of the function called.","Get the name of the function.","Return the JSON representation of an object map.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Create a Dynamic from any type. A Dynamic value is simply …","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Converts a CString into an Arc<CStr> by moving the CString …","Move a boxed object to a new, reference-counted allocation.","Converts a [T; N] into an Arc<[T]>.","Returns the argument unchanged.","","Copies the string into a newly allocated Arc<OsStr>.","Converts a T into an Arc<T>","Converts an atomically reference-counted string slice into …","Converts an OsString into an Arc<OsStr> by moving the …","Create an atomically reference-counted pointer from a …","Allocate a reference-counted slice and move v’s items …","Converts a &CStr into a Arc<CStr>, by copying the contents …","Allocate a reference-counted str and copy v into it.","Converts a PathBuf into an Arc<Path> by moving the PathBuf …","Allocate a reference-counted str and copy v into it.","Allocate a reference-counted slice and fill it by cloning v…","Converts a Path into an Arc by copying the Path data into …","","Returns the argument unchanged.","Creates a new instance of an RwLock<T> which is unlocked. …","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a Dynamic from an Array.","Create a Dynamic from a Blob.","Create a new Dynamic from a bool.","Create a new Dynamic from a char.","Create a new Dynamic from an INT.","","Takes each element in the Iterator and collects it into an …","","","","","","","","Create a Dynamic from a Map.","Constructs an Arc<T> from a raw pointer.","Constructs an Arc<T, A> from a raw pointer.","","","Create a new Dynamic from an Instant.","‘Greater than or equal to’ comparison for two Arcs.","Get a reference to an entry in the Scope.","Get the display name of a registered custom type.","Get the display name of a registered custom type.","Get the display name of a registered custom type.","Get a registered custom type .","","","","","","","","","","","","","Get the value of this expression if it is a literal …","Returns a mutable reference into the given Arc, if there …","Returns a mutable reference to the underlying data.","Get a mutable reference to the value of an entry in the …","Returns a mutable reference into the given Arc, without …","Get the value of this expression if it is a variable name …","Get a sub-module in the Module.","Get the value of an entry in the Scope, starting from the …","Get a Module variable as a Dynamic.","Get the value of a Module variable.","If this expression is a variable name, return it. …","Greater-than comparison for two Arcs.","Is there a NativeCallContext parameter for this function?","Hash the Dynamic value.","","","","","","","","","","","","Get the ID of the Module, if any.","Increments the strong reference count on the Arc<T> …","Increments the strong reference count on the Arc<T> …","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Convert the Dynamic into an Array. Returns the name of the …","Convert the Dynamic into a Blob. Returns the name of the …","Convert this function into a CallableFunction.","","Convert a LexError into a ParseError.","Convert the Dynamic into an ImmutableString. Returns the …","Returns the inner value, if the Arc has exactly one strong …","Consumes this RwLock, returning the underlying data.","","","Consume the ImmutableString and convert it into a String.","Consumes the Arc, returning the wrapped pointer.","Make this Dynamic read-only (i.e. a constant).","Convert the Dynamic into a String. If there are other …","Convert the Dynamic into a Vec. Returns the name of the …","Is the value held by this Dynamic a particular type?","Return true if the Dynamic holds an Array.","Is this Position at the beginning of a line?","Return true if the Dynamic holds a Blob.","Return true if the Dynamic holds a bool.","Can this error be caught?","Return true if the Dynamic holds a char.","true if the statement is const, otherwise it is let.","true if the statement is const, otherwise it is let.","Check if the named entry in the Scope is constant.","Is the function pointer curried?","Returns true if this Module contains no items.","Returns true if this Scope contains no variables.","Is this a global namespace?","Is the Module indexed?","Return true if the Dynamic holds the system integer type …","Register a type iterator. This is an advanced API.","Return true if the Dynamic holds a Map.","Is this a module namespace?","Is there no Position?","Determines whether the lock is poisoned.","Is this a pseudo error? A pseudo error is one that does …","Is this Dynamic read-only?","","Return true if the Dynamic holds an ImmutableString.","Is this error a system exception?","Return true if the Dynamic holds a timestamp.","Return true if the Dynamic holds a ().","Does this Dynamic hold a variant data type instead of one …","","Get an iterator to entries in the Scope. Shared values are …","Iterate the curried arguments.","Mutably-iterate the curried arguments.","Extract all top-level literal constant and/or variable …","Get an iterator to entries in the Scope. Shared values are …","Get an iterator to the sub-modules in the Module.","Get an iterator to the variables in the Module.","‘Less than or equal to’ comparison for two Arcs.","Get the number of entries inside the Scope.","Get the line number (1-based), or None if there is no …","Less-than comparison for two Arcs.","Makes a mutable reference into the given Arc.","Merge two AST into one. Both AST’s are untouched and a …","Merge another Module into this Module.","Name of the variable to be defined.","Name of the variable to be defined.","Inequality for two Arcs.","The current nesting level, with zero being the global …","The current nesting level, with zero being the global …","Create a new EvalContext.","Create a new NativeCallContext.","Constructs a new Arc<T>.","Creates a new instance of an RwLock<T> which is unlocked.","Create a new Module.","Create a new function pointer.","Create a new ImmutableString.","Create a new Position.","Create a new Scope.","Create a new Position.","Constructs a new Arc<T> while giving you a Weak<T> to the …","Constructs a new Arc<T> in the provided allocator.","Constructs a new Arc with uninitialized contents.","Constructs a new Arc with uninitialized contents in the …","Constructs a new atomically reference-counted slice with …","Constructs a new atomically reference-counted slice with …","Constructs a new Arc with uninitialized contents, with the …","Constructs a new Arc with uninitialized contents, with the …","Constructs a new atomically reference-counted slice with …","Constructs a new atomically reference-counted slice with …","Returns an instant corresponding to “now”.","Get the number of curried arguments.","Get the number of parameters for this function.","Debug-print this custom type.","Pretty-print this custom type.","Returns an fallback Position if it is NONE?","Module containing all built-in packages available to Rhai, …","Get the type ID’s of this function’s parameters.","Parse function call arguments into a container.","Partial comparison for two Arcs.","","","","","Constructs a new Pin<Arc<T>>. If T does not implement Unpin…","Constructs a new Pin<Arc<T, A>> in the provided allocator. …","Module defining macros for developing plugins.","Remove the last entry from the Scope.","Get the position of this expression.","Position of the function call.","Get the position of this error.","Get the position of this parse error.","Get the character position (1-based), or None if at …","","Returns true if the two Arcs point to the same allocation …","Returns true if the two ImmutableString’s point to the …","Add (push) a new entry to the Scope.","Add (push) a new constant to the Scope.","Add (push) a new constant with a Dynamic value to the …","Add (push) a new Dynamic entry to the Scope.","","Locks this RwLock with shared read access, blocking the …","","Get a reference of a specific type to the Dynamic. Casting …","","","","Macro to register a plugin function (defined via …","Remove the last entry in the Scope by the specified name …","Truncate (rewind) the Scope to a previous size.","Evaluate a string as a script.","Evaluate a file.","Returns the amount of time elapsed from another instant to …","The current Scope.","Get a mutable reference to the current Scope.","","(serde) Serialization and deserialization support for serde…","","","","","Set curried arguments to the function pointer.","Map a custom type to a friendly display name.","Map a custom type to a friendly display name.","Macro to register a plugin function into a Rhai Module.","Macro to register a plugin function into a Rhai Module and …","Set a native Rust function into the Module, returning a u64…","Set a Rust getter function taking one mutable parameter, …","Set a pair of Rust getter and setter functions into the …","Set the ID of the Module.","Set a Rust index getter taking two parameters (the first …","Set a pair of Rust index getter and setter functions into …","Set a Rust index setter taking three parameters (the first …","Set a type iterator into the Module.","Set a fallible type iterator into the Module.","Set a type iterator into the Module.","Set a fallible type iterator into the Module.","Set an iterator type into the Module as a type iterator.","Set a iterator type into the Module as a fallible type …","Set a native Rust function into the Module, returning a u64…","Update the value of the named entry in the Scope if it …","Override the position of this error.","Set a native Rust function into the Module, returning a u64…","Set a Rust setter function taking two parameters (the …","Set the source.","Set a sub-module into the Module.","Attach arbitrary data to this Dynamic.","Update the value of the named entry in the Scope.","Set a variable into the Module.","The current source.","Get the source, if any.","The current source.","","Gets the number of strong (Arc) pointers to this …","","Returns the amount of time elapsed from another instant to …","","","","","","","","","","","","","","","Custom state kept in a Dynamic.","Get the arbitrary data attached to this Dynamic.","Custom state kept in a Dynamic.","Mutable reference to the custom state kept in a Dynamic.","Return this Dynamic, replacing it with Dynamic::UNIT.","Remove the position information from this error and return …","The current bound this pointer, if any.","Mutable reference to the current bound this pointer, if …","","","","","","","","","","","","","","","","","","","","","","","","","","Convert the Dynamic value into specific type.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Constructs a new Arc<T>, returning an error if allocation …","Constructs a new Arc<T, A> in the provided allocator, …","Constructs a new Arc with uninitialized contents, …","Constructs a new Arc with uninitialized contents, in the …","Constructs a new Arc with uninitialized contents, with the …","Constructs a new Arc with uninitialized contents, with the …","Constructs a new Pin<Arc<T>>, return an error if …","Constructs a new Pin<Arc<T, A>> in the provided allocator, …","Attempts to acquire this RwLock with shared read access.","Returns the inner value, if the Arc has exactly one strong …","Attempts to lock this RwLock with exclusive write access.","","","","Get the TypeId of the value held by this Dynamic.","","","","","","","","","","","","","","","","","","Get the name of the type of the value held by this Dynamic.","Unwrap this error and get the very base error.","If we have the only reference to T then unwrap it. …","Update the namespace of a registered function.","Gets the number of Weak pointers to this allocation.","Will the variable shadow an existing variable?","Will the variable shadow an existing variable?","Create a new Module with a pre-sized capacity for …","Create a new Scope with a particular capacity.","Register a custom function.","Register a getter function.","Register a fallible getter function.","Short-hand for registering both getter and setter …","Register an index getter.","Register an fallible index getter.","Short-hand for registering both index getter and setter …","Register an index setter.","Register an fallible index setter.","Set a pretty-print name for the type_of function.","Register a custom fallible function.","Register a setter function.","Register a fallible setter function.","","Locks this RwLock with exclusive write access, blocking …","Get a mutable reference of a specific type to the Dynamic. …","","Fixed hashing seeds for stable hashing.","A thread-safe cell which can be written to only once.","","","","","","","","","","","","Returns the argument unchanged.","","","Gets the reference to the underlying value.","Get the current hashing Seed.","Gets the mutable reference to the underlying value.","Gets the contents of the cell, initializing it with f if …","Gets the contents of the cell, initializing it with f if …","Get the reference to the underlying value, without …","Calls U::from(self).","Consumes the OnceCell, returning the wrapped value. Returns","Creates a new empty cell.","Sets the contents of this cell to value.","Set the hashing seed. This is used to hash functions etc.","Takes the value out of this OnceCell, moving it back to an …","","","Like set, but also returns a reference to the final cell …","","","Gets the reference to the underlying value, blocking the …","Creates a new initialized cell.","Basic arithmetic package.","Package of basic array utilities.","Package of basic BLOB utilities.","Package of basic function pointer utilities.","Package of basic range iterators","Package of basic object map utilities.","Basic mathematical package.","Package of basic string utilities (e.g. printing)","Package of basic timing utilities.","Package of basic bit-field utilities.","Core package containing basic facilities.","Package of core language features.","Package of basic logic operators.","Package of additional string utilities over …","Trait that all packages must implement.","Standard package containing all built-in features.","Get a reference to a shared module from this package.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Initialize the package. Functions should be registered …","","","","","","","","","","","","","","","","Initialize the package with an Engine.","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Create a new ArithmeticPackage","Create a new BasicArrayPackage","Create a new BitFieldPackage","Create a new BasicBlobPackage","Create a new BasicFnPackage","Create a new BasicIteratorPackage","Create a new LanguageCorePackage","Create a new LogicPackage","Create a new BasicMapPackage","Create a new BasicMathPackage","Create a new CorePackage","Create a new StandardPackage","Create a new BasicStringPackage","Create a new MoreStringPackage","Create a new BasicTimePackage","Register the package with an Engine.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","(internals) A type encapsulating a function callable by …","Dynamic type containing any value.","Rhai main scripting engine.","Contains the error value","Arithmetic error encountered. Wrapped value is the error …","Array access out-of-bounds. Wrapped values are the current …","Assignment to a constant variable. Wrapped value is the …","Bit-field indexing out-of-bounds. Wrapped values are the …","Error encountered for a custom syntax. Wrapped values are …","Data race detected when accessing a variable. Wrapped …","Data value over maximum size limit. Wrapped value is the …","Inappropriate property access. Wrapped value is the …","The for statement encounters a type that is not iterable.","Forbidden variable name. Wrapped value is the variable …","Call to an unknown function. Wrapped value is the function …","An error has occurred inside a called function. Wrapped …","An error has occurred while loading a module. Wrapped …","Access of an invalid index. Wrapped value is the index …","Trying to index into a type that has no indexer function …","Data is not of the required type. Wrapped values are the …","Returned type is not the same as the required output type. …","Usage of an unknown module. Wrapped value is the module …","Calling a non-pure method on a constant. Wrapped value is …","Syntax error.","Access of an unknown object map property. Wrapped value is …","Run-time error encountered. Wrapped value is the error …","Call stack over maximum limit.","String indexing out-of-bounds. Wrapped values are the …","System error. Wrapped values are the error message and the …","The script is prematurely terminated. Wrapped value is the …","Modules over maximum limit.","Number of operations over maximum limit.","Number of variables over maximum limit.","Access to this that is not bound.","Shadowing of an existing variable disallowed. Wrapped …","Access of an unknown variable. Wrapped value is the …","Evaluation result.","Not an error: Value returned from a script via the exit …","A type representing the access mode of a function.","A type representing the namespace of a function.","Expose to global namespace.","The system immutable string type.","Module namespace only.","An iterator function.","Breaking out of loops - not an error if within a loop. The …","A native Rust object method with the first argument passed …","A module which may contain variables, sub-modules, …","Context of a native Rust function call.","Contains the success value","A plugin function,","Trait implemented by a plugin function.","A location (line number + character position) in the input …","Private function.","Public function.","A pure native Rust function with all arguments passed by …","An empty raw Engine.","Not an error: Value returned from a script via the return …","Result of a Rhai function.","A TypeId represents a globally unique identifier for a …","Get the access mode.","Is if-expression allowed? Default is true.","Are loop expressions allowed? Default is true.","Is looping allowed? Default is true.","Is variables shadowing allowed? Default is true.","Is statement-expression allowed? Default is true.","Is switch expression allowed? Default is true.","","","","","","","","","Build the API of a custom type for use with the Engine.","Call the plugin function with the arguments provided.","","","","","","","","","Macro to combine a plugin module into an existing module.","Compact a script to eliminate insignificant whitespaces …","","","Compile a string into an AST, which can be used later for …","Compile a string containing an expression into an AST, …","Compile a string containing an expression into an AST …","Compile a script file into an AST, which can be used later …","Compile a script file into an AST using own scope, which …","When passed a list of strings, first join the strings into …","Compile a string into an AST using own scope, which can be …","Get an empty ImmutableString which refers to a shared …","Evaluate a string, but throw away the result and only …","Evaluate an AST, but throw away the result and only return …","Evaluate an AST with own scope, but throw away the result …","Evaluate a file, but throw away the result and only return …","Evaluate a file with own scope, but throw away the result …","Evaluate a string with own scope, but throw away the …","","Get the default value of the custom state for each …","Get a mutable reference to the default value of the custom …","","Disable a particular keyword or operator in the language.","","","","","","","","","Evaluate a string as a script, returning the result value …","Evaluate an AST, returning the result value or an error.","Evaluate an AST with own scope, returning the result value …","Evaluate a string containing an expression, returning the …","Evaluate a string containing an expression with own scope, …","Evaluate a script file, returning the result value or an …","Evaluate a script file with own scope, returning the …","Evaluate a string as a script with own scope, returning …","Attribute, when put on a Rust function, turns it into a …","Attribute, when put on a Rust module, turns it into a …","Macro to generate a Rhai Module from a plugin module …","Raise error if an object map property does not exist? …","Is fast operators mode enabled? Default is false.","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Get a reference to the shared encapsulated environment of …","","","Get a reference to an iterator function.","Get a shared reference to a native Rust function.","Get a shared reference to a plugin function.","Does this plugin function contain a NativeCallContext …","Is there a NativeCallContext parameter?","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Is this an iterator function?","Is this a native Rust method function?","Is this plugin function a method?","Is this a native Rust function?","Is this a plugin function?","Is this function private?","Is this function public?","Is this plugin function pure?","Is this a pure native Rust function?","Is this a script-defined function?","Is a particular keyword or operator disabled?","Pretty-print a type name.","Basic functions for dealing with memory.","Create a new Engine.","Create a new Engine with minimal built-in functions. It …","Returns the TypeId of the type this generic function has …","Override default action of debug (print to stdout using …","Provide a callback that will be invoked before the …","Override default action of print (print to stdout using …","Provide a callback that will be invoked before each …","Parse a JSON string into an object map.","","","Register a custom operator with a precedence into the …","Register a custom syntax with the Engine.","Register a custom syntax with the Engine.","Register a custom syntax with the Engine with custom …","Macro to register a plugin function (defined via …","Register a custom function with the Engine.","Register a getter function for a member of a registered …","Register a getter function for a member of a registered …","Short-hand for registering both getter and setter functions","Register a shared Module into the global namespace of …","Register an index getter for a custom type with the Engine.","Register an index getter for a custom type with the Engine.","Short-hand for registering both index getter and setter …","Register an index setter for a custom type with the Engine.","Register an index setter for a custom type with the Engine.","Register a type iterator for an iterable type with the …","Register a fallible type iterator for an iterable type …","Register a function of the Engine.","Register a custom fallible function with the Engine.","Register a setter function for a member of a registered …","Register a setter function for a member of a registered …","Register a custom type for use with the Engine. The type …","Register a custom type for use with the Engine, with a …","Register a custom type for use with the Engine, with a …","Evaluate a string as a script.","Evaluate an AST.","Evaluate an AST with own scope.","Evaluate a file.","Evaluate a file with own scope.","Evaluate a string as a script with own scope.","","Set whether if-expression is allowed.","Set whether loop expressions are allowed.","Set whether looping is allowed.","Set whether variables shadowing is allowed.","Set whether statement-expression is allowed.","Set whether switch expression is allowed.","Set the default value of the custom state for each …","Macro to register a plugin function into a Rhai Module.","Macro to register a plugin function into a Rhai Module and …","Set whether to raise error if an object map property does …","Set whether fast operators mode is enabled.","Set whether strict variables mode is enabled.","Is strict variables mode enabled? Default is false.","","","","","","","","","","","","","","","","","Shared function pointer.","Shared function pointer.","Shared function pointer.","Shared function pointer.","Does the function take a NativeCallContext parameter?","Does the function take a NativeCallContext parameter?","This is a dummy field and is not used.","Allow operating on constants?","Assume only that alignment conditions are met.","What transmutation safety conditions shall the compiler …","Are values of a type transmutable into values of another …","Opaque type representing the discriminant of an enum.","Assume only that lifetime conditions are met.","A wrapper to inhibit compiler from automatically calling T…","A wrapper type to construct uninitialized instances of T.","Do not assume that you have ensured any safety properties …","Assume only that safety conditions are met.","Assume only that dynamically-satisfiable validity …","","Returns the ABI-required minimum alignment of a type in …","Returns the ABI-required minimum alignment of the type of …","Returns the ABI-required minimum alignment of the type of …","When true, the compiler assumes that you are ensuring …","Assume both self and other_assumptions.","Extracts the values from an array of MaybeUninit …","Returns the contents of this MaybeUninit as a slice of …","Returns the contents of this MaybeUninit as a mutable …","Gets a mutable pointer to the contained value. Reading …","Gets a pointer to the contained value. Reading from this …","Extracts the value from the MaybeUninit<T> container. This …","Drops the contained value in place.","Gets a mutable (unique) reference to the contained value.","Reads the value from the MaybeUninit<T> container. The …","Gets a shared reference to the contained value.","","","","","","","","","Assume self, excepting other_assumptions.","","","","","","","","","","","Bitwise-copies a value.","","","","Returns a value uniquely identifying the enum variant in v.","Disposes of a value.","Manually drops the contained value. This is exactly …","","","","","","","","","","","","","","","","","Takes ownership and “forgets” about the value without …","Like forget, but also accepts unsized values.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Extracts the value from the ManuallyDrop container.","When true, the compiler assume that you are ensuring that …","Returns the ABI-required minimum alignment of a type in …","Returns the ABI-required minimum alignment of the type of …","Returns true if dropping values of type T matters.","Wrap a value to be manually dropped.","Creates a new MaybeUninit<T> initialized with the given …","Expands to the offset in bytes of a field from the …","","Moves src into the referenced dest, returning the previous …","When true, the compiler assumes that you have ensured that …","Returns the size of a type in bytes.","Returns the size of the pointed-to value in bytes.","Returns the size of the pointed-to value in bytes.","Returns the contents of this slice of MaybeUninit as a …","Returns the contents of this mutable slice of MaybeUninit …","Gets a mutable pointer to the first element of the array.","Gets a pointer to the first element of the array.","Assuming all the elements are initialized, get a mutable …","Assuming all the elements are initialized, get a slice to …","","Swaps the values at two mutable locations, without …","Replaces dest with the default value of T, returning the …","Takes the value from the ManuallyDrop<T> container out.","","","","","Reinterprets the bits of a value of one type as another …","Interprets src as having type &Dst, and then reads src …","Transposes a MaybeUninit<[T; N]> into a [MaybeUninit<T>; N]…","","","","","","","","","","","","","Creates a new MaybeUninit<T> in an uninitialized state.","Create a new array of MaybeUninit<T> items, in an …","Bypasses Rust’s normal memory-initialization checks by …","When true, the compiler assumes that you are ensuring that …","Returns the number of variants in the enum type T.","Sets the value of the MaybeUninit<T>.","Copies the elements from src to this, returning a mutable …","Clones the elements from src to this, returning a mutable …","Returns the value of type T represented by the all-zero …","Creates a new MaybeUninit<T> in an uninitialized state, …","Deserializer for Dynamic.","Serializer for Dynamic.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Deserialize a Dynamic value into a Rust type that …","Calls U::from(self).","Calls U::from(self).","Create a DynamicDeserializer from a reference to a Dynamic …","Create a DynamicSerializer from a Dynamic value.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Serialize a Rust type that implements serde::Serialize …","","","","","",""],"i":[0,24,24,29,0,32,24,24,0,0,0,0,0,29,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,29,0,0,0,0,0,0,25,32,0,24,24,24,0,0,24,0,0,44,3,190,5,191,191,191,191,21,13,191,5,191,5,191,5,191,5,192,5,192,5,44,38,15,19,20,191,191,3,193,5,44,38,15,19,20,191,191,3,193,5,192,5,192,5,15,19,5,35,13,20,28,29,30,31,32,24,26,3,15,19,5,35,13,20,28,29,30,31,32,24,26,3,44,190,5,26,3,44,190,5,26,3,34,21,13,44,38,190,15,19,5,20,3,28,29,30,24,26,3,28,29,30,24,26,3,20,31,26,3,21,13,192,192,192,5,192,192,192,5,192,5,192,5,192,5,35,194,5,190,5,190,5,190,5,190,5,190,5,190,5,29,32,29,29,29,32,32,32,0,24,15,19,5,35,13,20,28,29,30,31,32,24,26,3,3,3,0,28,190,5,191,191,191,5,191,5,191,5,191,5,191,5,191,191,191,5,191,191,191,191,35,191,191,191,5,191,5,44,191,191,3,191,191,32,192,5,192,5,192,5,44,190,5,3,190,5,44,190,5,3,26,191,5,191,5,0,0,192,5,44,191,191,26,3,190,5,21,13,192,5,21,13,192,5,44,3,190,5,190,5,191,5,191,191,21,13,191,5,192,5,44,191,191,3,192,5,32,15,19,5,35,13,20,28,29,30,31,32,24,26,3,190,5,38,190,15,19,5,20,26,38,190,15,19,5,20,38,190,15,19,5,20,35,21,13,190,15,5,35,13,190,5,51,31,50,30,194,5,194,5,28,35,26,0,50,30,0,35,0,191,191,191,5,191,5,44,38,15,19,20,191,191,3,193,5,191,191,191,191,191,5,191,5,191,5,191,5,44,38,15,19,20,191,191,3,193,5,44,38,15,19,20,191,191,3,193,5,0,26,38,190,15,19,5,20,190,5,190,5,190,5,190,5,28,29,30,24,26,3,24,26,15,19,5,35,13,20,28,29,30,31,32,24,26,3,15,19,5,35,13,20,28,29,30,31,32,24,26,3,49,15,19,20,48,3,34,15,19,5,35,13,20,28,29,30,31,32,24,26,3,26,0,60,55,0,60,55,0,60,58,55,55,0,60,55,0,60,0,60,60,60,57,56,55,56,57,58,59,60,55,56,57,58,59,60,55,55,56,56,57,57,58,58,59,59,60,60,55,56,57,58,59,60,60,60,60,60,60,60,60,60,55,56,57,58,59,60,60,55,56,57,58,59,60,55,56,57,58,59,60,55,56,57,58,59,60,55,56,57,58,59,60,0,65,65,65,65,65,65,65,0,0,0,0,65,65,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,101,101,0,0,101,101,101,0,0,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,0,0,63,101,101,0,53,0,101,101,101,101,101,0,0,101,0,99,53,0,0,100,0,99,0,101,0,63,101,53,101,101,100,100,100,101,101,100,0,101,101,101,0,101,53,53,73,0,53,0,0,0,0,0,149,101,149,0,101,63,73,0,0,100,53,53,53,53,53,0,53,101,100,101,100,0,101,101,101,101,101,101,101,101,101,53,67,68,68,69,71,71,71,71,71,71,71,71,71,71,73,67,68,69,71,71,71,71,71,73,75,23,53,53,23,53,53,23,23,81,67,23,71,71,53,53,23,23,89,95,53,81,81,67,67,93,23,23,98,99,68,69,63,75,71,71,71,100,101,62,73,97,102,89,95,53,81,67,93,23,98,99,68,69,63,75,71,100,101,62,73,97,102,195,68,75,75,93,93,93,95,93,93,93,75,75,53,23,69,69,69,68,97,68,98,63,67,67,53,81,67,23,99,68,69,75,71,100,101,62,73,97,102,53,53,81,67,23,99,68,69,75,71,100,101,62,73,97,102,67,97,23,99,69,71,73,67,68,68,0,23,99,69,71,73,0,97,68,68,68,68,68,68,68,68,75,23,23,53,0,53,67,23,98,68,71,73,97,81,23,71,23,53,98,71,97,23,23,23,89,23,69,69,67,95,93,23,99,69,71,100,101,62,73,23,23,23,99,99,99,69,69,69,71,71,71,100,100,100,101,101,101,62,62,62,73,73,73,62,0,95,95,0,81,81,0,0,0,75,97,97,68,53,53,23,53,53,81,67,93,23,23,23,98,99,68,69,63,63,75,75,71,71,100,100,101,101,62,62,73,73,97,97,102,93,75,0,89,95,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,81,81,67,93,93,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,98,98,98,99,68,69,63,63,63,63,75,71,71,71,71,71,71,71,100,101,101,62,73,97,102,53,53,53,53,53,53,23,71,71,71,71,71,97,97,53,23,23,53,71,53,23,97,68,68,68,68,53,23,99,69,75,71,100,101,62,73,97,102,81,23,98,97,23,81,68,97,68,68,81,23,151,53,23,99,69,75,71,100,101,62,73,97,102,68,23,23,75,75,89,95,53,81,67,93,23,98,99,68,69,63,75,71,100,101,62,73,97,102,53,53,151,53,100,53,23,98,97,97,71,23,53,53,53,53,53,73,53,53,63,53,102,102,97,75,68,97,99,68,53,89,53,99,73,98,63,53,23,53,63,53,53,53,23,97,75,75,67,97,68,68,23,97,73,23,23,67,68,102,102,23,102,102,95,93,23,98,68,75,71,73,97,73,23,23,23,23,23,23,23,23,23,23,69,75,151,89,89,73,0,151,91,23,99,69,71,73,23,23,0,97,81,93,63,62,73,23,23,71,97,97,97,97,23,98,23,53,23,23,23,0,97,97,0,0,69,95,95,23,0,53,98,71,97,75,68,68,0,0,68,68,68,68,68,68,68,68,68,68,68,68,68,68,97,63,68,68,67,68,53,97,68,95,67,93,23,23,69,69,71,71,71,71,71,71,71,71,69,71,71,71,71,71,95,53,93,95,53,63,95,95,53,81,67,23,99,68,69,75,71,100,101,62,73,97,102,53,23,63,75,71,100,101,62,73,97,53,89,95,53,81,67,93,23,23,98,99,68,69,63,75,75,71,100,101,62,73,97,102,89,95,53,81,67,93,23,98,99,68,69,63,75,71,100,101,62,73,97,102,23,23,23,23,23,23,23,23,98,23,98,89,95,53,53,81,67,93,23,98,99,68,69,63,75,71,100,101,62,73,97,102,53,63,23,68,23,102,102,68,97,89,89,89,89,89,89,89,89,89,89,89,89,89,23,98,53,23,0,0,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,0,157,157,157,157,157,157,157,157,0,157,157,157,157,157,157,157,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,196,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,196,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,196,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,196,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,0,0,0,197,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,0,63,0,0,99,0,99,134,63,134,0,0,197,134,0,0,149,149,134,90,63,0,0,134,90,90,90,90,90,90,90,149,134,54,90,149,134,54,90,173,149,134,54,149,134,54,149,54,0,90,149,54,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,149,90,149,54,149,149,149,54,54,54,90,90,90,90,90,90,90,90,0,0,0,90,90,90,149,134,134,54,90,149,134,134,134,54,134,149,54,134,134,134,173,134,149,54,90,149,134,54,134,134,173,134,134,149,149,173,134,134,90,90,0,90,90,54,90,90,90,90,90,149,54,90,90,90,90,0,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,149,90,90,90,90,90,90,90,0,0,90,90,90,90,149,134,54,134,90,149,134,54,90,149,134,54,90,149,134,54,198,199,200,201,198,199,198,199,175,0,0,0,175,0,0,175,175,175,175,0,0,0,175,175,87,87,87,87,87,87,87,87,87,87,176,177,87,175,176,177,87,175,175,176,177,87,175,176,177,87,175,177,177,0,177,177,177,0,0,177,176,177,175,176,176,176,177,177,177,175,175,175,176,177,87,175,0,0,176,177,87,175,176,177,176,177,176,177,87,175,177,175,0,0,0,177,87,0,177,0,175,0,0,0,87,87,87,87,87,87,175,0,0,177,176,177,87,175,0,0,87,176,177,87,175,176,177,87,175,176,177,87,175,87,87,0,175,0,87,87,87,0,87,0,0,179,181,179,181,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,181,181,181,181,181,179,181,0,179,181,179,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,0,179,181,179,181,179,181],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[-1,1,1,1],2,[]],[[3,1,1,1],2],[[-1,1],4,[]],[[5,1],4],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,1,1,[12,[1]]],4,[]],[[13,1,1,[12,[1]]],4],[[-1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,[7,[[7,[6]]]]],2,[]],[[-1,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[[15,[-1]],1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[20,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[3,1,1,[7,[[7,[6]]]]],2],[[-1,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,[7,[6]]],2,[]],[[-1,1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[[15,[-1]],1,1,[7,[6]]],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[20,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[3,1,1,[7,[6]]],2],[[-1,1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,[12,[1]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,[12,[1]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[6]],[12,[1]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]],[12,[1]]],[[10,[[9,[8,14]]]]],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[-1,[23,[[22,[21]]]],24],[[25,[4]]],[]],[[-1,24],[[25,[4]]],[]],[[5,24],[[25,[4]]]],[[26,[23,[[22,[21]]]],24],[[25,[4]]]],[[3,[23,[[22,[21]]]],24],[[25,[4]]]],[[-1,[23,[[22,[21]]]]],[[25,[4]]],[]],[-1,[[25,[4]]],[]],[5,[[25,[4]]]],[[26,[23,[[22,[21]]]]],[[25,[4]]]],[[3,[23,[[22,[21]]]]],[[25,[4]]]],[-1,27,[]],[-1,4,[]],[13,4],[-1,4,[]],[-1,[[10,[[9,[8]]]]],[]],[-1,[[10,[[9,[8]]]]],[]],[[[15,[-1]]],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[19,[[10,[[9,[8]]]]]],[5,[[10,[[9,[8]]]]]],[20,[[10,[[9,[8]]]]]],[3,4],[28,28],[29,29],[30,30],[24,24],[26,26],[3,3],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[],20],[[],31],[[],26],[[],3],[[-1,1,1,[12,[1]]],[[25,[4]]],[]],[[13,1,1,[12,[1]]],[[25,[4]]]],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1],[[10,[[9,[8]]]]],11],[[-1,1],[[10,[[9,[8]]]]],11],[[-1,1],[[10,[[9,[8]]]]],[]],[[-1,1],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,[12,[1]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,[12,[1]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[12,[1]]],[[10,[[9,[8]]]]],[]],[[-1,1,[12,[1]]],[[10,[[9,[8,14]]]]],[]],[[-1,1],[[10,[[9,[8]]]]],[]],[[-1,1],[[10,[[9,[8,14]]]]],[]],0,[[-1,-2,24],4,[],[]],[[5,32,24],4],[[-1,2],4,[]],[[5,2],4],[[-1,2],4,[]],[[5,2],4],[[-1,2],4,[]],[[5,2],4],[[-1,-2],[[25,[2]]],33,34],[[5,-1],[[25,[2]]],34],[[-1,-2],[[25,[2]]],33,34],[[5,-1],[[25,[2]]],34],[[-1,35,-2],[[25,[2]]],33,34],[[5,35,-1],[[25,[2]]],34],[[29,29],2],[[32,32],2],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],0,[[24,36],37],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,[[25,[3]]],[[17,[16]]]],[1,[[25,[3]]]],0,0,[-1,38,[]],[5,38],[-1,[[7,[6]]],[]],[-1,[[7,[6]]],[]],[-1,[[7,[[7,[6]]]]],[]],[-1,[[7,[[7,[6,14]],14]]],[]],[[-1,1],[[7,[6]]],[]],[[-1,1],[[7,[6,14]]],[]],[[-1,1],[[7,[6]]],[]],[[-1,1],[[7,[6,14]]],[]],[[-1,1],[[7,[6]]],[]],[[-1,1],[[7,[6,14]]],[]],[[-1,1],[[7,[6]]],[]],[[-1,1],[[7,[6,14]]],[]],[-1,[[7,[6]]],[]],[-1,[[7,[6]]],[]],[-1,[[7,[[7,[6]]]]],[]],[-1,[[7,[[7,[6,14]],14]]],[]],[-1,[[7,[6]]],[]],[-1,[[7,[6]]],[]],[-1,[[7,[6]]],[]],[-1,[[7,[6]]],[]],[35,6],[[-1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[-1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[-1,1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[-1,1,39,[7,[6,14]]],[[7,[[7,[6,14]],14]]],[]],[[-1,1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[-1,1,39,[7,[6,14]]],[[7,[[7,[6,14]],14]]],[]],[[-1,1,1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[-1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[-1,39,[7,[6]]],[[7,[[7,[6]]]]],[]],[[3,1,1,39,[7,[6]]],[[7,[[7,[6]]]]]],[-1,[[7,[[7,[6]]]]],[]],[-1,[[7,[[7,[6]]]]],[]],[[-1,-2],27,[40,33],41],[[-1,1,[12,[1]]],[[7,[[7,[6]]]]],[]],[[-1,1,[12,[1]]],[[7,[[7,[6,14]],14]]],[]],[[-1,1,[12,[1]]],[[7,[6]]],[]],[[-1,1,[12,[1]]],[[7,[6,14]]],[]],[[-1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[-1,[[43,[6,[42,[6,26]]]]],[]],[-1,44,[]],[5,44],[3,[[43,[6,[42,[6,26]]]]]],[-1,38,[]],[5,38],[-1,[[43,[6,[42,[6,26]]]]],[]],[-1,44,[]],[5,44],[3,[[43,[6,[42,[6,26]]]]]],[26,[[45,[[7,[6]]]]]],[[-1,1],[[7,[[7,[6]]]]],[]],[[-1,1],[[7,[[7,[6,14]],14]]],[]],[[-1,1],[[7,[[7,[6]]]]],[]],[[-1,1],[[7,[[7,[6,14]],14]]],[]],0,0,[[-1,1,[12,[1]]],[[7,[[7,[6]]]]],[]],[[-1,1,[12,[1]]],[[7,[[7,[6,14]],14]]],[]],[[-1,1,1],[[7,[[7,[6]]]]],[]],[-1,[[7,[[7,[6]]]]],[]],[-1,[[7,[[7,[6]]]]],[]],[26,[[45,[[7,[6]]]]]],[[3,1,1],[[7,[[7,[6]]]]]],[-1,[[23,[[22,[21]]]]],[]],[5,[[23,[[22,[21]]]]]],[[-1,1,[12,[1]]],[[7,[6]]],[]],[[13,1,[12,[1]]],[[7,[6]]]],[[-1,1,[12,[1]]],[[7,[6]]],[]],[[-1,1,[12,[1]]],[[7,[6,14]]],[]],[[-1,1,[12,[1]]],[[7,[6]]],[]],[[13,1,[12,[1]]],[[7,[6]]]],[[-1,1,[12,[1]]],[[7,[6]]],[]],[[-1,1,[12,[1]]],[[7,[6,14]]],[]],[[-1,1,1,39],[[7,[6]]],[]],[[3,1,1,39],[[7,[6]]]],[-1,2,[]],[5,2],[-1,2,[]],[5,2],[[-1,1,[7,[6]]],2,[]],[[-1,1,[7,[6,14]]],2,[]],[[-1,[7,[6]]],2,[]],[[-1,[7,[6]]],2,[]],[[-1,1,1,[12,[1]]],2,[]],[[13,1,1,[12,[1]]],2],[[-1,1,[7,[6]]],2,[]],[[-1,1,[7,[6,14]]],2,[]],[[-1,1,[7,[6]]],2,[]],[[-1,1,[7,[6,14]]],2,[]],[[-1,1,1,[7,[6]]],2,[]],[[-1,[7,[6]]],2,[]],[[-1,[7,[6]]],2,[]],[[3,1,1,[7,[6]]],2],[[-1,1,1,[12,[1]]],2,[]],[[-1,1,1,[12,[1]]],2,[]],[[32,-1],4,46],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,2,[]],[5,2],[-1,2,[]],[-1,2,[]],[[[15,[-1]]],2,[[17,[16]],11,18]],[19,2],[5,2],[20,2],0,[[-1,44,28],[[10,[[9,[8]]]]],[]],[[-1,28],[[10,[[9,[8]]]]],[]],[[[15,[-1]],44,28],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,44,28],[[10,[[9,[8]]]]]],[[5,28],[[10,[[9,[8]]]]]],[[20,44,28],[[10,[[9,[8]]]]]],[[-1,44],[[10,[[9,[8]]]]],[]],[-1,[[10,[[9,[8]]]]],[]],[[[15,[-1]],44],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,44],[[10,[[9,[8]]]]]],[5,[[10,[[9,[8]]]]]],[[20,44],[[10,[[9,[8]]]]]],0,[[-1,[12,[47]],[12,[47]]],4,[]],[[13,[12,[47]],[12,[47]]],4],[[-1,-2],[[10,[[9,[8]]]]],48,49],[-1,[[15,[-1]]],[[17,[16]],11,18]],[[-1,-2],[[10,[[9,[8]]]]],48,49],[1,35],[39,13],[[-1,-2],[[10,[[9,[8]]]]],48,49],[[-1,-2],[[10,[[9,[8]]]]],48,49],[[-1,1,39],[[9,[50]]],[]],[[31,1,39],[[9,[50]]]],[-1,2,[]],[30,2],[[-1,-2],4,[],[]],[[5,32],4],[[-1,-2],4,33,[]],[[5,32],4],0,0,0,0,[[-1,29],2,[]],[[30,29],2],0,0,0,[[-1,39,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,39,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,1,39,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,39,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,39,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,39,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,39,[7,[6]]],[[4,[2,[7,[[7,[6]]]]]]],[]],[[-1,1,1,39,[7,[6]]],[[10,[[9,[8]]]]],[]],[[[15,[-1]],1,1,39,[7,[6]]],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,1,1,39,[7,[6]]],[[10,[[9,[8]]]]]],[[20,1,1,39,[7,[6]]],[[10,[[9,[8]]]]]],[[-1,39,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,39,[7,[6]]],[[10,[[9,[8]]]]],11],[[3,1,1,39,[7,[6]]],[[4,[2,[7,[[7,[6]]]]]]]],[[-1,1,1,39,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,39,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,[7,[[7,[6]]]]],2,[]],[[-1,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[[15,[-1]],1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[20,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]]],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[-1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],11],[[3,1,1,[7,[[7,[6]]]]],2],[[-1,1,1,[7,[[7,[6]]]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,[7,[[7,[6,14]],14]]],[[10,[[9,[8,14]]]]],[]],[[-1,1,1,[7,[6]]],2,[]],[[-1,1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[[15,[-1]],1,1,[7,[6]]],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[20,1,1,[7,[6]]],[[10,[[9,[8]]]]]],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[-1,[7,[6]]],[[10,[[9,[8]]]]],11],[[3,1,1,[7,[6]]],2],[[-1,1,1,[7,[6]]],[[10,[[9,[8]]]]],[]],[[-1,1,1,[7,[6,14]]],[[10,[[9,[8,14]]]]],[]],0,0,[[-1,44],[[10,[[9,[8]]]]],[]],[-1,[[10,[[9,[8]]]]],[]],[[[15,[-1]],44],[[10,[[9,[8]]]]],[[17,[16]],11,18]],[[19,44],[[10,[[9,[8]]]]]],[5,[[10,[[9,[8]]]]]],[[20,44],[[10,[[9,[8]]]]]],[[-1,-2],[[10,[[9,[8]]]]],33,49],[[5,-1],[[10,[[9,[8]]]]],49],[[-1,[9,[51]]],4,[]],[[5,[9,[51]]],4],[[-1,-2],[[10,[[9,[8]]]]],33,48],[[5,-1],[[10,[[9,[8]]]]],48],[[-1,[23,[[22,[21]]]]],[[25,[4]]],[]],[[5,[23,[[22,[21]]]]],[[25,[4]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,6,[]],0,[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[10,[[9,[8]]]]],[]],[-1,[[10,[[9,[8,14]]]]],[]],[-1,[[10,[[9,[8,14]]]]],[]],[-1,[[10,[[9,[8,14]]]]],[]],[-1,[[10,[[9,[8]]]]],[]],[-1,[[10,[[9,[8,14]]]]],[]],[-1,[[25,[[7,[53]]]]],[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[55,36],37],[[55,36],37],[[56,36],37],[[56,36],37],[[57,36],37],[[57,36],37],[[58,36],37],[[58,36],37],[[59,36],37],[[59,36],37],[[60,36],37],[[60,36],37],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[61,60],[55,60],[59,60],[56,60],[62,60],[-1,-1,[]],[[[9,[63]]],60],[58,60],[57,60],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[60,[[12,[64]]]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],0,[[65,1],4],[-1,-2,[],[]],[-1,-2,[],[]],[[],65],[-1,-1,[]],[65,[[0,[66]]]],[-1,-2,[],[]],[[1,1],2],[[1,1],2],[[1,1],2],[[1,1],2],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[67,-1],[],[[17,[67]]]],[[68,-1],[],[[17,[68]]]],[[68,-1],[],[[17,[68]]]],[[69,70],69],[[71,6]],[[71,71]],[[71,71]],[[71,72]],[[71,71]],[[71,72]],[[71,71]],[[71,1]],[[71,1]],[[71,6]],[[73,73]],[[67,-1],4,[[74,[67]]]],[[68,-1],4,[[74,[68]]]],[[69,70],4],[[71,1],4],[[71,71],4],[[71,71],4],[[71,6],4],[[71,72],4],[[73,73],4],[[75,53],75],[[[23,[-1,-2]]],-2,[],76],[53,[[52,[2,1]]]],[53,[[52,[72,1]]]],[[[23,[-1,14]]],77,78],[53,[[52,[71,1]]]],[53,[[52,[79,1]]]],[[[23,[-1,-2]]],[],33,76],[[[23,[-1,14]]],79,80],[81,82],[67,[[84,[83]]]],[[[23,[-1,-2]]],-1,33,76],[71,1],[71,[[86,[85]]]],[53,[[52,[6,1]]]],[53,[[52,[4,1]]]],[[[23,[[87,[-1]],-2]]],[[23,[-1,-2]]],[],[88,76]],[[[23,[[84,[[87,[-1]]]],-2]]],[[23,[[84,[-1]],-2]]],[],[88,76]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[81,82],[67,[[84,[83]]]],[-1,-2,[],[]],[-1,-2,[],[]],[[[23,[-1,-2]]],-1,33,76],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[71,[[86,[85]]]],[71,1],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[89,[-1]]],4,[]],[68,68],[[75,90,67,-1],[[52,[-2,[9,[63,14]]]]],91,[92,88]],[[75,93,[12,[53]],-1],[[52,[53,[9,[63,14]]]]],[[94,[[84,[53]]]]]],[[93,-1,-2],[[52,[-3,[9,[63,14]]]]],[[17,[1]]],91,[92,88]],[[93,-1,2,[84,[53]]],[[52,[53,[9,[63,14]]]]],[[17,[1]]]],[[93,-1,2,2,[84,[53]]],[[52,[53,[9,[63,14]]]]],[[17,[1]]]],[95,39],[93,39],[[93,-1,-2],[[52,[-3,[9,[63,14]]]]],[[17,[1]]],91,[92,88]],[[93,-1,2,[84,[53]]],[[52,[53,[9,[63,14]]]]],[[17,[1]]]],[[75,93,[12,[53]],-1],[[52,[53,[9,[63,14]]]]],[[94,[[84,[53]]]]]],[[75,93,-1],[[52,[-2,[9,[63,14]]]]],91,[92,88]],[53,-1,[96,88]],[[[23,[-1,14]]],[[12,[64]]],[64,33]],[[69,70],[[12,[69]]]],[[69,69],[[12,[70]]]],[[69,70],[[12,[69]]]],[68,4],[97,97],[68,68],[[[98,[-1]]],4,33],[63,63],[67,67],[67,67],[53,53],[81,81],[67,67],[[[23,[-1,-2]]],[[23,[-1,-2]]],33,[76,88]],[99,99],[68,68],[69,69],[75,75],[71,71],[100,100],[101,101],[62,62],[73,73],[97,97],[102,102],[53,-1,[96,88]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[67,67],[97,97],[[[23,[-1,-2]],[23,[-1,-2]]],103,[104,33],76],[[99,99],103],[[69,69],103],[[71,71],103],[[73,73],103],[[67,67],67],[[68,68],68],[[68,68],68],0,[[-1,-2],103,[],[]],[[-1,-2],103,[],[]],[[-1,-2],103,[],[]],[[-1,-2],103,[],[]],[[-1,-2],103,[],[]],0,[[97,1],2],[[68,27],2],[68,2],[[68,54],2],[[68,27],2],[[68,54],2],[[68,1],2],[[68,1],2],[68,[[4,[39,39,39]]]],[75,[[84,[53]]]],[[],4],[-1,4,76],[[53,-1],4,105],0,[[],53],[[],67],[[],[[23,[-1,14]]],106],[[],[[98,[-1]]],106],[[],68],[[],71],[[],73],[[],97],[81],[[[23,[-1,-2]]],-1,33,76],[71],[[[23,[-1,14]]],1,[64,33]],[-1,[[52,[53]]],107],[-1,[[52,[[98,[-2]]]]],107,108],[-1,[[52,[71]]],107],[-1,[[52,[97]]],107],[[[23,[96,-1]]],[[52,[[23,[-2,-1]],[23,[96,-1]]]]],[76,88],[96,11,18]],[[[23,[96,-1]]],[[23,[-2,-1]]],[76,88],[96,11,18]],[[[23,[-1,-2]]],[[109,[-1,-2]]],33,[88,76]],[[[89,[-1]]],4,[92,88]],[[[23,[-1,-2]]],4,33,76],[[69,69],70],[69,70],[[],67],[95,90],[93,90],[[[23,[-1,-2]],[23,[-1,-2]]],2,[],76],[[99,99],2],[[69,69],2],[[71,-1],2,[[17,[1]]]],[[100,100],2],[[101,101],2],[[62,62],2],[[73,73],2],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[62,101],[1,[[52,[-1,[9,[63,14]]]]],[92,88]],[[95,81],[[52,[53,[9,[63,14]]]]]],[[95,81,2],[[52,[53,[9,[63,14]]]]]],[-1,[[52,[-2,[9,[63,14]]]]],[[17,[16]]],[92,88]],[[81,95],[[52,[53,[9,[63,14]]]]]],[[81,95,2],[[52,[53,[9,[63,14]]]]]],0,0,0,[[75,-1],4,110],[[97,-1],4,110],[[97,-1],4,110],[[68,68],68],[53,53],[53,53],[[[23,[111,14]]],[[52,[4,61]]]],[[53,36],[[52,[4,112]]]],[[53,36],[[52,[4,112]]]],[[81,36],[[52,[4,112]]]],[[67,36],[[52,[4,112]]]],[[93,36],[[52,[4,112]]]],[[[23,[-1,-2]],36],[[52,[4,112]]],33,76],[[[23,[-1,-2]],36],[[52,[4,112]]],[113,33],76],[[[23,[-1,-2]],36],[[52,[4,112]]],[114,33],76],[[[98,[-1]],36],[[52,[4,112]]],[113,33]],[[99,36],[[52,[4,112]]]],[[68,36],[[52,[4,112]]]],[[69,36],[[52,[4,112]]]],[[63,36],[[52,[4,112]]]],[[63,36],[[52,[4,112]]]],[[75,36],[[52,[4,112]]]],[[75,36],[[52,[4,112]]]],[[71,36],[[52,[4,112]]]],[[71,36],[[52,[4,112]]]],[[100,36],[[52,[4,112]]]],[[100,36],[[52,[4,112]]]],[[101,36],[[52,[4,112]]]],[[101,36],[[52,[4,112]]]],[[62,36],[[52,[4,112]]]],[[62,36],[[52,[4,112]]]],[[73,36],[[52,[4,112]]]],[[73,36],[[52,[4,112]]]],[[97,36],[[52,[4,112]]]],[[97,36],[[52,[4,112]]]],[[102,36],[[52,[4,112]]]],[93,1],[75,1],[[[115,[[86,[85]],53,14]]],6],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[71,53],[[[116,[79]]],53],[[[43,[-1,-2,117]]],53,[[74,[[86,[85]]]]],[92,88]],[2,53],[69,53],[[[115,[-1,-2,14]]],53,[[74,[[86,[85]]]]],[92,88]],[-1,53,[92,88]],[[[118,[79]]],53],[75,53],[4,53],[[[119,[-1,117]]],53,[[74,[[86,[85]]]]]],[79,53],[[[120,[-1,14]]],53,[[74,[[86,[85]]]]]],[-1,53,[[74,[71]]]],[72,53],[[[7,[-1,14]]],53,[92,88]],[[[84,[-1]]],53,[92,88]],[82,81],[-1,-1,[]],[-1,-1,[]],[[[4,[90,1,[12,[1]],121,73]]],93],[-1,-1,[]],[122,[[23,[123,14]]]],[[[9,[-1,-2]]],[[23,[-1,-2]]],33,76],[[[124,[-1]]],[[23,[[84,[-1]],14]]],[]],[-1,-1,[]],[125,-1,[]],[126,[[23,[126,14]]]],[-1,[[23,[-1,14]]],[]],[[[23,[1,14]]],[[23,[[84,[127]],14]]]],[128,[[23,[126,14]]]],[[[129,[-1]]],[[23,[-1,14]]],[130,33]],[[[7,[-1,-2]]],[[23,[[84,[-1]],-2]]],[],[76,88]],[123,[[23,[123,14]]]],[1,[[23,[1,14]]]],[131,[[23,[16,14]]]],[6,[[23,[1,14]]]],[[[84,[-1]]],[[23,[[84,[-1]],14]]],88],[16,[[23,[16,14]]]],[125,-1,[]],[-1,-1,[]],[-1,[[98,[-1]]],[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,63,[[17,[1]]]],[-1,-1,[]],[101,63],[62,63],[-1,-1,[]],[[[86,[85]]],71],[[[86,[85]]],71],[6,71],[6,71],[1,71],[[[9,[1,14]]],71],[-1,-1,[]],[-1,-1,[]],[100,101],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[[7,[53,14]]],53],[[[7,[127,14]]],53],[2,53],[72,53],[79,53],[-1,53,110],[-1,[[23,[[84,[-2]],14]]],110,[]],[-1,71,110],[-1,71,110],[-1,71,110],[-1,71,110],[-1,71,110],[-1,97,110],[-1,97,110],[[[115,[[86,[85]],53,14]]],53],[[],[[23,[-1,14]]],33],[-1,[[23,[-2,-1]]],76,33],[1,[[52,[53]]]],[1,[[52,[71]]]],[69,53],[[[23,[-1,-2]],[23,[-1,-2]]],2,[],76],[[97,1],[[12,[53]]]],[[68,1],[[12,[1]]]],[68,[[12,[1]]]],[[68,1],[[12,[1]]]],[68,[[12,[132]]]],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[81,[[12,[-1]]],92],[[[23,[-1,-2]]],[[12,[-1]]],33,76],[[[98,[-1]]],[[52,[-1,[133,[-1]]]]],33],[[97,1],[[12,[53]]]],[[[23,[-1,-2]]],-1,33,76],[81,[[12,[1]]]],[[68,1],[[12,[68]]]],[[97,1],[[12,[-1]]],[92,88]],[[68,1],[[12,[53]]]],[[68,1],[[12,[-1]]],[92,88]],[81,[[12,[1]]]],[[[23,[-1,-2]],[23,[-1,-2]]],2,[],76],[[],2],[[53,-1],4,46],[[[23,[-1,-2]],-3],4,[40,33],76,46],[[99,-1],4,46],[[69,-1],4,46],[[75,-1],4,46],[[71,-1],4,46],[[100,-1],4,46],[[101,-1],4,46],[[62,-1],4,46],[[73,-1],4,46],[[97,-1],4,46],[[102,-1],4,46],[68,[[12,[1]]]],[[],4],[-1,4,[88,76]],[[75,39]],[[75,39]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[53,[[52,[[7,[53,14]],1]]]],[53,[[52,[[7,[127,14]],1]]]],[[-1,[86,[85]],2],134,[]],[53],[[100,73],62],[53,[[52,[71,1]]]],[[[23,[-1,-2]]],[[12,[-1]]],[],76],[[[98,[-1]]],[[52,[-1,[133,[-1]]]]],33],[97],[97],[71,6],[[[23,[-1,-2]]],[],33,76],[53,53],[53,[[52,[6,1]]]],[53,[[52,[[7,[-1,14]],1]]],[92,88]],[53,2],[53,2],[73,2],[53,2],[53,2],[63,2],[53,2],[102,2],0,[[97,1],[[12,[2]]]],[75,2],[68,2],[97,2],[99,2],[68,2],[53,2],[[[89,[-1]]],[[89,[-1]]],[92,88,110]],[53,2],[99,2],[73,2],[[[98,[-1]]],2,33],[63,2],[53,2],[[[23,[111,14]]],2],[53,2],[63,2],[53,2],[53,2],[53,2],[[[23,[111,14]]],2],[97,[[0,[66]]]],[75,[[0,[66]]]],[75,[[0,[66]]]],[[67,2,2],[[0,[66]]]],[97,[[0,[66]]]],[68,[[0,[66]]]],[68,[[0,[66]]]],[[[23,[-1,-2]],[23,[-1,-2]]],2,[],76],[97,39],[73,[[12,[39]]]],[[[23,[-1,-2]],[23,[-1,-2]]],2,[],76],[[[23,[-1,-2]]],-1,88,[76,88]],[[67,67],67],[[68,68],68],[102,1],0,[[[23,[-1,-2]],[23,[-1,-2]]],2,[],76],[102,39],0,[[90,121,135,97,[12,[53]]],95],[[90,1,[84,[[23,[68,14]]]]],93],[-1,[[23,[-1,14]]],[]],[-1,[[98,[-1]]],[]],[[],68],[-1,[[52,[75,[9,[63,14]]]]],[[74,[71]]]],[[],71],[[136,136],73],[[],97],[[136,136],[[12,[73]]]],[-1,[[23,[-2,14]]],137,[]],[[-1,-2],[[23,[-1,-2]]],[],76],[[],[[23,[[87,[-1]],14]]],[]],[-1,[[23,[[87,[-2]],-1]]],76,[]],[39,[[23,[[84,[[87,[-1]]]],14]]],[]],[[39,-1],[[23,[[84,[[87,[-2]]]],-1]]],76,[]],[[],[[23,[[87,[-1]],14]]],[]],[-1,[[23,[[87,[-2]],-1]]],76,[]],[39,[[23,[[84,[[87,[-1]]]],14]]],[]],[[39,-1],[[23,[[84,[[87,[-2]]]],-1]]],76,[]],[[],69],[75,39],[[],39],[[[89,[-1]],-2],[[89,[-1]]],[92,88],[138,139]],[[[89,[-1]],-2],[[89,[-1]]],[92,88],[138,139]],[[73,73],73],0,[[],[[124,[54]]]],[[-1,-2],4,[],[[140,[53]]]],[[[23,[-1,-2]],[23,[-1,-2]]],[[12,[103]]],[],76],[[99,99],[[12,[103]]]],[[69,69],[[12,[103]]]],[[71,-1],[[12,[103]]],[[17,[1]]]],[[73,73],[[12,[103]]]],[-1,[[10,[[23,[-1,14]]]]],[]],[[-1,-2],[[10,[[23,[-1,-2]]]]],[],76],0,[97,97],[81,73],[93,73],[63,73],[62,73],[73,[[12,[39]]]],[[[23,[-1,14]],141],4,[64,33]],[[[23,[-1,-2]],[23,[-1,-2]]],2,33,76],[[71,71],2],[[97,-1,-2],97,[[74,[[86,[85]]]]],[92,88]],[[97,-1,-2],97,[[74,[[86,[85]]]]],[92,88]],[[97,-1,53],97,[[74,[[86,[85]]]]]],[[97,-1,53],97,[[74,[[86,[85]]]]]],[[[23,[111,14]],[84,[127]]],[[52,[39,61]]]],[[[98,[-1]]],[[52,[[142,[-1]],[133,[[142,[-1]]]]]]],33],[[[23,[111,14]],143],[[52,[4,61]]]],[53,[[12,[[144,[-1]]]]],[96,88]],[[[23,[111,14]],[7,[127,14]]],[[52,[39,61]]]],[[[23,[111,14]],6],[[52,[39,61]]]],[[[23,[111,14]],[84,[145]]],[[52,[39,61]]]],0,[[97,1],[[12,[-1]]],[92,88]],[[97,39],97],[1,[[52,[4,[9,[63,14]]]]]],[-1,[[52,[4,[9,[63,14]]]]],[[17,[16]]]],[[69,69],70],[95,97],[95,97],[[[23,[111,14]],146],[[52,[27,61]]]],0,[[53,-1],52,147],[[[98,[-1]],-2],52,[148,33],147],[[71,-1],52,147],[[97,-1],52,147],[[75,-1],75,110],[[68,1],68],[[68,-1,-2],68,[[74,[[86,[85]]]]],[[74,[[86,[85]]]]]],0,0,[[68,-1,99,149,[12,[[84,[1]]]],-2,134],27,[[74,[[86,[85]]]]],[[17,[[84,[54]]]]]],[[68,-1,-4],27,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]]]],-3]],139]],[[68,-1,-4,-5],[[4,[27,27]]],[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]]]],-3]],139],[[151,[[4,[[150,[-2]],-3]],4]],139]],[[68,-1],68,[[74,[71]]]],[[68,-4],27,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139]],[[68,-4,-5],[[4,[27,27]]],[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[68,-4],27,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[68,54,-1],68,[138,139]],[[68,54,-1],68,[138,139]],[68,68],[68,68],[68,68],[68,68],[[68,-1,-4],27,[[74,[[86,[85]]]]],[],[92,88],[[151,[-2,-3]],139]],[[97,-1,-2],97,[[17,[1]],[74,[[86,[85]]]]],[92,88]],[[63,73],63],[[68,-1,99,149,-2,-3],27,[[74,[[86,[85]]]]],[[17,[[84,[54]]]]],[138,139]],[[68,-1,-4],27,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]],-3]],4]],139]],[[67,-1],67,[[74,[71]]]],[[68,-1,-2],68,[[74,[[86,[85]]]]],[[74,[[23,[68,14]]]]]],[[53,79],53],[[97,-1,-2],97,[[17,[1]],[74,[[86,[85]]]]],[92,88]],[[68,-1,-2],68,[[74,[[86,[85]]]]],[92,88]],[95,[[12,[1]]]],[67,[[12,[1]]]],[93,[[12,[1]]]],[[[23,[-1,14]]],[[12,[64]]],[64,33]],[[[23,[-1,-2]]],39,33,76],[[69,70],69],[[69,69],70],[[71,71]],[[71,72]],[[71,1]],[[71,72]],[[71,1]],[[71,6]],[[71,71]],[[71,6]],[[69,70],4],[[71,71],4],[[71,72],4],[[71,6],4],[[71,71],4],[[71,1],4],[95,53],[53,79],[93,[[12,[53]]]],[95,53],[53,53],[63,73],[95,[[12,[53]]]],[95,[[12,[53]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[-1,6,[]],[53,[[12,[-1]]],96],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[[[23,[[84,[-1]],-2]]],[[52,[[23,[[124,[-1]],-2]]]]],[],[76,88]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[71,[[52,[75,[9,[63,14]]]]]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[[23,[-1,14]],152]]],[]],[[-1,-2],[[52,[[23,[-1,-2]],152]]],[],76],[[],[[52,[[23,[[87,[-1]],14]],152]]],[]],[-1,[[52,[[23,[[87,[-2]],-1]],152]]],76,[]],[[],[[52,[[23,[[87,[-1]],14]],152]]],[]],[-1,[[52,[[23,[[87,[-2]],-1]],152]]],76,[]],[-1,[[52,[[10,[[23,[-1,14]]]],152]]],[]],[[-1,-2],[[52,[[10,[[23,[-1,-2]]]],152]]],[],76],[[[98,[-1]]],[[52,[[142,[-1]],[153,[[142,[-1]]]]]]],33],[[[23,[-1,-2]]],[[52,[-1,[23,[-1,-2]]]]],[],76],[[[98,[-1]]],[[52,[[154,[-1]],[153,[[154,[-1]]]]]]],33],[-1,54,[]],[-1,54,[]],[-1,54,[]],[53,54],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[53,1],[63,63],[[[23,[-1,-2]]],-1,88,[76,88]],[[68,27,99],68],[[[23,[-1,-2]]],39,33,76],0,[102,2],[39,68],[39,97],[[[89,[-1]],-2,-5],[[89,[-1]]],[92,88],[[17,[1]],[74,[[86,[85]]]]],[],[92,88],[[151,[-3,-4]],139]],[[[89,[-1]],-2,-4],[[89,[-1]]],[92,88],[[17,[1]]],[92,88],[[151,[[4,[[150,[-1]]]],-3]],139]],[[[89,[-1]],-2,-4],[[89,[-1]]],[92,88],[[17,[1]]],[92,88],[[151,[[4,[[150,[-1]]]],-3]],139]],[[[89,[-1]],-2,-4,-5],[[89,[-1]]],[92,88],[[17,[1]]],[92,88],[[151,[[4,[[150,[-1]]]],-3]],139],[[151,[[4,[[150,[-1]],-3]],4]],139]],[[[89,[-1]],-4],[[89,[-1]]],[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139]],[[[89,[-1]],-4],[[89,[-1]]],[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139]],[[[89,[-1]],-4,-5],[[89,[-1]]],[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[[89,[-1]],-4],[[89,[-1]]],[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[[89,[-1]],-4],[[89,[-1]]],[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[[89,[-1]],1],[[89,[-1]]],[92,88]],[[[89,[-1]],-2,-5],[[89,[-1]]],[92,88],[[17,[1]],[74,[[86,[85]]]]],[],[92,88],[[151,[-3,-4]],139]],[[[89,[-1]],-2,-4],[[89,[-1]]],[92,88],[[17,[1]]],[92,88],[[151,[[4,[[150,[-1]],-3]],4]],139]],[[[89,[-1]],-2,-4],[[89,[-1]]],[92,88],[[17,[1]]],[92,88],[[151,[[4,[[150,[-1]],-3]],4]],139]],[[[23,[111,14]],[84,[127]]],[[52,[39,61]]]],[[[98,[-1]]],[[52,[[154,[-1]],[133,[[154,[-1]]]]]]],33],[53,[[12,[[155,[-1]]]]],[96,88]],[[[23,[111,14]],[84,[156]]],[[52,[39,61]]]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[157,[-1]]],[[157,[-1]]],88],[[[157,[-1]],[157,[-1]]],4,88],[[-1,-2],4,[],[]],[[],[[157,[-1]]],[]],[[[157,[-1]],[157,[-1]]],2,[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[[157,[-1]],36],[[52,[4,112]]],113],[-1,-1,[]],[125,-1,[]],[-1,[[157,[-1]]],[]],[[[157,[-1]]],[[12,[-1]]],[]],[[],[[12,[[124,[27]]]]]],[[[157,[-1]]],[[12,[-1]]],[]],[[[157,[-1]],-2],-1,[],137],[[[157,[-1]],-2],[[52,[-1,-3]]],[],137,[]],[[[157,[-1]]],-1,[]],[-1,-2,[],[]],[[[157,[-1]]],[[12,[-1]]],[]],[[],[[157,[-1]]],[]],[[[157,[-1]],-1],[[52,[4,-1]]],[]],[[[12,[[124,[27]]]]],[[52,[4,[12,[[124,[27]]]]]]]],[[[157,[-1]]],[[12,[-1]]],[]],[-1,-2,[],[]],[-1,[[52,[-2]]],[],[]],[[[157,[-1]],-1],[[52,[-1,[4,[-1,-1]]]]],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],[[[157,[-1]]],-1,[]],[-1,[[157,[-1]]],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,[[23,[68,14]]],[]],[158,[[23,[68,14]]]],[159,[[23,[68,14]]]],[160,[[23,[68,14]]]],[161,[[23,[68,14]]]],[162,[[23,[68,14]]]],[163,[[23,[68,14]]]],[164,[[23,[68,14]]]],[165,[[23,[68,14]]]],[166,[[23,[68,14]]]],[167,[[23,[68,14]]]],[168,[[23,[68,14]]]],[169,[[23,[68,14]]]],[170,[[23,[68,14]]]],[171,[[23,[68,14]]]],[172,[[23,[68,14]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],158],[[],159],[[],160],[[],161],[[],162],[[],163],[[],164],[[],165],[[],166],[[],167],[[],168],[[],169],[[],170],[[],171],[[],172],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[68,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[90,4],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],158],[[],159],[[],160],[[],161],[[],162],[[],163],[[],164],[[],165],[[],166],[[],167],[[],168],[[],169],[[],170],[[],171],[[],172],[[-1,90],-1,[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[134,149],[90,2],[90,2],[90,2],[90,2],[90,2],[90,2],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[90,90],[[-1,[12,[93]],[84,[53]]],[[52,[53,[9,[63,14]]]]],[]],[149,149],[134,134],[54,54],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[149,149],103],[[54,54],103],0,[[90,-1],[[52,[6,62]]],[[17,[1]]]],[[-1,-2],103,[],[]],[[-1,-2],103,[],[]],[[90,-1],[[52,[67,62]]],[[17,[1]]]],[[90,-1],[[52,[67,62]]],[[17,[1]]]],[[90,97,-1],[[52,[67,62]]],[[17,[1]]]],[[90,131],[[52,[67,[9,[63,14]]]]]],[[90,97,131],[[52,[67,[9,[63,14]]]]]],[[90,97,-2],[[52,[67,62]]],[[17,[1]]],[[17,[[84,[-1]]]]]],[[90,97,-1],[[52,[67,62]]],[[17,[1]]]],[90,71],[[90,1],[[52,[4,[9,[63,14]]]]]],[[90,67],[[52,[4,[9,[63,14]]]]]],[[90,97,67],[[52,[4,[9,[63,14]]]]]],[[90,131],[[52,[4,[9,[63,14]]]]]],[[90,97,131],[[52,[4,[9,[63,14]]]]]],[[90,97,1],[[52,[4,[9,[63,14]]]]]],[[],90],[90,53],[90,53],[-1,[[52,[149]]],107],[[90,-1],90,[[74,[[86,[85]]]]]],[[149,149],2],[[54,54],2],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[90,1],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,67],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,97,67],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,1],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,97,1],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,131],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,97,131],[[52,[-1,[9,[63,14]]]]],[92,88]],[[90,97,1],[[52,[-1,[9,[63,14]]]]],[92,88]],0,0,0,[90,2],[90,2],[[90,36],[[52,[4,112]]]],[[149,36],[[52,[4,112]]]],[[134,36],[[52,[4,112]]]],[[134,36],[[52,[4,112]]]],[[54,36],[[52,[4,112]]]],[-1,-1,[]],[-1,-1,[]],[-1,134,[173,139]],[[[23,[173,14]]],134],[-1,-1,[]],[-1,-1,[]],[134,[[12,[174]]]],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[134,[[12,[138]]]],[134,[[12,[[23,[138,14]]]]]],[134,[[12,[[23,[173,14]]]]]],[-1,2,[]],[134,2],[[149,-1],4,46],[[54,-1],4,46],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[134,2],[134,2],[-1,2,[]],[134,2],[134,2],[149,2],[149,2],[-1,2,[]],[134,2],[134,2],[[90,1],2],[[90,1],1],0,[[],90],[[],90],[[],54],[[90,-1],90,[138,139]],[[90,-1],90,[138,139]],[[90,-1],90,[138,139]],[[90,-1],90,[138,139]],[[90,-1,2],[[52,[[115,[[86,[85]],53,14]],[9,[63,14]]]]],[[17,[1]]]],[[149,149],[[12,[103]]]],[[54,54],[[12,[103]]]],[[90,-1,127],[[52,[90,6]]],[[17,[1]]]],[[90,-2,2,-3],[[52,[90,62]]],[[17,[1]],[74,[[86,[85]]]]],[[17,[[84,[-1]]]]],[138,139]],[[90,-1,-2,2,-3],90,[[74,[[86,[85]]]]],[138,139],[138,139]],[[90,-1,-2,2,-3],90,[[74,[[86,[85]]]]],[138,139],[138,139]],0,[[90,-1,-4],90,[[17,[1]],[74,[[86,[85]]]]],[],[92,88],[[151,[-2,-3]],139]],[[90,-1,-4],90,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]]]],-3]],139]],[[90,-1,-4],90,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]]]],-3]],139]],[[90,-1,-4,-5],90,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]]]],-3]],139],[[151,[[4,[[150,[-2]],-3]],4]],139]],[[90,[23,[68,14]]],90],[[90,-4],90,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139]],[[90,-4],90,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139]],[[90,-4,-5],90,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2]],-3]],139],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[90,-4],90,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[[90,-4],90,[92,88],[92,88],[92,88],[[151,[[4,[[150,[-1]],-2,-3]],4]],139]],[90,90],[90,90],[[90,-1,-2,-3],90,[[17,[1]],[74,[[86,[85]]]]],[[17,[[84,[54]]]]],[138,139]],[[90,-1,-4],90,[[17,[1]],[74,[[86,[85]]]]],[],[92,88],[[151,[-2,-3]],139]],[[90,-1,-4],90,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]],-3]],4]],139]],[[90,-1,-4],90,[[17,[1]]],[92,88],[92,88],[[151,[[4,[[150,[-2]],-3]],4]],139]],[90,90],[[90,1],90],[[90,-1,-2],90,[[74,[[86,[85]]]]],[[74,[[86,[85]]]]]],[[90,1],[[52,[4,[9,[63,14]]]]]],[[90,67],[[52,[4,[9,[63,14]]]]]],[[90,97,67],[[52,[4,[9,[63,14]]]]]],[[90,131],[[52,[4,[9,[63,14]]]]]],[[90,97,131],[[52,[4,[9,[63,14]]]]]],[[90,97,1],[[52,[4,[9,[63,14]]]]]],[[149,-1],52,147],[[90,2],90],[[90,2],90],[[90,2],90],[[90,2],90],[[90,2],90],[[90,2],90],[[90,-1],90,[[74,[53]]]],0,0,[[90,2],90],[[90,2],90],[[90,2],90],[90,2],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,6,[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[175,175],175],[[],39],[-1,39,33],[[],39],0,[[175,175],175],[[[124,[[87,[-1]]]]],[[124,[-1]]],[]],[[[87,[-1]]],[[84,[[87,[127]]]]],[]],[[[87,[-1]]],[[84,[[87,[127]]]]],[]],[[[87,[-1]]],[],[]],[[[87,[-1]]],[],[]],[[[87,[-1]]],-1,[]],[[[87,[-1]]],4,[]],[[[87,[-1]]],-1,[]],[[[87,[-1]]],-1,[]],[[[87,[-1]]],-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[175,175],175],[[[176,[-1]]],[[176,[-1]]],[]],[[[177,[-1]]],[[177,[-1]]],[88,33]],[[[87,[-1]]],[[87,[-1]]],178],[175,175],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[[[177,[-1]],[177,[-1]]],103,[104,33]],[[-1,-2],103,[],[]],[-1,-1,178],[[],[[177,[-1]]],[106,33]],[[[177,[-1]]],-1,33],[[[177,[-1]]],-1,33],[-1,[[176,[-1]]],[]],[-1,4,[]],[[[177,[-1]]],4,33],[[[176,[-1]],[176,[-1]]],2,[]],[[[177,[-1]],[177,[-1]]],2,[]],[[175,175],2],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[-1,-2],2,[],[]],[[[176,[-1]],36],[[52,[4,112]]],[]],[[[177,[-1]],36],[[52,[4,112]]],[113,33]],[[[87,[-1]],36],[[52,[4,112]]],[]],[[175,36],[[52,[4,112]]]],[-1,4,[]],[-1,4,33],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[-1,-2],27,[40,33],41],[[-1,-2],27,[40,33],41],[[[176,[-1]],-2],4,[],46],[[[177,[-1]],-2],4,[40,33],46],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[177,[-1]]],-1,[]],0,[[],39],[-1,39,33],[[],2],[-1,[[177,[-1]]],[]],[-1,[[87,[-1]]],[]],0,[[[177,[-1]],[177,[-1]]],[[12,[103]]],[]],[[-1,-1],-1,[]],0,[[],39],[-1,39,33],[[],39],[[[84,[[87,[-1]]]]],[[84,[[87,[127]]]]],[]],[[[84,[[87,[-1]]]]],[[84,[[87,[127]]]]],[]],[[[84,[[87,[-1]]]]],[],[]],[[[84,[[87,[-1]]]]],[],[]],[[[84,[[87,[-1]]]]],[[84,[-1]]],[]],[[[84,[[87,[-1]]]]],[[84,[-1]]],[]],[[175,175],175],[[-1,-1],4,[]],[-1,-1,106],[[[177,[-1]]],-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[87,[[124,[-1]]]]],[[124,[[87,[-1]]]]],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[-1,54,[]],[[],[[87,[-1]]],[]],[[],[[124,[[87,[-1]]]]],[]],[[],-1,[]],0,[[],39],[[[87,[-1]],-1],-1,[]],[[[84,[[87,[-1]]]],[84,[-1]]],[[84,[-1]]],178],[[[84,[[87,[-1]]]],[84,[-1]]],[[84,[-1]]],88],[[],-1,[]],[[],[[87,[-1]]],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,1,[84,[1]],-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,1,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,1,[84,[1]],-1],[[52,[[9,[63,14]]]]],180],[[179,39,-1],[[52,[[9,[63,14]]]]],180],[[179,1,39,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,-1],[[52,[[9,[63,14]]]]],180],[[179,1,-1],[[52,[[9,[63,14]]]]],180],[181,[[52,[[9,[63,14]]]]]],[181,[[52,[[9,[63,14]]]]]],[181,[[52,[[9,[63,14]]]]]],[181,[[52,[[9,[63,14]]]]]],[181,[[52,[[9,[63,14]]]]]],[-1,-1,[]],[-1,-1,[]],[53,[[52,[-1,[9,[63,14]]]]],108],[-1,-2,[],[]],[-1,-2,[],[]],[53,179],[53,181],[[181,2],[[52,[[9,[63,14]]]]]],[[181,[84,[127]]],[[52,[[9,[63,14]]]]]],[[181,72],[[52,[[9,[63,14]]]]]],[[181,-1],[[52,[4,[9,[63,14]]]]],[148,33]],[[181,-1],[[52,[4,[9,[63,14]]]]],[148,33]],[[181,-1,-2],[[52,[4,[9,[63,14]]]]],[148,33],[148,33]],[[181,182],[[52,[[9,[63,14]]]]]],[[181,183],[[52,[[9,[63,14]]]]]],[[181,-1],[[52,[4,[9,[63,14]]]]],[148,33]],[[181,1,-1],[[52,[4,[9,[63,14]]]]],[148,33]],[[181,184],[[52,[[9,[63,14]]]]]],[[181,185],[[52,[[9,[63,14]]]]]],[[181,79],[[52,[[9,[63,14]]]]]],[[181,186],[[52,[[9,[63,14]]]]]],[[181,187],[[52,[[9,[63,14]]]]]],[[181,-1],[[52,[4,[9,[63,14]]]]],[148,33]],[[181,[12,[39]]],[[52,[[9,[63,14]]]]]],[[181,1,-1],[[52,[[9,[63,14]]]]],[148,33]],[[181,1,188,1,-1],[[52,[[9,[63,14]]]]],[148,33]],[181,[[52,[[9,[63,14]]]]]],[[181,[12,[39]]],[[52,[[9,[63,14]]]]]],[[181,-1],[[52,[[9,[63,14]]]]],[148,33]],[[181,1],[[52,[[9,[63,14]]]]]],[[181,1,39],[[52,[[9,[63,14]]]]]],[[181,1,188,1,39],[[52,[[9,[63,14]]]]]],[[181,39],[[52,[[9,[63,14]]]]]],[[181,1,39],[[52,[[9,[63,14]]]]]],[[181,1,188,1,39],[[52,[[9,[63,14]]]]]],[[181,189],[[52,[[9,[63,14]]]]]],[[181,136],[[52,[[9,[63,14]]]]]],[[181,188],[[52,[[9,[63,14]]]]]],[[181,27],[[52,[[9,[63,14]]]]]],[[181,127],[[52,[[9,[63,14]]]]]],[181,[[52,[[9,[63,14]]]]]],[[181,1],[[52,[[9,[63,14]]]]]],[[181,1,188,1],[[52,[[9,[63,14]]]]]],[[181,-1],[[52,[4,[9,[63,14]]]]],[148,33]],[-1,[[52,[53,[9,[63,14]]]]],148],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,[[52,[-2]]],[],[]],[-1,54,[]],[-1,54,[]]],"c":[632,698,703,783,792,844,846,989,992,1124,1150,1213,1250,1253,1255,1263,1275,1487,1489,1493,1496,1499,1501,1503,1839,1840,1841,1842,1843,1844,1913,1915,1921,1926,1930,1933,1937,1939,2071,2072,2114],"p":[[15,"str"],[15,"bool"],[3,"DefaultModel",0],[15,"tuple"],[3,"Enforcer",0],[3,"String",2215],[3,"Vec",2216],[8,"Future",2217],[3,"Box",2218],[3,"Pin",2219],[8,"Send",2220],[4,"Option",2221],[3,"DefaultRoleManager",0],[3,"Global",2222],[3,"FileAdapter",0],[3,"Path",2223],[8,"AsRef",2224],[8,"Sync",2220],[3,"NullAdapter",0],[3,"MemoryAdapter",0],[8,"RoleManager",0],[6,"RwLock",2225],[3,"Shared",624],[4,"EventData",0],[6,"Result",0],[3,"Assertion",0],[15,"u64"],[3,"Filter",0],[4,"EffectKind",0],[3,"DefaultEffectStream",0],[3,"DefaultEffector",0],[4,"Event",0],[8,"Sized",2220],[8,"EnforceArgs",0],[3,"EnforceContext",0],[3,"Formatter",2226],[6,"Result",2226],[8,"Adapter",0],[15,"usize"],[8,"Hash",2227],[8,"BuildHasher",2227],[3,"LinkedHashMap",2228],[3,"HashMap",2229],[8,"Model",0],[3,"LinkedHashSet",2230],[8,"Hasher",2227],[6,"MatchingFn",0],[8,"TryIntoModel",0],[8,"TryIntoAdapter",0],[8,"EffectorStream",0],[8,"Effector",0],[4,"Result",2231],[3,"Dynamic",624],[3,"TypeId",1743],[4,"ModelError",500],[4,"RequestError",500],[4,"PolicyError",500],[4,"RbacError",500],[3,"AdapterError",500],[4,"Error",500],[3,"Error",2232],[3,"ParseError",624],[4,"EvalAltResult",624],[8,"Error",2233],[3,"FunctionMap",591],[8,"Iterator",2234],[3,"AST",624],[3,"Module",624],[3,"Instant",624],[3,"Duration",2235],[3,"ImmutableString",624],[15,"char"],[3,"Position",624],[8,"Into",2224],[3,"FnPtr",624],[8,"Allocator",2236],[3,"BorrowedFd",2237],[8,"AsFd",2237],[15,"i32"],[8,"AsRawFd",2238],[3,"Expression",624],[4,"Expr",2239],[4,"Stmt",2240],[15,"slice"],[3,"LazyCompact",2241],[3,"SmartString",2242],[19,"MaybeUninit",1987],[8,"Clone",2243],[3,"TypeBuilder",624],[3,"Engine",1743],[8,"FuncArgs",624],[8,"Variant",2244],[3,"NativeCallContext",624],[8,"AsMut",2224],[3,"EvalContext",624],[8,"Any",2245],[3,"Scope",624],[3,"Locked",624],[4,"FnNamespace",624],[4,"LexError",624],[4,"ParseErrorType",624],[3,"VarDefInfo",624],[4,"Ordering",2246],[8,"Ord",2246],[8,"FnMut",2247],[8,"Default",2248],[8,"Deserializer",2249],[8,"Deserialize",2249],[3,"Weak",2250],[8,"IntoIterator",2251],[3,"File",2252],[3,"Error",2226],[8,"Debug",2226],[8,"Display",2226],[3,"BTreeMap",2253],[3,"RangeInclusive",2254],[3,"RandomState",2229],[3,"Range",2254],[3,"HashSet",2255],[3,"BTreeSet",2256],[3,"GlobalRuntimeState",2257],[3,"CString",2258],[3,"CStr",2259],[15,"array"],[15,"never"],[3,"OsStr",2260],[15,"u8"],[3,"OsString",2260],[4,"Cow",2261],[8,"ToOwned",2261],[3,"PathBuf",2223],[3,"CustomTypeInfo",2262],[3,"PoisonError",2263],[4,"CallableFunction",1743],[3,"Caches",2264],[15,"u16"],[8,"FnOnce",2247],[8,"Fn",2247],[8,"SendSync",2265],[8,"Extend",2251],[3,"Request",2233],[3,"RwLockReadGuard",2266],[3,"BorrowedCursor",2267],[3,"DynamicReadLock",2268],[3,"IoSliceMut",2269],[4,"SeekFrom",2269],[8,"Serializer",2270],[8,"Serialize",2270],[4,"FnAccess",1743],[3,"Mut",2271],[8,"RegisterNativeFunction",624],[3,"AllocError",2236],[4,"TryLockError",2263],[3,"RwLockWriteGuard",2266],[3,"DynamicWriteLock",2268],[3,"IoSlice",2269],[3,"OnceCell",1509],[3,"ArithmeticPackage",1543],[3,"BasicArrayPackage",1543],[3,"BitFieldPackage",1543],[3,"BasicBlobPackage",1543],[3,"BasicFnPackage",1543],[3,"BasicIteratorPackage",1543],[3,"LanguageCorePackage",1543],[3,"LogicPackage",1543],[3,"BasicMapPackage",1543],[3,"BasicMathPackage",1543],[3,"CorePackage",1543],[3,"StandardPackage",1543],[3,"BasicStringPackage",1543],[3,"MoreStringPackage",1543],[3,"BasicTimePackage",1543],[8,"PluginFunction",1743],[3,"EncapsulatedEnviron",2272],[3,"Assume",1987],[3,"Discriminant",1987],[3,"ManuallyDrop",1987],[8,"Copy",2220],[3,"DynamicDeserializer",2122],[8,"Visitor",2249],[3,"DynamicSerializer",2122],[15,"f32"],[15,"f64"],[15,"i128"],[15,"i16"],[15,"i64"],[15,"i8"],[15,"u32"],[15,"u128"],[8,"CoreApi",0],[8,"MgmtApi",0],[8,"RbacApi",0],[8,"InternalApi",0],[8,"EventEmitter",0],[8,"CustomType",624],[8,"Package",1543],[6,"RhaiResult",1743],[13,"Pure",1979],[13,"Method",1979],[13,"Iterator",1979],[13,"Plugin",1979]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/settings.html b/settings.html index 314a435c..c27e8d80 100644 --- a/settings.html +++ b/settings.html @@ -1 +1 @@ -Rustdoc settings

    Rustdoc settings

    Back
    \ No newline at end of file +Rustdoc settings

    Rustdoc settings

    Back
    \ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 00000000..1d1efd5f --- /dev/null +++ b/src-files.js @@ -0,0 +1,4 @@ +var srcIndex = JSON.parse('{\ +"casbin":["",[["adapter",[],["file_adapter.rs","memory_adapter.rs","mod.rs","null_adapter.rs"]],["model",[],["assertion.rs","default_model.rs","function_map.rs","mod.rs"]],["rbac",[],["default_role_manager.rs","mod.rs","role_manager.rs"]]],["config.rs","convert.rs","core_api.rs","effector.rs","emitter.rs","enforcer.rs","error.rs","internal_api.rs","lib.rs","macros.rs","management_api.rs","prelude.rs","rbac_api.rs","util.rs"]]\ +}'); +createSrcSidebar(); diff --git a/src/casbin/adapter/file_adapter.rs.html b/src/casbin/adapter/file_adapter.rs.html index 66273b07..f580a285 100644 --- a/src/casbin/adapter/file_adapter.rs.html +++ b/src/casbin/adapter/file_adapter.rs.html @@ -1,4 +1,4 @@ -file_adapter.rs - source
    1
    +file_adapter.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/adapter/memory_adapter.rs.html b/src/casbin/adapter/memory_adapter.rs.html
    index cb5c9c06..dc8042fa 100644
    --- a/src/casbin/adapter/memory_adapter.rs.html
    +++ b/src/casbin/adapter/memory_adapter.rs.html
    @@ -1,4 +1,4 @@
    -memory_adapter.rs - source
    1
    +memory_adapter.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/adapter/mod.rs.html b/src/casbin/adapter/mod.rs.html
    index e054a4e6..4d272769 100644
    --- a/src/casbin/adapter/mod.rs.html
    +++ b/src/casbin/adapter/mod.rs.html
    @@ -1,4 +1,4 @@
    -mod.rs - source
    1
    +mod.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/adapter/null_adapter.rs.html b/src/casbin/adapter/null_adapter.rs.html
    index 9edcd131..4c56a5e5 100644
    --- a/src/casbin/adapter/null_adapter.rs.html
    +++ b/src/casbin/adapter/null_adapter.rs.html
    @@ -1,4 +1,4 @@
    -null_adapter.rs - source
    1
    +null_adapter.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/config.rs.html b/src/casbin/config.rs.html
    index e654de92..a7ce4b05 100644
    --- a/src/casbin/config.rs.html
    +++ b/src/casbin/config.rs.html
    @@ -1,4 +1,4 @@
    -config.rs - source
    1
    +config.rs - source
    1
     2
     3
     4
    @@ -348,7 +348,6 @@
     348
     349
     350
    -351
     
    use crate::Result;
     
     #[cfg(feature = "runtime-async-std")]
    @@ -502,8 +501,7 @@
             if section.is_empty() {
                 section = DEFAULT_SECTION.to_owned();
             }
    -        let section_value =
    -            self.data.entry(section).or_insert_with(HashMap::new);
    +        let section_value = self.data.entry(section).or_default();
     
             // if key not exists then insert, else update
             let key_value = section_value.get_mut(&option);
    diff --git a/src/casbin/convert.rs.html b/src/casbin/convert.rs.html
    index 82abac93..5c28f5fb 100644
    --- a/src/casbin/convert.rs.html
    +++ b/src/casbin/convert.rs.html
    @@ -1,4 +1,4 @@
    -convert.rs - source
    1
    +convert.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/core_api.rs.html b/src/casbin/core_api.rs.html
    index b75c5d36..e3579d57 100644
    --- a/src/casbin/core_api.rs.html
    +++ b/src/casbin/core_api.rs.html
    @@ -1,4 +1,4 @@
    -core_api.rs - source
    1
    +core_api.rs - source
    1
     2
     3
     4
    @@ -94,9 +94,18 @@
     94
     95
     96
    +97
    +98
    +99
    +100
    +101
    +102
    +103
    +104
     
    use crate::{
    -    Adapter, Effector, EnforceArgs, Event, EventEmitter, Filter, Model, Result,
    -    RoleManager, TryIntoAdapter, TryIntoModel,
    +    enforcer::EnforceContext, Adapter, Effector, EnforceArgs, Event,
    +    EventEmitter, Filter, Model, Result, RoleManager, TryIntoAdapter,
    +    TryIntoModel,
     };
     
     #[cfg(feature = "watcher")]
    @@ -160,6 +169,13 @@
             Self: Sized;
         fn set_effector(&mut self, e: Box<dyn Effector>);
         fn enforce<ARGS: EnforceArgs>(&self, rvals: ARGS) -> Result<bool>
    +    where
    +        Self: Sized;
    +    fn enforce_with_context<ARGS: EnforceArgs>(
    +        &self,
    +        ctx: EnforceContext,
    +        rvals: ARGS,
    +    ) -> Result<bool>
         where
             Self: Sized;
         fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool>
    diff --git a/src/casbin/effector.rs.html b/src/casbin/effector.rs.html
    index 6a6c1f42..4a8adde3 100644
    --- a/src/casbin/effector.rs.html
    +++ b/src/casbin/effector.rs.html
    @@ -1,4 +1,4 @@
    -effector.rs - source
    1
    +effector.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/emitter.rs.html b/src/casbin/emitter.rs.html
    index 41734455..fb84bcb8 100644
    --- a/src/casbin/emitter.rs.html
    +++ b/src/casbin/emitter.rs.html
    @@ -1,4 +1,4 @@
    -emitter.rs - source
    1
    +emitter.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/enforcer.rs.html b/src/casbin/enforcer.rs.html
    index 23b7aa87..e9f5921a 100644
    --- a/src/casbin/enforcer.rs.html
    +++ b/src/casbin/enforcer.rs.html
    @@ -1,4 +1,4 @@
    -enforcer.rs - source
    1
    +enforcer.rs - source
    1
     2
     3
     4
    @@ -1340,6 +1340,228 @@
     1340
     1341
     1342
    +1343
    +1344
    +1345
    +1346
    +1347
    +1348
    +1349
    +1350
    +1351
    +1352
    +1353
    +1354
    +1355
    +1356
    +1357
    +1358
    +1359
    +1360
    +1361
    +1362
    +1363
    +1364
    +1365
    +1366
    +1367
    +1368
    +1369
    +1370
    +1371
    +1372
    +1373
    +1374
    +1375
    +1376
    +1377
    +1378
    +1379
    +1380
    +1381
    +1382
    +1383
    +1384
    +1385
    +1386
    +1387
    +1388
    +1389
    +1390
    +1391
    +1392
    +1393
    +1394
    +1395
    +1396
    +1397
    +1398
    +1399
    +1400
    +1401
    +1402
    +1403
    +1404
    +1405
    +1406
    +1407
    +1408
    +1409
    +1410
    +1411
    +1412
    +1413
    +1414
    +1415
    +1416
    +1417
    +1418
    +1419
    +1420
    +1421
    +1422
    +1423
    +1424
    +1425
    +1426
    +1427
    +1428
    +1429
    +1430
    +1431
    +1432
    +1433
    +1434
    +1435
    +1436
    +1437
    +1438
    +1439
    +1440
    +1441
    +1442
    +1443
    +1444
    +1445
    +1446
    +1447
    +1448
    +1449
    +1450
    +1451
    +1452
    +1453
    +1454
    +1455
    +1456
    +1457
    +1458
    +1459
    +1460
    +1461
    +1462
    +1463
    +1464
    +1465
    +1466
    +1467
    +1468
    +1469
    +1470
    +1471
    +1472
    +1473
    +1474
    +1475
    +1476
    +1477
    +1478
    +1479
    +1480
    +1481
    +1482
    +1483
    +1484
    +1485
    +1486
    +1487
    +1488
    +1489
    +1490
    +1491
    +1492
    +1493
    +1494
    +1495
    +1496
    +1497
    +1498
    +1499
    +1500
    +1501
    +1502
    +1503
    +1504
    +1505
    +1506
    +1507
    +1508
    +1509
    +1510
    +1511
    +1512
    +1513
    +1514
    +1515
    +1516
    +1517
    +1518
    +1519
    +1520
    +1521
    +1522
    +1523
    +1524
    +1525
    +1526
    +1527
    +1528
    +1529
    +1530
    +1531
    +1532
    +1533
    +1534
    +1535
    +1536
    +1537
    +1538
    +1539
    +1540
    +1541
    +1542
    +1543
    +1544
    +1545
    +1546
    +1547
    +1548
    +1549
    +1550
    +1551
    +1552
    +1553
    +1554
    +1555
    +1556
    +1557
    +1558
    +1559
    +1560
    +1561
    +1562
    +1563
    +1564
     
    use crate::{
         adapter::{Adapter, Filter},
         convert::{EnforceArgs, TryIntoAdapter, TryIntoModel},
    @@ -1347,7 +1569,7 @@
         effector::{DefaultEffector, EffectKind, Effector},
         emitter::{Event, EventData, EventEmitter},
         error::{ModelError, PolicyError, RequestError},
    -    get_or_err,
    +    get_or_err, get_or_err_with_context,
         management_api::MgmtApi,
         model::{FunctionMap, Model},
         rbac::{DefaultRoleManager, RoleManager},
    @@ -1416,9 +1638,33 @@
         logger: Box<dyn Logger>,
     }
     
    +pub struct EnforceContext {
    +    pub r_type: String,
    +    pub p_type: String,
    +    pub e_type: String,
    +    pub m_type: String,
    +}
    +
    +impl EnforceContext {
    +    pub fn new(suffix: &str) -> Self {
    +        Self {
    +            r_type: format!("r{}", suffix),
    +            p_type: format!("p{}", suffix),
    +            e_type: format!("e{}", suffix),
    +            m_type: format!("m{}", suffix),
    +        }
    +    }
    +    pub fn get_cache_key(&self) -> String {
    +        format!(
    +            "EnforceContext{{{}-{}-{}-{}}}",
    +            &self.r_type, &self.p_type, &self.e_type, &self.m_type,
    +        )
    +    }
    +}
    +
     impl EventEmitter<Event> for Enforcer {
         fn on(&mut self, e: Event, f: fn(&mut Self, EventData)) {
    -        self.events.entry(e).or_insert_with(Vec::new).push(f)
    +        self.events.entry(e).or_default().push(f)
         }
     
         fn off(&mut self, e: Event) {
    @@ -1469,7 +1715,136 @@
                 self.eft.new_stream(&e_ast.value, max(policy_len, 1));
             let m_ast_compiled = self
                 .engine
    -            .compile_expression(&escape_eval(&m_ast.value))
    +            .compile_expression(escape_eval(&m_ast.value))
    +            .map_err(Into::<Box<EvalAltResult>>::into)?;
    +
    +        if policy_len == 0 {
    +            for token in p_ast.tokens.iter() {
    +                scope.push_constant(token, String::new());
    +            }
    +
    +            let eval_result = self
    +                .engine
    +                .eval_ast_with_scope::<bool>(&mut scope, &m_ast_compiled)?;
    +            let eft = if eval_result {
    +                EffectKind::Allow
    +            } else {
    +                EffectKind::Indeterminate
    +            };
    +
    +            eft_stream.push_effect(eft);
    +
    +            return Ok((eft_stream.next(), None));
    +        }
    +
    +        for pvals in policies {
    +            scope.rewind(scope_len);
    +
    +            if p_ast.tokens.len() != pvals.len() {
    +                return Err(PolicyError::UnmatchPolicyDefinition(
    +                    p_ast.tokens.len(),
    +                    pvals.len(),
    +                )
    +                .into());
    +            }
    +            for (ptoken, pval) in p_ast.tokens.iter().zip(pvals.iter()) {
    +                scope.push_constant(ptoken, pval.to_owned());
    +            }
    +
    +            let eval_result = self
    +                .engine
    +                .eval_ast_with_scope::<bool>(&mut scope, &m_ast_compiled)?;
    +            let eft = match p_ast.tokens.iter().position(|x| x == "p_eft") {
    +                Some(j) if eval_result => {
    +                    let p_eft = &pvals[j];
    +                    if p_eft == "deny" {
    +                        EffectKind::Deny
    +                    } else if p_eft == "allow" {
    +                        EffectKind::Allow
    +                    } else {
    +                        EffectKind::Indeterminate
    +                    }
    +                }
    +                None if eval_result => EffectKind::Allow,
    +                _ => EffectKind::Indeterminate,
    +            };
    +
    +            if eft_stream.push_effect(eft) {
    +                break;
    +            }
    +        }
    +
    +        Ok((eft_stream.next(), {
    +            #[cfg(feature = "explain")]
    +            {
    +                eft_stream.explain()
    +            }
    +            #[cfg(not(feature = "explain"))]
    +            {
    +                None
    +            }
    +        }))
    +    }
    +
    +    pub(crate) fn private_enforce_with_context(
    +        &self,
    +        ctx: EnforceContext,
    +        rvals: &[Dynamic],
    +    ) -> Result<(bool, Option<Vec<usize>>)> {
    +        if !self.enabled {
    +            return Ok((true, None));
    +        }
    +
    +        let mut scope: Scope = Scope::new();
    +        let r_ast = get_or_err_with_context!(
    +            self,
    +            "r",
    +            &ctx.r_type,
    +            ModelError::R,
    +            "request"
    +        );
    +        let p_ast = get_or_err_with_context!(
    +            self,
    +            "p",
    +            &ctx.p_type,
    +            ModelError::P,
    +            "policy"
    +        );
    +        let m_ast = get_or_err_with_context!(
    +            self,
    +            "m",
    +            &ctx.m_type,
    +            ModelError::M,
    +            "matcher"
    +        );
    +        let e_ast = get_or_err_with_context!(
    +            self,
    +            "e",
    +            &ctx.e_type,
    +            ModelError::E,
    +            "effector"
    +        );
    +
    +        if r_ast.tokens.len() != rvals.len() {
    +            return Err(RequestError::UnmatchRequestDefinition(
    +                r_ast.tokens.len(),
    +                rvals.len(),
    +            )
    +            .into());
    +        }
    +
    +        for (rtoken, rval) in r_ast.tokens.iter().zip(rvals.iter()) {
    +            scope.push_constant_dynamic(rtoken, rval.to_owned());
    +        }
    +
    +        let policies = p_ast.get_policy();
    +        let (policy_len, scope_len) = (policies.len(), scope.len());
    +
    +        let mut eft_stream =
    +            self.eft.new_stream(&e_ast.value, max(policy_len, 1));
    +        let m_ast_compiled = self
    +            .engine
    +            .compile_expression(escape_eval(&m_ast.value))
                 .map_err(Into::<Box<EvalAltResult>>::into)?;
     
             if policy_len == 0 {
    @@ -1768,6 +2143,75 @@
     
             Ok(authorized)
         }
    +    /// Enforce decides whether a "subject" can access a "object" with the operation "action",
    +    /// input parameters are usually: (sub, obj, act).
    +    /// this function will add suffix to each model eg. r2, p2, e2, m2, g2,
    +    ///
    +    /// # Examples
    +    /// ```
    +    /// use casbin::prelude::*;
    +    /// use casbin::EnforceContext;
    +    ///
    +    /// #[cfg(feature = "runtime-async-std")]
    +    /// #[async_std::main]
    +    /// async fn main() -> Result<()> {
    +    ///     let mut e = Enforcer::new("examples/multi_section_model.conf", "examples/multi_section_policy.csv").await?;
    +    ///     assert_eq!(true, e.enforce(("alice", "read", "project1"))?);
    +    ///     let ctx = EnforceContext::new("2");
    +    ///     assert_eq!(true, e.enforce_with_context(ctx, ("james", "execute"))?);
    +    ///     Ok(())
    +    /// }
    +    ///
    +    /// #[cfg(feature = "runtime-tokio")]
    +    /// #[tokio::main]
    +    /// async fn main() -> Result<()> {
    +    ///     let mut e = Enforcer::new("examples/multi_section_model.conf", "examples/multi_section_policy.csv").await?;
    +    ///     assert_eq!(true, e.enforce(("alice", "read", "project1"))?);
    +    ///     let ctx = EnforceContext::new("2");
    +    ///     assert_eq!(true, e.enforce_with_context(ctx, ("james", "execute"))?);
    +    ///
    +    ///     Ok(())
    +    /// }
    +    /// #[cfg(all(not(feature = "runtime-async-std"), not(feature = "runtime-tokio")))]
    +    /// fn main() {}
    +    /// ```
    +
    +    fn enforce_with_context<ARGS: EnforceArgs>(
    +        &self,
    +        ctx: EnforceContext,
    +        rvals: ARGS,
    +    ) -> Result<bool> {
    +        let rvals = rvals.try_into_vec()?;
    +        #[allow(unused_variables)]
    +        let (authorized, indices) =
    +            self.private_enforce_with_context(ctx, &rvals)?;
    +
    +        #[cfg(feature = "logging")]
    +        {
    +            self.logger.print_enforce_log(
    +                rvals.iter().map(|x| x.to_string()).collect(),
    +                authorized,
    +                false,
    +            );
    +
    +            #[cfg(feature = "explain")]
    +            if let Some(indices) = indices {
    +                let all_rules = get_or_err!(self, "p", ModelError::P, "policy")
    +                    .get_policy();
    +
    +                let rules: Vec<String> = indices
    +                    .into_iter()
    +                    .filter_map(|y| {
    +                        all_rules.iter().nth(y).map(|x| x.join(", "))
    +                    })
    +                    .collect();
    +
    +                self.logger.print_explain_log(rules);
    +            }
    +        }
    +
    +        Ok(authorized)
    +    }
     
         fn enforce_mut<ARGS: EnforceArgs>(&mut self, rvals: ARGS) -> Result<bool> {
             self.enforce(rvals)
    diff --git a/src/casbin/error.rs.html b/src/casbin/error.rs.html
    index 59aa723f..2f6f316f 100644
    --- a/src/casbin/error.rs.html
    +++ b/src/casbin/error.rs.html
    @@ -1,4 +1,4 @@
    -error.rs - source
    1
    +error.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/internal_api.rs.html b/src/casbin/internal_api.rs.html
    index b1f4aacc..4758af36 100644
    --- a/src/casbin/internal_api.rs.html
    +++ b/src/casbin/internal_api.rs.html
    @@ -1,4 +1,4 @@
    -internal_api.rs - source
    1
    +internal_api.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/lib.rs.html b/src/casbin/lib.rs.html
    index a7572486..43e12bc0 100644
    --- a/src/casbin/lib.rs.html
    +++ b/src/casbin/lib.rs.html
    @@ -1,4 +1,4 @@
    -lib.rs - source
    1
    +lib.rs - source
    1
     2
     3
     4
    @@ -65,6 +65,7 @@
     65
     66
     67
    +68
     
    #[cfg(all(not(feature = "logging"), feature = "explain"))]
     compile_error!(
         "'logging' feature must be enabled along with 'explain' feature"
    @@ -114,6 +115,7 @@
         DefaultEffectStream, DefaultEffector, EffectKind, Effector, EffectorStream,
     };
     pub use emitter::{Event, EventData, EventEmitter, EventKey};
    +pub use enforcer::EnforceContext;
     pub use enforcer::Enforcer;
     pub use error::Error;
     pub use internal_api::InternalApi;
    diff --git a/src/casbin/macros.rs.html b/src/casbin/macros.rs.html
    index 44145d81..02aa61cf 100644
    --- a/src/casbin/macros.rs.html
    +++ b/src/casbin/macros.rs.html
    @@ -1,4 +1,4 @@
    -macros.rs - source
    1
    +macros.rs - source
    1
     2
     3
     4
    @@ -62,6 +62,29 @@
     62
     63
     64
    +65
    +66
    +67
    +68
    +69
    +70
    +71
    +72
    +73
    +74
    +75
    +76
    +77
    +78
    +79
    +80
    +81
    +82
    +83
    +84
    +85
    +86
    +87
     
    #[macro_export]
     macro_rules! get_or_err {
         ($this:ident, $key:expr, $err:expr, $msg:expr) => {{
    @@ -85,6 +108,29 @@
         }};
     }
     
    +#[macro_export]
    +macro_rules! get_or_err_with_context {
    +    ($this:ident, $key:expr, $ctx:expr, $err:expr, $msg:expr) => {{
    +        $this
    +            .get_model()
    +            .get_model()
    +            .get($key)
    +            .ok_or_else(|| {
    +                $crate::error::Error::from($err(format!(
    +                    "Missing {} definition in conf file",
    +                    $msg
    +                )))
    +            })?
    +            .get($ctx)
    +            .ok_or_else(|| {
    +                $crate::error::Error::from($err(format!(
    +                    "Missing {} section in conf file",
    +                    $msg
    +                )))
    +            })?
    +    }};
    +}
    +
     #[macro_export]
     macro_rules! register_g_function {
         ($enforcer:ident, $fname:ident, $ast:ident) => {{
    diff --git a/src/casbin/management_api.rs.html b/src/casbin/management_api.rs.html
    index c87279c9..1b96ae69 100644
    --- a/src/casbin/management_api.rs.html
    +++ b/src/casbin/management_api.rs.html
    @@ -1,4 +1,4 @@
    -management_api.rs - source
    1
    +management_api.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/model/assertion.rs.html b/src/casbin/model/assertion.rs.html
    index 2085a9dd..46077e15 100644
    --- a/src/casbin/model/assertion.rs.html
    +++ b/src/casbin/model/assertion.rs.html
    @@ -1,4 +1,4 @@
    -assertion.rs - source
    1
    +assertion.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/model/default_model.rs.html b/src/casbin/model/default_model.rs.html
    index 67349511..3d36a01f 100644
    --- a/src/casbin/model/default_model.rs.html
    +++ b/src/casbin/model/default_model.rs.html
    @@ -1,4 +1,4 @@
    -default_model.rs - source
    1
    +default_model.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/model/function_map.rs.html b/src/casbin/model/function_map.rs.html
    index 384ac43c..a58a9044 100644
    --- a/src/casbin/model/function_map.rs.html
    +++ b/src/casbin/model/function_map.rs.html
    @@ -1,4 +1,4 @@
    -function_map.rs - source
    1
    +function_map.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/model/mod.rs.html b/src/casbin/model/mod.rs.html
    index 761bc012..99470e6c 100644
    --- a/src/casbin/model/mod.rs.html
    +++ b/src/casbin/model/mod.rs.html
    @@ -1,4 +1,4 @@
    -mod.rs - source
    1
    +mod.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/prelude.rs.html b/src/casbin/prelude.rs.html
    index 09d44bdc..5a388829 100644
    --- a/src/casbin/prelude.rs.html
    +++ b/src/casbin/prelude.rs.html
    @@ -1,4 +1,4 @@
    -prelude.rs - source
    1
    +prelude.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/rbac/default_role_manager.rs.html b/src/casbin/rbac/default_role_manager.rs.html
    index 6b97b4ac..cab822a5 100644
    --- a/src/casbin/rbac/default_role_manager.rs.html
    +++ b/src/casbin/rbac/default_role_manager.rs.html
    @@ -1,4 +1,4 @@
    -default_role_manager.rs - source
    1
    +default_role_manager.rs - source
    1
     2
     3
     4
    @@ -788,9 +788,6 @@
     788
     789
     790
    -791
    -792
    -793
     
    use crate::{
         error::RbacError,
         rbac::{MatchingFn, RoleManager},
    @@ -846,15 +843,12 @@
         ) -> NodeIndex<u32> {
             let domain = domain.unwrap_or(DEFAULT_DOMAIN);
     
    -        let graph = self
    -            .all_domains
    -            .entry(domain.into())
    -            .or_insert_with(StableDiGraph::new);
    +        let graph = self.all_domains.entry(domain.into()).or_default();
     
             let role_entry = self
                 .all_domains_indices
                 .entry(domain.into())
    -            .or_insert_with(HashMap::new)
    +            .or_default()
                 .entry(name.into());
     
             let vacant_entry = match role_entry {
    diff --git a/src/casbin/rbac/mod.rs.html b/src/casbin/rbac/mod.rs.html
    index 6624339a..f2503f0f 100644
    --- a/src/casbin/rbac/mod.rs.html
    +++ b/src/casbin/rbac/mod.rs.html
    @@ -1,4 +1,4 @@
    -mod.rs - source
    1
    +mod.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/rbac/role_manager.rs.html b/src/casbin/rbac/role_manager.rs.html
    index d9275131..7d142df9 100644
    --- a/src/casbin/rbac/role_manager.rs.html
    +++ b/src/casbin/rbac/role_manager.rs.html
    @@ -1,4 +1,4 @@
    -role_manager.rs - source
    1
    +role_manager.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/rbac_api.rs.html b/src/casbin/rbac_api.rs.html
    index 81655a53..0872343a 100644
    --- a/src/casbin/rbac_api.rs.html
    +++ b/src/casbin/rbac_api.rs.html
    @@ -1,4 +1,4 @@
    -rbac_api.rs - source
    1
    +rbac_api.rs - source
    1
     2
     3
     4
    diff --git a/src/casbin/util.rs.html b/src/casbin/util.rs.html
    index a8634b28..8312e440 100644
    --- a/src/casbin/util.rs.html
    +++ b/src/casbin/util.rs.html
    @@ -1,4 +1,4 @@
    -util.rs - source
    1
    +util.rs - source
    1
     2
     3
     4
    diff --git a/static.files/main-c5bd66d33317d69f.js b/static.files/main-c5bd66d33317d69f.js
    new file mode 100644
    index 00000000..43133d66
    --- /dev/null
    +++ b/static.files/main-c5bd66d33317d69f.js
    @@ -0,0 +1,12 @@
    +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar&&locationTitle){const mobileTitle=document.createElement("h2");mobileTitle.innerHTML=locationTitle.innerHTML;mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

    "+searchState.loadingText+"

    ";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
    "+window.NOTABLE_TRAITS[notable_ty]+"
    "}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,e)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
    "+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
    "+x[1]+"
    ").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

    Keyboard Shortcuts

    "+shortcuts+"
    ";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

    "+x+"

    ").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

    Search Tricks

    "+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/noscript-5d8b3c7633ad77ba.css b/static.files/noscript-5d8b3c7633ad77ba.css new file mode 100644 index 00000000..8c63ef06 --- /dev/null +++ b/static.files/noscript-5d8b3c7633ad77ba.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}} \ No newline at end of file diff --git a/static.files/rustdoc-fa3bb1812debf86c.css b/static.files/rustdoc-fa3bb1812debf86c.css new file mode 100644 index 00000000..2dd5cebc --- /dev/null +++ b/static.files/rustdoc-fa3bb1812debf86c.css @@ -0,0 +1,10 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:300px;}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{margin-top:10px;margin-bottom:10px;text-align:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;align-items:center;vertical-align:text-bottom;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/static.files/search-8be46b629f5f14a8.js b/static.files/search-8be46b629f5f14a8.js new file mode 100644 index 00000000..4ecf5c55 --- /dev/null +++ b/static.files/search-8be46b629f5f14a8.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias","generic",];const longItemTypes=["module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","primitive type","assoc type","constant","assoc const","union","foreign type","keyword","existential type","attribute macro","derive macro","trait alias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){return typeNameIdMap.get(name)}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,id);return id}}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-]".indexOf(c)!==-1}function isStopCharacter(c){return isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","}function isPathSeparator(c){return c===":"||isWhitespace(c)}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(!isWhitespace(c)){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",generics:[],typeFilter:"primitive",}}if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(path.includes("::::")){throw["Unexpected ","::::"]}else if(path.includes(" ::")){throw["Unexpected "," ::"]}else if(path.includes(":: ")){throw["Unexpected ",":: "]}const pathSegments=path.split(/::|\s+/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast:pathSegments[pathSegments.length-1],generics:generics,typeFilter,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",","," or ",endChar,...extra,", found ",c,]}throw["Expected ",",",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isWhitespace(c)){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(fnType,queryElem,whereClause,mgensInout){return unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgensInout,mgens=>{if(mgensInout){for(const[fid,qid]of mgens.entries()){mgensInout.set(fid,qid)}}return true})}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){let mgens=new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;let fl=fnTypesIn.length;let fnTypes=fnTypesIn.slice();const backtracking=[];let i=0;let j=0;const backtrack=()=>{while(backtracking.length!==0){const{fnTypesScratch,mgensScratch,queryElemsOffset,fnTypesOffset,unbox,}=backtracking.pop();mgens=new Map(mgensScratch);const fnType=fnTypesScratch[fnTypesOffset];const queryElem=queryElems[queryElemsOffset];if(unbox){if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}mgens.set(fnType.id,0)}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;fnTypes=fnTypesScratch.toSpliced(fnTypesOffset,1,...generics);fl=fnTypes.length;i=queryElemsOffset-1}else{if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}mgens.set(fnType.id,queryElem.id)}fnTypes=fnTypesScratch.slice();fl=fnTypes.length;const tmp=fnTypes[queryElemsOffset];fnTypes[queryElemsOffset]=fnTypes[fnTypesOffset];fnTypes[fnTypesOffset]=tmp;i=queryElemsOffset}return true}return false};for(i=0;i!==ql;++i){const queryElem=queryElems[i];const matchCandidates=[];let fnTypesScratch=null;let mgensScratch=null;for(j=i;j!==fl;++j){const fnType=fnTypes[j];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgens,mgensScratch=>{matchCandidates.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:false,});return false})}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}if(!mgensScratch){mgensScratch=new Map(mgens)}backtracking.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:true,})}}if(matchCandidates.length===0){if(backtrack()){continue}else{return false}}const{fnTypesOffset:candidate,mgensScratch:mgensNew}=matchCandidates.pop();if(fnTypes[candidate].id<0&&queryElems[i].id<0){mgens.set(fnTypes[candidate].id,queryElems[i].id)}for(const[fid,qid]of mgensNew){mgens.set(fid,qid)}const tmp=fnTypes[candidate];fnTypes[candidate]=fnTypes[i];fnTypes[i]=tmp;for(const otherCandidate of matchCandidates){backtracking.push(otherCandidate)}while(i===(ql-1)&&solutionCb&&!solutionCb(mgens)){if(!backtrack()){return false}}}return true}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgens.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}else if(fnType.id!==null){if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id){return false}if(fnType.generics.length===0&&queryElem.generics.length!==0){return false}const queryElemPathLength=queryElem.pathWithoutLast.length;if(queryElemPathLength>0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i=0){if(!whereClause){return false}if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause)}else if(fnType.generics&&fnType.generics.length>0){return checkIfInList(fnType.generics,queryElem,whereClause)}return false}function checkIfInList(list,elem,whereClause){for(const entry of list){if(checkType(entry,elem,whereClause)){return true}}return false}function checkType(row,elem,whereClause){if(row.id===null){return row.generics.length>0?checkIfInList(row.generics,elem,whereClause):false}if(row.id<0&&elem.id>=0){const gid=(-row.id)-1;return checkIfInList(whereClause[gid],elem,whereClause)}if(row.id<0&&elem.id<0){return true}const matchesExact=row.id===elem.id;const matchesArrayOrSlice=elem.id===typeNameIdOfArrayOrSlice&&(row.id===typeNameIdOfSlice||row.id===typeNameIdOfArray);if((matchesExact||matchesArrayOrSlice)&&typePassesFilter(elem.typeFilter,row.ty)){if(elem.generics.length>0){return checkGenerics(row,elem,whereClause,new Map())}return true}return checkIfInList(row.generics,elem,whereClause)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);if(in_args){addIntoResults(results_in_args,fullId,pos,-1,0,0,maxEditDistance)}const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(returned){addIntoResults(results_returned,fullId,pos,-1,0,0,maxEditDistance)}if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}addIntoResults(results,row.id,pos,0,0,0,Number.MAX_VALUE)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem){if(typeNameIdMap.has(elem.pathLast)){elem.id=typeNameIdMap.get(elem.pathLast)}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,id]of typeNameIdMap){const dist=editDistance(name,elem.pathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}}for(const elem of parsedQuery.elems){convertNameToId(elem)}for(const elem of parsedQuery.returned){convertNameToId(elem)}if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";length+=1;const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
    \ +${item.alias} - see \ +
    `}resultName.insertAdjacentHTML("beforeend",`
    ${alias}\ +${item.displayPath}${name}\ +
    `);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
    "+"Try on DuckDuckGo?

    "+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
    "}let output=`

    Results${crates}

    `;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

    Query parser error: "${error.join("")}".

    `;output+="
    "+makeTabHeader(0,"In Names",ret_others[1])+"
    ";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
    "+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
    "}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
    "+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
    ";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

    "+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

    `}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

    "+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

    `}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name),ty:item.ty,path:item.path,generics,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/static.files/settings-74424d7eec62a23e.js b/static.files/settings-74424d7eec62a23e.js new file mode 100644 index 00000000..3014f75c --- /dev/null +++ b/static.files/settings-74424d7eec62a23e.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
    +
    ${setting_name}
    +
    `;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
    +
    `}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
    \ + \ +
    `}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
    ${buildSettingsPageSections(settings)}
    `;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-3280b574d94e47b4.js b/static.files/src-script-3280b574d94e47b4.js new file mode 100644 index 00000000..9ea88921 --- /dev/null +++ b/static.files/src-script-3280b574d94e47b4.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"src-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"src-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(srcIndex).forEach(key=>{srcIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(srcIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSrcLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSrcLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-fec3eaa3851e447d.js b/static.files/storage-fec3eaa3851e447d.js new file mode 100644 index 00000000..a687118f --- /dev/null +++ b/static.files/storage-fec3eaa3851e447d.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file
    PlatformSystem call
    SGXinsecure_time usercall. More information on timekeeping in SGX