pub struct ContextAttributes { /* private fields */ }Expand description
ContextAttributes is used to handle redaction of select context properties when serializing a Context that will be sent to LaunchDarkly.
Implementations§
Source§impl ContextAttributes
impl ContextAttributes
Sourcepub fn from_context(
context: Context,
all_attributes_private: bool,
private_attributes: HashSet<Reference>,
) -> Self
pub fn from_context( context: Context, all_attributes_private: bool, private_attributes: HashSet<Reference>, ) -> Self
Construct from a source context, indicating if all attributes should be private, and providing a set of attribute references that should be selectively marked private.
Sourcepub fn from_context_with_anonymous_redaction(
context: Context,
all_attributes_private: bool,
private_attributes: HashSet<Reference>,
) -> Self
pub fn from_context_with_anonymous_redaction( context: Context, all_attributes_private: bool, private_attributes: HashSet<Reference>, ) -> Self
Construct from a source context, indicating if all attributes should be private, and providing a set of attribute references that should be selectively marked private.
If a provided context is anonymous, all attributes will be redacted except for key, kind, and anonymous.
Trait Implementations§
Source§impl Debug for ContextAttributes
impl Debug for ContextAttributes
Auto Trait Implementations§
impl Freeze for ContextAttributes
impl RefUnwindSafe for ContextAttributes
impl Send for ContextAttributes
impl Sync for ContextAttributes
impl Unpin for ContextAttributes
impl UnwindSafe for ContextAttributes
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> 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