Struct ruma_signatures::Signature
source · pub struct Signature { /* private fields */ }
Expand description
A digital signature.
Implementations
sourceimpl Signature
impl Signature
sourcepub fn new(id: &str, bytes: &[u8]) -> Result<Self, Error>
pub fn new(id: &str, bytes: &[u8]) -> Result<Self, Error>
Creates a signature from raw bytes.
Parameters
- id: A key identifier, e.g. “ed25519:1”.
- bytes: The digital signature, as a series of bytes.
Errors
Returns an error if the key identifier is invalid.
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
The raw bytes of the signature.
Trait Implementations
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more