Using related pair of cryptographic keys to open/seal plaintext I am using curve25519xsalsa20poly1305/fn.seal from sodiumoxide crate written in Rust language which is a wrapper over libsodium c library and that function calls crypto_box_curve25519xsalsa20poly1305 in libsodium library. 

The rust code would look something like this:

let (pub_key, sec_key) = ::sodiumoxide::crypto::box_::gen_keypair();
let nonce = ::sodiumoxide::crypto::box_::gen_nonce();

let data = vec![0; 10]; // plain-text

// Cipher-text
let encrypted = ::sodiumoxide::crypto::box_::seal(&amp;data,
                                                  &amp;nonce,
                                                  &amp;pub_key,
                                                  &amp;sec_key);

println!("Encrypted: {:?}", encrypted);
assert!(data != encrypted);


How much is it a security concern if i use a related key-pair (Public, Secret Key pair) generated through crypto_box_curve25519xsalsa20poly1305_keypair in calling that function? 

Will this be regarded as a potential weakness, given that only I intend to encrypt and decrypt it? I know it is better to use symmetric encryption in this case but just for learning purposes – what is the security risk ?
You are effectively using symmetric encryption.

The crypto_box function uses elliptic curve Diffie–Hellman on Curve25519. With a given input private key and public key it always generates the same symmetric key, which is then used for authenticated encryption. By using the private and public key from the same key pair you are generating the point $a^2G$, which with a random $a$ is just a random point on the curve. This point is then used to derive a symmetric key for authenticated encryption.

Of course, it would be more efficient to just use that derived key (or a random key) in the first place, but as long as you keep the key pair secret, what you are doing is secure.