Struct azeventhubs::authorization::SharedAccessCredential
source · pub struct SharedAccessCredential { /* private fields */ }Expand description
Provides a credential based on a shared access signature for a given Event Hub instance.
Implementations§
sourcepub fn try_from_sas_credential(
source_sas_credential: AzureSasCredential
) -> Result<Self, SasSignatureError>
pub fn try_from_sas_credential( source_sas_credential: AzureSasCredential ) -> Result<Self, SasSignatureError>
Initializes a new instance of the SharedAccessCredential class.
source_sas_credential- TheAzureSasCredentialto base signatures on.
sourcepub fn try_from_named_key_credential(
source_credential: AzureNamedKeyCredential,
signature_resource: impl Into<String>
) -> Result<Self, SasSignatureError>
pub fn try_from_named_key_credential( source_credential: AzureNamedKeyCredential, signature_resource: impl Into<String> ) -> Result<Self, SasSignatureError>
Initializes a new instance of the SharedAccessCredential class.
source_credential- TheAzureNamedKeyCredentialto base signatures on.signature_resource- The fully-qualified identifier for the resource to which this credential is intended to serve as authorization for. This is also known as the “token audience” in some contexts.
A helper function
crate::authorization::build_connection_signature_authorization_resource can be used to
build the signature_resource value.
Trait Implementations§
source§fn from(source: SharedAccessCredential) -> Self
fn from(source: SharedAccessCredential) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
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