You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: string_codec.rs
    path of file: ./repos/flutter-rs/flutter-engine/src/codec
    
    the code of the file until where you have to start completion: use log::error;

use super::{MessageCodec, Value};

pub struct StringCodec;

pub const STRING_CODEC: StringCodec = StringCodec {};

impl MessageCodec for StringCodec {
    fn encode_mes
    
    fn encode_message(&self, v: &Value) -> Vec<u8> {
        match v {
            Value::String(s) => s.clone().into_bytes(),
            Value::Null => Vec::new(),
            v => {
                error!("Invalid value: {:?}, can only encode string or null", v);
                Vec::new()
            }
        }
    }