pub struct TopicPermission { /* private fields */ }Expand description
Permissions per topic for the DataAccessToken.
Implementations§
Source§impl TopicPermission
impl TopicPermission
Sourcepub fn new(
action: Action,
stream: impl Into<String>,
prefix: impl Into<String>,
topic_pattern: impl Into<String>,
) -> Self
pub fn new( action: Action, stream: impl Into<String>, prefix: impl Into<String>, topic_pattern: impl Into<String>, ) -> Self
Creates a new TopicPermission instance.
§Arguments
resource- the resource to define what the client can access in terms of stream, prefix, topic, and type.action- the action to define what the client can do with the resource.
§Returns
Returns a new TopicPermission instance.
Sourcepub fn full_qualified_topic_name(&self) -> String
pub fn full_qualified_topic_name(&self) -> String
Returns the full qualified topic name of resource.
Sourcepub fn topic_pattern(&self) -> &str
pub fn topic_pattern(&self) -> &str
topic pattern, e.g. +/+/+/something/#
Trait Implementations§
Source§impl Clone for TopicPermission
impl Clone for TopicPermission
Source§fn clone(&self) -> TopicPermission
fn clone(&self) -> TopicPermission
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TopicPermission
impl Debug for TopicPermission
Source§impl<'de> Deserialize<'de> for TopicPermission
impl<'de> Deserialize<'de> for TopicPermission
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for TopicPermission
impl Hash for TopicPermission
Source§impl PartialEq for TopicPermission
impl PartialEq for TopicPermission
Source§impl Serialize for TopicPermission
impl Serialize for TopicPermission
impl StructuralPartialEq for TopicPermission
Auto Trait Implementations§
impl Freeze for TopicPermission
impl RefUnwindSafe for TopicPermission
impl Send for TopicPermission
impl Sync for TopicPermission
impl Unpin for TopicPermission
impl UnsafeUnpin for TopicPermission
impl UnwindSafe for TopicPermission
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