Struct ghastoolkit::codeql::database::CodeQLDatabaseBuilder
source · pub struct CodeQLDatabaseBuilder { /* private fields */ }
Expand description
CodeQL Database Builder used for creating a new CodeQLDatabase’s using the builder pattern
§Example
use ghastoolkit::codeql::CodeQLDatabase;
// Using the `init` method to create a new CodeQLDatabaseBuilder
let database = CodeQLDatabase::init()
.name("test".to_string())
.path("/path/to/database".to_string())
.language("javascript".to_string())
.source("/path/to/source".to_string())
.build()
.expect("Failed to build database");
Implementations§
source§impl CodeQLDatabaseBuilder
impl CodeQLDatabaseBuilder
sourcepub fn source(self, source: String) -> Self
pub fn source(self, source: String) -> Self
Set the source root for database creation / mapping
sourcepub fn repository(self, repository: &Repository) -> Self
pub fn repository(self, repository: &Repository) -> Self
Set the repository the database is associated with
sourcepub fn config(self, config: CodeQLDatabaseConfig) -> Self
pub fn config(self, config: CodeQLDatabaseConfig) -> Self
Set the configuration for the database
sourcepub fn build(&self) -> Result<CodeQLDatabase, GHASError>
pub fn build(&self) -> Result<CodeQLDatabase, GHASError>
Build the CodeQLDatabase from the builder
Trait Implementations§
source§impl Clone for CodeQLDatabaseBuilder
impl Clone for CodeQLDatabaseBuilder
source§fn clone(&self) -> CodeQLDatabaseBuilder
fn clone(&self) -> CodeQLDatabaseBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CodeQLDatabaseBuilder
impl Debug for CodeQLDatabaseBuilder
source§impl Default for CodeQLDatabaseBuilder
impl Default for CodeQLDatabaseBuilder
source§fn default() -> CodeQLDatabaseBuilder
fn default() -> CodeQLDatabaseBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodeQLDatabaseBuilder
impl RefUnwindSafe for CodeQLDatabaseBuilder
impl Send for CodeQLDatabaseBuilder
impl Sync for CodeQLDatabaseBuilder
impl Unpin for CodeQLDatabaseBuilder
impl UnwindSafe for CodeQLDatabaseBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more