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: plugin_manager.rs
    path of file: ./repos/arrow-ballista/ballista/core/src/plugin
    
    the code of the file until where you have to start completion: // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
use crate::error::{BallistaError, Result};
use libloading::Library;
use log::info;
use std::collections::HashMap;
use std::io;
use std::sync::{Arc, Mutex};
use walkdir::{DirEntry, WalkDir};

use crate::plugin::{
    PluginDeclaration, PluginEnum, PluginRe
    
    fn get_all_plugin_files(&self, plugin_path: &str) -> io::Result<Vec<DirEntry>> {
        let mut plugin_files = Vec::new();
        for entry in WalkDir::new(plugin_path).into_iter().filter_map(|e| {
            let item = e.unwrap();
            // every file only load once
            if self
                .plugin_files
                .contains(&item.path().to_str().unwrap().to_string())
            {
                return None;
            }

            let file_type = item.file_type();
            if !file_type.is_file() {
                return None;
            }

            if let Some(path) = item.path().extension() {
                if let Some(suffix) = path.to_str() {
                    if suffix == "dylib" || suffix == "so" || suffix == "dll" {
                        info!(
                            "load plugin from library file:{}",
                            item.path().to_str().unwrap()
                        );
                        return Some(item);
                    }
                }
            }

            None
        }) {
            plugin_files.push(entry);
        }
        Ok(plugin_files)
    }