pub fn into_encoded(self, secret: &Secret) -> Result<Self, Error> {
        match self {
            Compact::Encoded(_) => Ok(self),
            Compact::Decoded { .. } => self.encode(secret),
        }
    }
/// Consumes self and convert into encoded form. If the token is already encoded,
/// this is a no-op.
// TODO: Is the no-op dangerous? What if the secret between the previous encode and this time is different?
Consumes self and convert into encoded form. If the token is already encoded,
this is a no-op.
TODO: Is the no-op dangerous.
Consumes self and convert into encoded form . If the token is already encoded this is a no - op . TODO : Is the no - op dangerous .
pub fn into_encoded(self, secret: &Secret) -> Result<Self, Error> {
        match self {
            Compact::Encoded(_) => Ok(self),
            Compact::Decoded { .. } => self.encode(secret),
        }
    }
pub fn into_encoded ( self , secret : & Secret ) -> Result < Self , Error > { match self { Compact :: Encoded ( _ ) => Ok ( self ) , Compact :: Decoded { .. } => self . encode ( secret ) , } }
Consumes self and convert into encoded form.
Consumes self and convert into encoded form .
self
secret
&Secret
self
secret
&Secret