How to sample multiple self defined random variable

Yes, I do noticed that I can achieve what I want with the following

using Random
struct CNormal
    μ::ComplexF64
    σ::Float64 
end

Random.rand(rng::AbstractRNG, d::Random.SamplerTrivial{CNormal}) = randn(rng,ComplexF64)*d[].σ+d[].μ


rand(CNormal(0,1),2)

However, I have not yet figure out how to make this work if I want CNormal <:ContinuousUnivariateDistribution


The following is a solution, but there probably is a way to make the above work

using Distributions, Random

struct  ComplexNormal <:ContinuousUnivariateDistribution
    μ::ComplexF64
    σ::Float64
    function ComplexNormal(μ=0,σ=1) new(μ,σ) end
end

Base.rand(rng::AbstractRNG, d::ComplexNormal) = randn(rng,ComplexF64)*d.σ+d.μ;
Base.eltype(::Type{ComplexNormal}) = ComplexF64