fn to_file_encoding(&self, comment: &str) -> Vec<u8> {
        let bytes = self.as_bytes();

        let mut file_bytes = Vec::new();

        file_bytes.extend_from_slice(COMMENT_HEADER.as_bytes());
        file_bytes.extend_from_slice(comment.as_bytes());
        file_bytes.push(b'\n');

        let out = base64::encode(&bytes);
        file_bytes.extend_from_slice(out.as_bytes());
        file_bytes.push(b'\n');

        file_bytes
    }
/// Converts the structure into a base64 encoded container and returned the raw bytes.
///
/// The provided comment is added as the untrusted comment in the container.
///
/// The container format can be seen in the [decoder's documentation].
///
/// [decoder's documentation]: Self::from_base64
Converts the structure into a base64 encoded container and returned the raw bytes.
The provided comment is added as the untrusted comment in the container.

The container format can be seen in the [decoder's documentation].


Converts the structure into a base64 encoded container and returned the raw bytes . The provided comment is added as the untrusted comment in the container . The container format can be seen in the [ decoder ' s documentation ] .
fn to_file_encoding(&self, comment: &str) -> Vec<u8> {
        let bytes = self.as_bytes();
        let mut file_bytes = Vec::new();
        file_bytes.extend_from_slice(COMMENT_HEADER.as_bytes());
        file_bytes.extend_from_slice(comment.as_bytes());
        file_bytes.push(b'\n');
        let out = base64::encode(&bytes);
        file_bytes.extend_from_slice(out.as_bytes());
        file_bytes.push(b'\n');
        file_bytes
    }
fn to_file_encoding ( & self , comment : & str ) -> Vec < u8 > { let bytes = self . as_bytes ( ) ; let mut file_bytes = Vec :: new ( ) ; file_bytes . extend_from_slice ( COMMENT_HEADER . as_bytes ( ) ) ; file_bytes . extend_from_slice ( comment . as_bytes ( ) ) ; file_bytes . push ( b'\n' ) ; let out = base64 :: encode ( & bytes ) ; file_bytes . extend_from_slice ( out . as_bytes ( ) ) ; file_bytes . push ( b'\n' ) ; file_bytes }
Converts the structure into a base64 encoded container and returned the raw bytes.
Converts the structure into a base64 encoded container and returned the raw bytes .
&self
comment
&str
&self
comment
&str