Struct ssri::IntegrityOpts
source · pub struct IntegrityOpts { /* private fields */ }
Expand description
Implementations§
source§impl IntegrityOpts
impl IntegrityOpts
sourcepub fn new() -> IntegrityOpts ⓘ
pub fn new() -> IntegrityOpts ⓘ
Creates a new hashing IntegrityOpts.
sourcepub fn algorithm(self, algo: Algorithm) -> Self
pub fn algorithm(self, algo: Algorithm) -> Self
Generate a hash for this algorithm. Can be called multiple times to generate an Integrity
string with multiple entries.
sourcepub fn input<B: AsRef<[u8]>>(&mut self, input: B)
pub fn input<B: AsRef<[u8]>>(&mut self, input: B)
Add some data to this IntegrityOpts. All internal hashers will be updated for all configured Algorithm
s.
Trait Implementations§
source§impl Clone for IntegrityOpts
impl Clone for IntegrityOpts
source§impl Debug for IntegrityOpts
impl Debug for IntegrityOpts
source§impl Default for IntegrityOpts
impl Default for IntegrityOpts
source§impl Update for IntegrityOpts
impl Update for IntegrityOpts
source§impl Write for IntegrityOpts
impl Write for IntegrityOpts
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for IntegrityOpts
impl Send for IntegrityOpts
impl Sync for IntegrityOpts
impl Unpin for IntegrityOpts
impl UnwindSafe for IntegrityOpts
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