pub enum CheckMethod {
Md5,
Sha1,
Sha256,
Sm3,
}Expand description
摘要算法枚举。
对应 Java: org.ofdrw.core.signatures.range.CheckMethod
在签名的范围(References)中使用,标识对受保护文件计算摘要时所用的算法。
Variants§
Implementations§
Source§impl CheckMethod
impl CheckMethod
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
返回与 Java CheckMethod.toString() 一致的属性字符串。
产出值直接用于 XML 属性 CheckMethod="..." 的值。
§示例
use easyofd_core::signatures::CheckMethod;
assert_eq!(CheckMethod::Md5.as_str(), "MD5");
assert_eq!(CheckMethod::Sha1.as_str(), "SHA1");
assert_eq!(CheckMethod::Sha256.as_str(), "SHA256");
assert_eq!(CheckMethod::Sm3.as_str(), "SM3");Sourcepub fn try_from_str(s: &str) -> Result<Self, String>
pub fn try_from_str(s: &str) -> Result<Self, String>
Trait Implementations§
Source§impl Clone for CheckMethod
impl Clone for CheckMethod
Source§fn clone(&self) -> CheckMethod
fn clone(&self) -> CheckMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CheckMethod
Source§impl Debug for CheckMethod
impl Debug for CheckMethod
Source§impl Display for CheckMethod
为 CheckMethod 实现 Display,产出与 as_str() 一致。
impl Display for CheckMethod
为 CheckMethod 实现 Display,产出与 as_str() 一致。
impl Eq for CheckMethod
Source§impl Hash for CheckMethod
impl Hash for CheckMethod
Source§impl PartialEq for CheckMethod
impl PartialEq for CheckMethod
impl StructuralPartialEq for CheckMethod
Auto Trait Implementations§
impl Freeze for CheckMethod
impl RefUnwindSafe for CheckMethod
impl Send for CheckMethod
impl Sync for CheckMethod
impl Unpin for CheckMethod
impl UnsafeUnpin for CheckMethod
impl UnwindSafe for CheckMethod
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