pub struct PrivateScope { /* private fields */ }Expand description
Private scope manager
Implementations§
Source§impl PrivateScope
impl PrivateScope
pub fn new() -> Self
Sourcepub fn add(&mut self, name: &str, value: ParamValue, readonly: bool) -> bool
pub fn add(&mut self, name: &str, value: ParamValue, readonly: bool) -> bool
Add a private parameter
Sourcepub fn get(&self, name: &str) -> Option<&PrivateParam>
pub fn get(&self, name: &str) -> Option<&PrivateParam>
Get a private parameter
Sourcepub fn get_mut(&mut self, name: &str) -> Option<&mut PrivateParam>
pub fn get_mut(&mut self, name: &str) -> Option<&mut PrivateParam>
Get a private parameter mutably
Sourcepub fn is_private(&self, name: &str) -> bool
pub fn is_private(&self, name: &str) -> bool
Check if a parameter is private at current scope
Sourcepub fn set(&mut self, name: &str, value: ParamValue) -> bool
pub fn set(&mut self, name: &str, value: ParamValue) -> bool
Set parameter value if not readonly
Sourcepub fn list_current(&self) -> Vec<&PrivateParam>
pub fn list_current(&self) -> Vec<&PrivateParam>
List all private parameters at current level
Sourcepub fn list_all(&self) -> Vec<&PrivateParam>
pub fn list_all(&self) -> Vec<&PrivateParam>
List all private parameters
Trait Implementations§
Source§impl Debug for PrivateScope
impl Debug for PrivateScope
Source§impl Default for PrivateScope
impl Default for PrivateScope
Source§fn default() -> PrivateScope
fn default() -> PrivateScope
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PrivateScope
impl RefUnwindSafe for PrivateScope
impl Send for PrivateScope
impl Sync for PrivateScope
impl Unpin for PrivateScope
impl UnsafeUnpin for PrivateScope
impl UnwindSafe for PrivateScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more