Trait stun_rs::attributes::Verifiable
source · pub trait Verifiable {
fn verify(&self, input: &[u8], cxt: &DecoderContext) -> bool;
}Expand description
Trait implemented by all StunAttribute that required validation
when they are decoded
Required Methods
sourcefn verify(&self, input: &[u8], cxt: &DecoderContext) -> bool
fn verify(&self, input: &[u8], cxt: &DecoderContext) -> bool
Performs attribute validation on decoding
Arguments:
input: raw bytes bufferctx: the decoder context
Returns
True is the validations success or False if there is an error during the validation