fn remember(&mut self, value: String) {
        self.identity = Some(value);

        // Generate a random token
        let mut arr = [0u8; 24];
        rand::thread_rng().fill(&mut arr[..]);
        self.token = Some(base64::encode(&arr));

        self.state = SqlIdentityState::Created;
    }
/// Remembers a given user (by setting a token value)
///
/// # Arguments
///
/// * `value` - User to remember
Remembers a given user (by setting a token value)
Remembers a given user ( by setting a token value )
fn remember(&mut self, value: String) {
        self.identity = Some(value);
        // Generate a random token
        let mut arr = [0u8; 24];
        rand::thread_rng().fill(&mut arr[..]);
        self.token = Some(base64::encode(&arr));
        self.state = SqlIdentityState::Created;
    }
fn remember ( & mut self , value : String ) { self . identity = Some ( value ) ; // Generate a random token let mut arr = [ 0u8 ; 24 ] ; rand :: thread_rng ( ) . fill ( & mut arr [ .. ] ) ; self . token = Some ( base64 :: encode ( & arr ) ) ; self . state = SqlIdentityState :: Created ; }
Remembers a given user (by setting a token value)
Remembers a given user ( by setting a token value )
&mut self
value
String
&mut self
value
String