pub fn serialize<S>(value: &Option<BigUint>, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    match *value {
        Some(ref value) => {
            let bytes = value.to_bytes_be();
            let base64 = BASE64URL_NOPAD.encode(bytes.as_slice());
            serializer.serialize_some(&base64)
        }
        None => serializer.serialize_none(),
    }
}
/// Serialize a `BigUint` into Base64 URL encoded big endian bytes
Serialize a `BigUint` into Base64 URL encoded big endian bytes
Serialize a ` BigUint ` into Base64 URL encoded big endian bytes
pub fn serialize<S>(value: &Option<BigUint>, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    match *value {
        Some(ref value) => {
            let bytes = value.to_bytes_be();
            let base64 = BASE64URL_NOPAD.encode(bytes.as_slice());
            serializer.serialize_some(&base64)
        }
        None => serializer.serialize_none(),
    }
}
pub fn serialize < S > ( value : & Option < BigUint > , serializer : S ) -> Result < S :: Ok , S :: Error > where S : Serializer , { match * value { Some ( ref value ) => { let bytes = value . to_bytes_be ( ) ; let base64 = BASE64URL_NOPAD . encode ( bytes . as_slice ( ) ) ; serializer . serialize_some ( & base64 ) } None => serializer . serialize_none ( ) , } }
Serialize a `BigUint` into Base64 URL encoded big endian bytes
Serialize a ` BigUint ` into Base64 URL encoded big endian bytes
value
&Option<BigUint>
serializer
S
value
&Option<BigUint>
serializer
S