sun::borrow_checker::BorrowCheckResult

sun::borrow_checker::BorrowCheckResult

struct · Source (opens in a new tab)

struct sun::borrow_checker::BorrowCheckResult

Result of checking if a borrow/mutation is allowed.

Public Functions

error

public · function · static · Source (opens in a new tab)

static BorrowCheckResult sun::borrow_checker::BorrowCheckResult::error(const std::string &msg, const Loan &conflict)

Creates a failed borrow-check result retaining the conflicting loan.

Related: BorrowCheckResult, Loan

ok

public · function · static · Source (opens in a new tab)

static BorrowCheckResult sun::borrow_checker::BorrowCheckResult::ok()

Creates a successful borrow-check result with no conflict.

Related: BorrowCheckResult

Public Fields

allowed

public · variable · Source (opens in a new tab)

bool sun::borrow_checker::BorrowCheckResult::allowed = true

No documentation comment.

conflictingLoan

public · variable · Source (opens in a new tab)

Loan sun::borrow_checker::BorrowCheckResult::conflictingLoan

No documentation comment.

Related: Loan

errorMessage

public · variable · Source (opens in a new tab)

std::string sun::borrow_checker::BorrowCheckResult::errorMessage

No documentation comment.